Check for degenerate debug traces in process_trace

This commit is contained in:
baldurk committed 2026-09-11 21:17:17 +01:00
1 parent 191597b27c
commit e6948a8c7e
3 files changed
+5 -18

No files matched your search

+5
View File
@@ -954,6 +954,11 @@ class TestCase:
if validate:
self.validate_trace(allChanges)
# Check for non-zero cycles, this is never expected - calling code should verify that
# debugging is supported etc
if cycles == 0:
raise TestFailureException("Shader debug cycle count was zero")
return cycles, variables
def get_sig_index(self, signature: List[rd.SigParameter], builtin: rd.ShaderBuiltin, reg_index: int = -1):
@@ -246,12 +246,6 @@ class D3D12_Shader_DebugData_Zoo(rdtest.TestCase):
threadid = (0,0,0)
trace = self.controller.DebugThread(groupid, threadid)
cycles, variables = self.process_trace(trace)
# Check for non-zero cycles
if cycles == 0:
rdtest.log.error("Shader debug cycle count was zero")
failed = True
self.controller.FreeTrace(trace)
continue
# Result is stored in RWStructuredBuffer<float4> bufOut : register(u0);
bufOut = pipe.GetReadWriteResources(rd.ShaderStage.Compute)[0].descriptor.resource
@@ -59,12 +59,6 @@ class D3D12_Shader_Debug_Zoo(rdtest.TestCase):
# Debug the shader
trace = self.controller.DebugThread(groupid, tid)
cycles, variables = self.process_trace(trace)
# Check for non-zero cycles
if cycles == 0:
rdtest.log.success(f"Test {test} Group:{groupid} Thread:{tid} : Shader debug cycle count was zero")
self.controller.FreeTrace(trace)
failed = True
continue
# Find the source variable 'testResult' at the highest instruction index
name = 'testResult'
@@ -308,12 +302,6 @@ class D3D12_Shader_Debug_Zoo(rdtest.TestCase):
testIndex = groupX
trace = self.controller.DebugThread(groupid, threadid)
cycles, variables = self.process_trace(trace)
# Check for non-zero cycles
if cycles == 0:
rdtest.log.error("Shader debug cycle count was zero")
self.controller.FreeTrace(trace)
failed = True
continue
# Result is stored in RWStructuredBuffer<uint4> bufOut : register(u1);
bufOut = pipe.GetReadWriteResources(rd.ShaderStage.Compute)[1].descriptor.resource