Patch EmitMeshTasksEXT calls that don't use the referenced payload

* Unclear on if this is valid or not but it is likely considered to be a
  degenerate case, where a payload is declared and referenced by the entry point
  then not used in the emit. The contents in the mesh shader are presumably
  undefined but if they're similarly unused that's fine?
This commit is contained in:
baldurk
2024-07-16 16:12:30 +01:00
parent 16c440776d
commit df32442362
+1 -1
View File
@@ -1791,7 +1791,7 @@ static void AddTaskShaderPayloadStores(const rdcarray<SpecConstant> &specInfo,
{
rdcspv::OpEmitMeshTasksEXT emit(it);
// only patch emits to our payload. Other shaders may reference other payloads
if(emit.payload == payloadId)
if(emit.payload == payloadId || !emit.HasPayload())
{
rdcspv::OperationList ops;