Commit Graph

48 Commits

Author SHA1 Message Date
baldurk 19512165bb Bail from Iter_Test when fatal errors are detected 2025-02-26 16:12:10 +00:00
baldurk 7ac76492f4 Clamp pixel shader comparisons to output components in Iter_Test 2025-02-26 16:11:58 +00:00
Jake Turner 7ebd608cbe Add basic compute shader debug test action to iter_test
Does not check any output, purely runs DebugThread on a random groupId and threadId
2025-02-24 16:37:45 +00:00
baldurk 8d04479d20 Add additional check on index buffer values being out of bounds 2024-12-03 15:01:58 +00:00
Jake Turner 2d0ce14633 Iter Test skip pixel debug when no pixel shader bound at mod event 2024-11-15 13:19:00 +00:00
Jake Turner dc27caaa08 Iter Test : pixel history and vertex debug changes
Do not pixel debug on an unknown primitive ID (-1)
Allow pixel debug and vertex debug on non-drawcall actions which have non-zero drawIndex i.e. Indirect draws
2024-11-07 15:23:27 +00:00
baldurk 56976ff4a5 Make missing postvs outputs non-fatal 2024-05-31 15:25:47 +01:00
baldurk 9de4a79859 Update tests to new descriptor interface 2024-04-10 18:58:52 +01:00
Jake Turner 7934d1d16e Change DebugPixel() to take a DebugShaderInputs struct
DebugShaderInputs struct contains existing the parameters:

sample
primitive

and a new parameter

view

Default constructor for DebugShaderInputs sets the parameters to NoPreference (~0U).
2024-03-13 07:58:48 +00:00
Jake Turner b835a4cbad Abs x,y for pixel history in Iter_Test python script
Prevents exceptions about uint32_t overflow if negative x or y is used
2023-10-02 09:06:08 +01:00
baldurk f3fd33defb Always run drawcall overlay in tests
* Ideally we would also include mesh output here, but we would need a way to
  clear the postvs cache every so often to avoid bloating, otherwise it will
  generate too much data iterating the whole capture.
2022-12-05 11:02:59 +00:00
baldurk 7aac39613c Check mesh output and overlays in Iter_Test 2022-12-05 10:00:35 +00:00
Shahbaz Youssefi ed4c3756d0 Enable primitive restart for list topologies
This is supported by OpenGL, and on Vulkan with
VK_EXT_primitive_topology_list_restart.  On Vulkan, all drivers are
known to support this even without
VK_EXT_primitive_topology_list_restart.  On D3D, primitive restart is
only supported for strip topologies.

Previously, RenderDoc specifically disabled primitive restart for
non-strip topologies.  In this change, that is no longer done.  If the
app enables primitive restart, so will RenderDoc behave accordingly.  It
would be the responsibility of the app to avoid primitive restart if the
API doesn't allow it.
2022-08-29 14:59:14 +01:00
baldurk a1b5f01159 Fix tests with references to removed properties 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 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 5aadf1d649 Fix Iter_Test invalid python tuple use 2021-01-25 12:21:22 +00:00
baldurk f45bdcb49a Fix Iter_Test and Repeat_Load for newest python API 2021-01-22 13:24:48 +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 eb967af9d4 Add missing added parameter to tests calling DebugVertex 2020-10-29 10:34:24 +00:00
baldurk 4809615a8f Don't print hit information until we know it's a drawcall 2020-09-17 15:05:21 +01:00
baldurk b540f631ab Don't overwrite idx variable with loop iterator 2020-07-21 19:57:09 +01:00
baldurk 1316dbc65b When iterating captures, don't compare outputs that are uninitialised 2020-07-16 20:45:20 +01:00
baldurk 08a3d05e71 Explicitly note which modifications in pixel history are unavailable 2020-07-16 20:39:25 +01:00
baldurk 4add5bfbf5 Don't make failure to debug a fatal error
* On vulkan for example not all shaders can currently be debugged
2020-06-05 17:35:36 +01:00
baldurk ae38a10299 Fix Iter_Test 2020-06-01 21:54:43 +01:00
baldurk cb0754969f Compare UInt/SInt values appropriately when checking debugged outputs 2020-05-20 11:20:30 +01:00
baldurk 47f2fa8b93 Don't apply restart index if primitive restart is disabled 2020-05-20 11:20:13 +01:00
baldurk bfcc484a7c Add tests of drawcall variants 2020-05-12 19:04:57 +01:00
baldurk c6a1a23adb Remove mismatched end_section when skipping unsupported capture 2020-03-06 17:56:28 +00:00
baldurk 2a29054e46 Fix config values for Iter_Test 2020-03-06 17:56:28 +00:00
baldurk 7e9b6ff70f Check vertex debugging results in Iter_Test
* Also never hard error on debug results, just print an error message for manual
  evaluation
2020-03-02 17:37:23 +00:00
baldurk 914dc88cd0 Pass signature index in source variable mapping, not builtin
* The builtin is more directly useful but the signature index allows us to match
  up inputs and outputs that don't have a builtin meaning (pure interpolators).
2020-02-25 18:19:52 +00:00
baldurk b756423a8d Fix Iter_Test for new DebugVertex signature 2020-02-21 17:56:52 +00:00
baldurk 83d77ea543 Improve formatting of Iter_Test output 2020-02-18 19:18:51 +00:00
baldurk 40f4879496 Make debug pixel comparison epsilon slightly more forgiving 2020-02-06 17:58:42 +00:00
baldurk 511f82d897 Don't try to pixel debug for verifying depth output 2020-02-06 17:58:42 +00:00
baldurk c2e180ea28 Skip pixel debugging comparison in Iter_Test when writes are masked out 2020-02-06 17:58:42 +00:00
baldurk e012c82168 Update tests to use new interfaces 2020-02-06 17:58:42 +00:00
baldurk b34c325f24 Make Iter_test.py load-and-runnable in the UI without breaking autotests 2020-01-14 18:02:10 +00:00
baldurk db563bb0bf Refactor public interface around handling of textures
* Subresource handling is more consistent - we pass around a struct now that
  contains the array slice, mip level, and sample. We remove the concept of
  'MSAA textures count samples as extra slices within the real slices' and
  internalise that completely. This also means we have a consistent set
  everywhere that we need to refer to a subresource.
* Functions that used to be in the ReplayOutput and use a couple of implicit
  parameters from the texture viewer configuration are now in the
  ReplayController and take them explicitly. This includes GetMinMax,
  GetHistogram, and PickPixel.
* Since these functions aren't ReplayOutput relative, if you want to decode the
  custom shader texture or the overlay texture you need to pass that ID
  directly.
2019-11-26 17:38:25 +00:00
baldurk c67995b85a Make it easier to run tests from within UI 2019-09-20 11:20:45 +01:00
baldurk 0b276673b6 Pick random target to pixeldebug in Iter_Test
* We also make sure that if we go back to a previous event to debug, that we
  look up the right output corresponding to where it's bound there (since it
  might be bound to a different slot).
2019-09-16 18:34:23 +01:00
baldurk e9cf36800b Check that debugged value matches shader output in Iter_Test 2019-07-25 15:14:43 +01:00
baldurk 9e2ce0077a Use documented variables for Iter_Test action chances 2019-07-25 15:13:19 +01:00
baldurk 72880a8f07 Print how far through the Iter_Test we are at each step 2019-04-24 13:48:48 +01:00
baldurk a9151a8c0b Add testing framework useful for automated testing
* Built entirely independently of the main renderdoc build (for now).
* Contains python scripts & framework for running tests on a renderdoc build,
  which will be run nightly.
2018-11-29 14:47:20 +00:00