80 Commits

Author SHA1 Message Date
baldurk ddc475d729 Use raw strings for regexs in python tests 2026-04-30 15:55:27 +01:00
Jake Turner fcebc9cebb Make a copy of the RootActions in TestCase.validate_eventids()
Otherwise the next call to controller.GetRootActions() will return an empty list
2026-04-28 13:12:18 +01:00
Jake Turner d0b69c7034 Add Python test helper validate_eventids()
Called when loading captures in Iter_Test and Repeat_Load

Checks the consistency of EventIds:

Walk the actions to find all the referenced EventId's:
- Error if any EventId is duplicated
- Error if the EventId's are not contiguous (with no gaps)
2026-04-24 15:50:40 +01:00
Jake Turner e9bce39efc Ignore empty before/after for resource ShaderVariables in validate_trace 2026-04-14 13:26:29 +01:00
Jake Turner 1bd80b13cc Extend VK_Mesh_Shader tests for struct arrays, struct in a payload 2026-02-04 13:25:18 +13:00
Jake Turner 0bec9e0a0c Add struct array to VK_Mesh_Shader task out 2026-01-29 09:16:48 +13:00
Jake Turner ccbb516610 Simplify DXIL Disassembler/Debugger SSA ID name strings and aliases
Store SSA ID name strings in a container which is shared between the disassembler and the debugger.
The SSA ID name strings are guaranteed to be unique by appending the SSA ID value.

Do not use resource names for SSA ID names, only show resource names when a DXIL handle is created i.e. DXOp::CreateHandle, DXOp::CreateHandleFromBinding & DXOp::CreateHandleFromHeap

This means the debugger now has a unique name for each ShaderVariable generated.

Revert the ShaderViewer consistency changes which were only required because the DXIL debugger did not generate unique names for ShaderVariables.
2025-11-13 13:10:44 +13:00
Jake Turner f858b2320f Extend D3D12_Shader_DebugData_Zoo tests to include matrix
Check matrix in the outputs from Vertex Shader
Check matrix in the inputs to Pixel Shader
Check matrix debug data source values from debugger trace
2025-11-12 11:10:32 +13:00
Jake Turner c534b41eb6 Tune the ShaderVariable consistency checks for resources
Do not check before/after equals existing value for ReadOnlyResource and ReadWriteResource
In the DXIL debugger for resources the same SSA ID might have different names
2025-11-11 10:53:15 +13:00
Jake Turner 9c31e0131e Fix validate_trace() being called from generate_full_trace() 2025-10-23 09:15:42 +01:00
Jake Turner 196ca9bae2 Run validate_trace() as part of generate_full_trace()
Ensure the trace is valid before running comparisons on it
2025-10-10 12:58:32 +01:00
Jake Turner f12aa91ba2 Python helpers to generate and check a full trace from shader debug 2025-09-24 14:13:59 +01:00
baldurk 3e70a37fac Add test of descriptor buffer 2025-07-09 09:57:56 +01:00
thisisjimmyfb 29207a7333 Fix VK_Leak_Check for Android
RemoteServer timedout due to VK_Leak_Check taking too long before sending commands to remote server. Spawning a worker thread to keeping the remote server connection alive fixes the disconnection issue.
2025-06-19 11:45:04 +01:00
thisisjimmyfb b1d3123583 Remote Android and Linux test support part 1
Add remote server support to test framework
2025-06-19 11:45:04 +01:00
Jake Turner 962c1cdcf6 Enable Python shader trace validation by default 2025-05-19 16:57:22 +01:00
Jake Turner 9523f98b8a Python implementation of ShaderDebugTrace validation
Similar to the validation that is performed in ShaderViewer UI
Disabled by default pass True to process_trace to enable the validation
Includes validate_shadervariable() and shadervariable_equal()
2025-05-19 16:44:45 +01:00
Jake Turner 258ab5b6e3 Change test helper to just check for asserts (not errors)
Setting the Vulkan layer produces two errors
2025-04-22 14:31:43 +01:00
Jake Turner 1c4520534d new helper function in testcase.py to check RD log for Asserts/Errors
def check_renderdoc_log(self, asserts: bool = True, errors: bool = True):
2025-04-22 12:33:50 +01:00
Jake Turner fa9bc127b1 Add early return test case to D3D12_Shader_DebugData
Change python to search backwards through the instruction info to find the value for a source variable
2025-04-02 08:39:49 +01:00
Jake Turner 7eef20b3db Added demos test VK_Mesh_Shader
Similar on d3d12_mesh_shader test, move some helper code from d3d12_mesh_shader python to testcase.py to allow for sharing with vk_mesh_shader python
2025-03-20 13:52:17 +00:00
Jake Turner 5120723135 Add Shader source variable helper functions to rdtest
parse_shader_var_type()
get_source_shader_var_value()

