Set the correct type for DXIL constant buffer array ShaderVariables

Change the name of constant buffer array elements to match access to match SRV and UAV naming i.e. cbvArray[3] instead of cbvArray_3_0
This commit is contained in:
Jake Turner
2025-05-18 08:22:34 +01:00
parent 72ff41656f
commit 66aabcaba3
2 changed files with 2 additions and 3 deletions
+1 -1
View File
@@ -232,7 +232,7 @@ static void FlattenSingleVariable(const rdcstr &cbufferName, uint32_t byteOffset
for(uint32_t reg = 0; reg < numRegisters; reg++)
{
outvars[outIdx + reg].rows = 1;
outvars[outIdx + reg].type = VarType::Unknown;
outvars[outIdx + reg].type = v.type;
outvars[outIdx + reg].columns = v.columns;
outvars[outIdx + reg].flags = v.flags;
}
+1 -2
View File
@@ -2584,9 +2584,8 @@ bool ThreadState::ExecuteInstruction(DebugAPIWrapper *apiWrapper,
if(!result.members[arrayIndex].members.empty())
{
rdcstr name =
StringFormat::Fmt("%s_%u_%u", result.name.c_str(), arrayIndex, 0);
resRef->resourceBase.name + StringFormat::Fmt("[%u]", arrayIndex);
result = result.members[arrayIndex].members[0];
result.type = VarType::Float;
result.name = name;
}
}