mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-13 05:20:45 +00:00
Change shader debugging tests to check at runtime if it's available
* The config values can be loaded in the tests now.
This commit is contained in:
@@ -6,9 +6,6 @@ import rdtest
|
||||
class D3D12_PrimitiveID(rdtest.TestCase):
|
||||
demos_test_name = 'D3D12_PrimitiveID'
|
||||
|
||||
def check_support(self):
|
||||
return False, 'shader debugging is not yet enabled for D3D12'
|
||||
|
||||
def test_draw(self, draw: rd.DrawcallDescription, x, y, prim, expected_prim, expected_output):
|
||||
self.controller.SetFrameEvent(draw.eventId, True)
|
||||
pipe: rd.PipeState = self.controller.GetPipelineState()
|
||||
@@ -50,6 +47,10 @@ class D3D12_PrimitiveID(rdtest.TestCase):
|
||||
return True
|
||||
|
||||
def check_capture(self):
|
||||
if not self.controller.GetAPIProperties().shaderDebugging:
|
||||
rdtest.log.success("Shader debugging not enabled, skipping test")
|
||||
return
|
||||
|
||||
success = True
|
||||
|
||||
# Jump to the draw
|
||||
|
||||
@@ -6,9 +6,6 @@ import rdtest
|
||||
class D3D12_Resource_Mapping_Zoo(rdtest.TestCase):
|
||||
demos_test_name = 'D3D12_Resource_Mapping_Zoo'
|
||||
|
||||
def check_support(self):
|
||||
return False, 'shader debugging is not yet enabled for D3D12'
|
||||
|
||||
def test_debug_pixel(self, x, y, test_name):
|
||||
pipe: rd.PipeState = self.controller.GetPipelineState()
|
||||
|
||||
@@ -34,6 +31,9 @@ class D3D12_Resource_Mapping_Zoo(rdtest.TestCase):
|
||||
return True
|
||||
|
||||
def check_capture(self):
|
||||
if not self.controller.GetAPIProperties().shaderDebugging:
|
||||
rdtest.log.success("Shader debugging not enabled, skipping test")
|
||||
return
|
||||
|
||||
failed = False
|
||||
|
||||
|
||||
@@ -6,10 +6,10 @@ import rdtest
|
||||
class D3D12_Shader_Debug_Zoo(rdtest.TestCase):
|
||||
demos_test_name = 'D3D12_Shader_Debug_Zoo'
|
||||
|
||||
def check_support(self):
|
||||
return False, 'shader debugging is not yet enabled for D3D12'
|
||||
|
||||
def check_capture(self):
|
||||
if not self.controller.GetAPIProperties().shaderDebugging:
|
||||
rdtest.log.success("Shader debugging not enabled, skipping test")
|
||||
return
|
||||
|
||||
failed = False
|
||||
|
||||
|
||||
Reference in New Issue
Block a user