Tweak D3D12_Resource_Mapping_Zoo test to mark as failed in all cases

This commit is contained in:
Jake Turner
2025-11-11 11:32:31 +13:00
parent 4e215518df
commit 4d180eecfa
@@ -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