@@ -5135,6 +5135,8 @@ ShaderDebugTrace *VulkanReplay::DebugVertex(uint32_t eventId, uint32_t vertid, u
5135
5135
memcpy ((var.value .u8v .data ()) + elemSize * comp, value + i * paramAlign, sz);
5136
5136
}
5137
5137
}
5138
+ apiWrapper->global_builtins [ShaderBuiltin::SubgroupSize] =
5139
+ ShaderVariable (rdcstr (), numThreads, 0U , 0U , 0U );
5138
5140
5139
5141
ShaderDebugTrace *ret = debugger->BeginDebug (apiWrapper, ShaderStage::Vertex, entryPoint, spec,
5140
5142
shadRefl.instructionLines , shadRefl.patchData ,
@@ -5311,6 +5313,10 @@ ShaderDebugTrace *VulkanReplay::DebugVertex(uint32_t eventId, uint32_t vertid, u
5311
5313
5312
5314
rdcspv::Debugger *debugger = new rdcspv::Debugger;
5313
5315
debugger->Parse (shader.spirv .GetSPIRV ());
5316
+
5317
+ apiWrapper->global_builtins [ShaderBuiltin::SubgroupSize] =
5318
+ ShaderVariable (rdcstr (), numThreads, 0U , 0U , 0U );
5319
+
5314
5320
ShaderDebugTrace *ret = debugger->BeginDebug (apiWrapper, ShaderStage::Vertex, entryPoint, spec,
5315
5321
shadRefl.instructionLines , shadRefl.patchData ,
5316
5322
laneIndex, numThreads, numThreads);
@@ -5830,6 +5836,9 @@ ShaderDebugTrace *VulkanReplay::DebugPixel(uint32_t eventId, uint32_t x, uint32_
5830
5836
}
5831
5837
}
5832
5838
5839
+ apiWrapper->global_builtins [ShaderBuiltin::SubgroupSize] =
5840
+ ShaderVariable (rdcstr (), numThreads, 0U , 0U , 0U );
5841
+
5833
5842
ret = debugger->BeginDebug (apiWrapper, ShaderStage::Pixel, entryPoint, spec,
5834
5843
shadRefl.instructionLines , shadRefl.patchData , winner->laneIndex ,
5835
5844
numThreads, numThreads);
@@ -6232,6 +6241,9 @@ ShaderDebugTrace *VulkanReplay::DebugComputeCommon(ShaderStage stage, uint32_t e
6232
6241
}
6233
6242
}
6234
6243
6244
+ apiWrapper->global_builtins [ShaderBuiltin::SubgroupSize] =
6245
+ ShaderVariable (rdcstr (), winner->subgroupSize , 0U , 0U , 0U );
6246
+
6235
6247
ShaderDebugTrace *ret = debugger->BeginDebug (
6236
6248
apiWrapper, stage, entryPoint, spec, shadRefl.instructionLines , shadRefl.patchData ,
6237
6249
winner->laneIndex , numThreads, winner->subgroupSize );
@@ -6294,6 +6306,10 @@ ShaderDebugTrace *VulkanReplay::DebugComputeCommon(ShaderStage stage, uint32_t e
6294
6306
6295
6307
rdcspv::Debugger *debugger = new rdcspv::Debugger;
6296
6308
debugger->Parse (shader.spirv .GetSPIRV ());
6309
+
6310
+ apiWrapper->global_builtins [ShaderBuiltin::SubgroupSize] =
6311
+ ShaderVariable (rdcstr (), 1U , 0U , 0U , 0U );
6312
+
6297
6313
ShaderDebugTrace *ret =
6298
6314
debugger->BeginDebug (apiWrapper, stage, entryPoint, spec, shadRefl.instructionLines ,
6299
6315
shadRefl.patchData , laneIndex, numThreads, 1 );
0 commit comments