moved out from D3D12_Shader_Debug_Zoo
2025-03-06 13:34:50 +00:00
baldurk cfefa5d5ef Add a test for new group ops 2025-02-10 17:52:31 +00:00
Jake Turner 84f6799444 Improve testcase _find_action
Search for the action with the closest EID to the request
Previously it would return the first action that was larger than the EID
2024-11-07 15:23:31 +00:00
Jake Turner 84786aea20 Demos test D3D12_Shader_Mesh 2024-07-24 13:21:57 +01:00
baldurk 9de4a79859 Update tests to new descriptor interface 2024-04-10 18:58:52 +01:00
baldurk 69c1990035 Fix handling of descriptor feedback in iterating arrays 2022-11-21 15:22:43 +00:00
baldurk cef00a102b Add struct VarType and combine flags into single field
* This is not a space saving right now, but allows more flags to be added
  without adding more storage.
2022-05-20 13:37:25 +01:00
baldurk 8aa0390948 Add string messages to returned result codes to display to user
* Most of the main entry points that can fail with relevant reasons now has a
  way of specifying a message to return with it. This message can be displayed
  to the user to give more information or context about an error.
2022-04-26 16:21:54 +01:00
baldurk e42b0ff2ca Refactor ShaderVariable use and non-32-bit precision. Closes #2466 2022-02-02 15:00:43 +00:00
baldurk 979f5244e2 Make demos timeout more generous for leak check tests
* It's fine as-is in release, but in development builds it can take almost a
  minute to reach that frame and capture.
2021-07-05 14:20:48 +01:00
baldurk 634a8c381a Update test scripts to latest APIs and behaviour changes 2021-07-01 15:15:05 +01:00
baldurk 7149302680 Rename 'draw' or 'drawcall' to action
* There's not a good accepted terminology for this kind of event, and for
  historical reasons 'drawcall' has been the accepted term, even though
  that can be quite confusing when a dispatch or a copy is a 'drawcall'.
* This is particularly highlighted by the event browser filters where
  $draw() includes draws and dispatches, but $dispatch() only includes
  dispatches, it's hard to intuitively understand why $draw() matches all
  of these calls.
* As a result we've defined the term 'action' to cover these types of
  events in the same way that we defined 'event' in the first place to
  mean a single atomic API call.
2021-07-01 15:15:05 +01:00
baldurk efd2a50a3a Use python datetime for calculating durations, not time.time() 2021-05-04 14:12:03 +01:00
baldurk 47e13a30d4 Add test of GL renderbuffer variants 2021-04-16 13:31:08 +01:00
baldurk 30dd13feb8 Pull index byte width and topology out of drawcall state
* These are treated as state on most APIs, only GL treats it as a drawcall
  parameter.
2021-02-24 13:52:07 +00:00
baldurk 7e5fc40779 Ignore number of captures made in D3D11_Swapchain_Zoo 2021-01-18 14:18:34 +00:00
baldurk 7ff7e0a71d Replace fixed C arrays with wrapper class in public interface
* These map more naturally to python tuples and are easier to wrap in and out.
* We also tidy up the FloatVecVal etc and standardise the members of
  ShaderValue.
2020-12-09 18:16:08 +00:00
baldurk 8be0da2ce3 Add a test of AMD shader operations 2020-11-04 17:48:49 +00:00
baldurk 9e17b91a94 Test different variations of DXGI swapchains on D3D11 and D3D12 2020-10-02 17:41:58 +01:00
baldurk 331aabcde6 Include test process output into test log 2020-07-21 19:57:09 +01:00
baldurk 485f7d21fc Make overlays interact consistently with viewport/scissor
* We also add a red/green display to the viewport and scissor overlay to show
  pixels that fail the scissor test.
2020-07-17 16:53:34 +01:00
baldurk c912ccc3a8 Fix lookup of source var that references an array 2020-07-16 20:45:20 +01:00
baldurk ab5c527489 Update D3D12 cbuffer test to check DXIL 2020-06-19 14:46:00 +01:00
baldurk a0a373a8e1 Fix handling of buffer truncation and zero-sized buffers 2020-05-29 17:26:29 +01:00
baldurk 47f2fa8b93 Don't apply restart index if primitive restart is disabled 2020-05-20 11:20:13 +01:00
baldurk 31b1c0641a Fix debug var lookups in tests for D3D variables 2020-05-13 18:07:26 +01:00
baldurk bfcc484a7c Add tests of drawcall variants 2020-05-12 19:04:57 +01:00
baldurk 79c47ff91e Ignore bound index buffer for non-indexed draws, apply vertexOffset 2020-05-11 18:04:22 +01:00
baldurk 20e17a3f20 Add a configurable timeout when running demos program 2020-04-30 18:15:28 +01:00