From 4d180eecfad32a4ba5e5d956a1d2978d9c08f0a3 Mon Sep 17 00:00:00 2001 From: Jake Turner Date: Tue, 11 Nov 2025 11:32:31 +1300 Subject: [PATCH] Tweak D3D12_Resource_Mapping_Zoo test to mark as failed in all cases --- .../tests/D3D12/D3D12_Resource_Mapping_Zoo.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/util/test/tests/D3D12/D3D12_Resource_Mapping_Zoo.py b/util/test/tests/D3D12/D3D12_Resource_Mapping_Zoo.py index 9b9e8c9f3..0d61b69c8 100644 --- a/util/test/tests/D3D12/D3D12_Resource_Mapping_Zoo.py +++ b/util/test/tests/D3D12/D3D12_Resource_Mapping_Zoo.py @@ -11,7 +11,7 @@ class D3D12_Resource_Mapping_Zoo(rdtest.TestCase): if not pipe.GetShaderReflection(rd.ShaderStage.Pixel).debugInfo.debuggable: rdtest.log.print("Skipping undebuggable shader at {}.".format(test_name)) - return + return True # Debug the shader trace: rd.ShaderDebugTrace = self.controller.DebugPixel(x, y, rd.DebugPixelInputs()) @@ -37,7 +37,12 @@ class D3D12_Resource_Mapping_Zoo(rdtest.TestCase): if not self.controller.GetAPIProperties().shaderDebugging: rdtest.log.success("Shader debugging not enabled, skipping test") return + if not self.check_capture_internal(): + raise rdtest.TestFailureException("Some tests were not as expected") + rdtest.log.success("All tests matched") + + def check_capture_internal(self) -> bool: failed = False rdtest.log.begin_section("SM5.x tests") @@ -77,7 +82,7 @@ class D3D12_Resource_Mapping_Zoo(rdtest.TestCase): test_marker: rd.ActionDescription = self.find_action("SM6.0") if test_marker is None: rdtest.log.print("No SM6.0 action to test") - return + return failed rdtest.log.begin_section("SM6.0 tests") @@ -116,7 +121,7 @@ class D3D12_Resource_Mapping_Zoo(rdtest.TestCase): test_marker: rd.ActionDescription = self.find_action("SM6.6") if test_marker is None: rdtest.log.print("No SM6.6 action to test") - return + return failed rdtest.log.begin_section("SM6.6 tests") @@ -152,7 +157,4 @@ class D3D12_Resource_Mapping_Zoo(rdtest.TestCase): rdtest.log.end_section("Bindless tests") rdtest.log.end_section("SM6.6 tests") - if failed: - raise rdtest.TestFailureException("Some tests were not as expected") - - rdtest.log.success("All tests matched") + return not failed