MCPcopy Create free account
hub / github.com/IppClub/Dora-SSR / patchUAVRegisterDebugInfo

Function patchUAVRegisterDebugInfo

Source/3rdParty/bgfx/src/renderer_d3d11.cpp:4060–4094  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4058 }
4059
4060 static void patchUAVRegisterDebugInfo(DxbcSPDB& _spdb)
4061 {
4062 if (!_spdb.debugCode.empty())
4063 {
4064 // 'register( u[xx] )'
4065 char* ptr = (char*)_spdb.debugCode.data();
4066 while (ptr < (char*)_spdb.debugCode.data() + _spdb.debugCode.size() - 3)
4067 {
4068 if (*(ptr+1) == ' '
4069 && *(ptr+2) == 'u'
4070 && *(ptr+3) == '[')
4071 {
4072 char* startPtr = ptr+4;
4073 char* endPtr = ptr+4;
4074
4075 while (*endPtr != ']')
4076 {
4077 endPtr++;
4078 }
4079
4080 uint32_t regNum = 0;
4081 uint32_t regLen = uint32_t(endPtr - startPtr);
4082 bx::fromString(&regNum, bx::StringView(startPtr, regLen));
4083
4084 regNum += 16;
4085 uint32_t len = bx::toString(startPtr, regLen+2, regNum);
4086 *(startPtr + len) = ']';
4087
4088 break;
4089 }
4090
4091 ++ptr;
4092 }
4093 }
4094 }
4095
4096 void ShaderD3D11::create(const Memory* _mem)
4097 {

Callers 1

createMethod · 0.85

Calls 6

fromStringFunction · 0.85
toStringFunction · 0.70
StringViewClass · 0.50
emptyMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected