Skip to content

Commit

Permalink
DXIL Reflection GetEntryPoints() handle tags being NULL
Browse files Browse the repository at this point in the history
  • Loading branch information
Zorro666 committed May 6, 2024
1 parent d0bbdc3 commit a8cd40c
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions renderdoc/driver/shaders/dxil/dxil_reflect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1418,15 +1418,17 @@ rdcarray<ShaderEntryPoint> Program::GetEntryPoints()
entryPoint.name = entry->children[1]->str;

Metadata *tags = entry->children[4];

for(size_t i = 0; i < tags->children.size(); i += 2)
if(tags)
{
// 8 is the type tag
if(getival<uint32_t>(tags->children[i]) == 8U)
for(size_t i = 0; i < tags->children.size(); i += 2)
{
entryPoint.stage =
GetShaderStage((DXBC::ShaderType)getival<uint32_t>(tags->children[i + 1]));
break;
// 8 is the type tag
if(getival<uint32_t>(tags->children[i]) == 8U)
{
entryPoint.stage =
GetShaderStage((DXBC::ShaderType)getival<uint32_t>(tags->children[i + 1]));
break;
}
}
}

Expand Down

0 comments on commit a8cd40c

Please sign in to comment.