Don't try to patch output signature elements that are exploded arrays

* We only want to patch it once, for the original array.
This commit is contained in:
baldurk
2019-04-12 16:50:56 +01:00
parent de37c7d005
commit 7e33e1380b
2 changed files with 3 additions and 3 deletions
@@ -4104,7 +4104,7 @@ void AddSignatureParameter(bool isInput, ShaderStage stage, uint32_t id, uint32_
sig.regIndex += RDCMAX(1U, type->matrixSize);
if(isArray)
patch.accessChain.back()++;
patch.ID = patch.structID = 0;
}
}
+2 -2
View File
@@ -1247,7 +1247,7 @@ static void AddXFBAnnotations(const ShaderReflection &refl, const SPIRVPatchData
spv::OpMemberDecorate,
{outpatch[i].structID, outpatch[i].accessChain.back(), spv::DecorationOffset, xfbStride}));
}
else
else if(outpatch[i].ID)
{
editor.AddDecoration(SPIRVOperation(
spv::OpDecorate, {outpatch[i].ID, (uint32_t)spv::DecorationOffset, xfbStride}));
@@ -1265,7 +1265,7 @@ static void AddXFBAnnotations(const ShaderReflection &refl, const SPIRVPatchData
for(size_t i = 0; i < outpatch.size(); i++)
{
if(vars.find(outpatch[i].ID) == vars.end())
if(outpatch[i].ID && vars.find(outpatch[i].ID) == vars.end())
{
editor.AddDecoration(
SPIRVOperation(spv::OpDecorate, {outpatch[i].ID, (uint32_t)spv::DecorationXfbBuffer, 0}));