Commit Graph
232 Commits
Author SHA1 Message Date
baldurk 510d16d900 Report more accurate data for Pixel history with discards & fragments
* For draws where some fragments discard, D3D12 & Vulkan currently can't
  distinguish which specific fragments did and didn't discard because they're
  processed batched in separate callbacks rather than incrementally like D3D11 &
  GL which can track a discarded offset by doing one stencil count at a time.
  This means we can't get primitive information or ordering, we only get a list
  of the passing fragments and a set of failing fragments.
* Note that on all APIs we also can't distinguish when instancing is present,
  because there could be multiple "identical" primitives from different
  primitives, some of which discard and some don't.
2026-09-15 17:00:54 +01:00
baldurk 1fbec8ee48 Print total number of cases properly in log 2026-09-13 12:54:54 +01:00
baldurk a3fafbc29a Don't pre-split work across parallel job workers 2026-09-12 02:15:12 +01:00
baldurk 8392bca098 Fix incorrect error string 2026-09-11 21:17:19 +01:00
baldurk f58d376b3a Add an option to the logger to immediately fatal on first error
* This is mostly useful for some of the tests that want to be able to run and
  accumulate multiple errors, but while debugging we want an exception to catch.
2026-09-11 21:17:19 +01:00
baldurk d56ea92fd5 Add some helpers for querying and reloading tests 2026-09-11 21:17:18 +01:00
baldurk 7faac83b00 Add a helper and context for tracking the last pixel pick 2026-09-11 21:17:18 +01:00
baldurk ff7e147b39 Allow setting a capture context if tests are run in UI
* This means we can keep the UI in sync with things like resource replacements.
2026-09-11 21:17:18 +01:00
baldurk 01893b9896 Use context helpers for pixel history 2026-09-11 21:17:18 +01:00
baldurk ca682d6d34 Use context helpers for pixel debugging 2026-09-11 21:17:17 +01:00
baldurk 3452ba8ffd Use context helpers for thread debugging 2026-09-11 21:17:17 +01:00
baldurk e6948a8c7e Check for degenerate debug traces in process_trace 2026-09-11 21:17:17 +01:00
baldurk 191597b27c Don't allow find_*_source_var to return None
* Almost all callers expect a return value, so better to raise an exception
  inside and make it non-optional return
2026-09-11 21:17:17 +01:00
baldurk ae019398cb Remove checks for shader debuggability
* All APIs now support shader debugging by default and we assume/require all
  shaders in tests to be debuggable.
2026-09-11 21:17:17 +01:00
baldurk 04af66d71f Check for failed ShaderDebugTrace centrally
* We don't expect the debug to fail entirely and if it does we can throw a test
  failure
2026-09-11 21:17:16 +01:00
baldurk 031212e916 Use context helpers for vertex debugging 2026-09-11 21:17:16 +01:00
baldurk d9c72e7651 Include context information for pixel history and shader debug attempts 2026-09-11 21:17:16 +01:00
baldurk 2a0989ba9a Use local helper function for setting current EID
* This lets the testcase track the current EID and print it when a failure
  happens
2026-09-11 19:19:27 +01:00
baldurk 4fffe30bd4 Allow adding custom log outputs that aren't filenames 2026-09-11 19:19:26 +01:00
baldurk d7cbb743e4 Set more tests to use common check_vertex_debug() helper 2026-09-11 19:19:26 +01:00
baldurk fc27cf0deb Add ability to run tests in parallel 2026-09-11 19:19:26 +01:00
baldurk 73545f0a51 Fix failed test movement for truncated logs 2026-09-11 17:27:36 +01:00
baldurk 8b492631c4 Allow multi-word test names in javascript processing 2026-09-11 17:27:36 +01:00
baldurk 748e089b15 Fix remaining static analysis identified issues in python test code
* This includes:
  - Incorrect comparisons
  - Missing type annotations where it can't be inferred
  - Variable shadowing and bad use
  - Unused imports
  - asserts for non-None on types
* Passes clean on strict pyright checking except for
  `reportMissingParameterType`, `reportUnusedVariable`, and
  `reportOptionalMemberAccess` which are all too spammy and low value to be
  worth addressing.
2026-09-11 15:04:05 +01:00
baldurk 1409c071a9 Split apart util.value_compare_diff to have better type annotation 2026-09-11 15:04:05 +01:00
baldurk 12636a1607 Switch from str.format to f-strings in tests
* These were available for python 3.6 too so was never any reason not to use
  them except not being aware they existed.
2026-09-11 15:04:04 +01:00
baldurk 62e38bc249 Use helper config struct in Draw_Zoo instead of untyped dict 2026-09-11 15:04:04 +01:00
baldurk 796b68c1a8 Unify code to check mesh/task data against reference
* Also change the task payload data layout to match meshes, with one 'vertex'
  (payload) per task thread
2026-09-11 15:04:04 +01:00
baldurk ec36d155bc Remove redundant type annotations
* These come from long ago when using PyCharm with not as good type checking and
  with renderdoc module stubs that were incomplete so needed help identifying
  types.
2026-09-11 15:04:04 +01:00
baldurk 79a5086a0c Handle assert failures in logger directly, remove TestCase.check
* assert is handled specially by the type checker so we don't want to have
  duplicate self.check / assert
* The original reason for TestCase.check was to print the assertion message but
  this can be handled by checking for the AssertionError exception
2026-09-11 15:04:03 +01:00
baldurk fd55020165 Add helper for checking vertex debugging matches postvs
* There are a few 'extras' here as the uses aren't quite uniform, but they are
  close enough it makes sense to have a common helper
2026-09-11 15:04:03 +01:00
baldurk fc50157566 Use 0.5 for depth-equal test so it works on various precisions 2026-08-24 17:46:21 +01:00
baldurk 950568fb8f Rename previous/next to previousAction/nextAction in ActionDescription
* swig internally creates 'next' member which we normally want to avoid, so
  prevent shadowing here by using a distinct name.
2026-08-13 17:46:47 +01:00
baldurk 3f653cfbf2 Remove RENDERDOC_GetDefaultCaptureOptions, initialise in constructor 2026-08-13 17:46:46 +01:00
Jake Turner 6df99e4d94 Extend python helper functions for D3D12 indirect action names 2026-07-30 16:35:53 +01:00
Jake Turner 4aa00a2bfa Add python helper functions to check indirect action names 2026-07-22 05:41:09 +01:00
Jake Turner 0f3d7965e3 Validate EIDs by default during python autotests
Fail test if the EIDs are not valid
2026-06-01 11:23:33 +01:00
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
baldurk ef0b68d76d Fix annotations tests to check for new vector member names 2026-03-12 12:44:35 +00:00
baldurk c2147b0233 Clarify that most info is unavailable for pixel history on secondaries
* Also fix a potential crash if dynamic rendering is used in secondaries.
2026-03-10 12:40:02 +00: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
baldurk 965d1c9568 Add demo tests for annotations 2026-01-28 14:42:11 +00:00
baldurk ccbe3c8cce Propagate up failure through expand sections in test results 2025-11-18 17:59:12 +00: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