Commit Graph

10161 Commits

Author SHA1 Message Date
baldurk fe30fa91fb Fix python binding consistency with wrong naming scheme 2020-02-06 19:10:43 +00:00
baldurk 40f4879496 Make debug pixel comparison epsilon slightly more forgiving 2020-02-06 17:58:42 +00:00
baldurk 1b29d0d69c Respect interpolation modes on PS inputs when gathering debug data 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 9436dbf8c3 Fix sampling program source for ld_ms sampling 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 95ef40fe7c Add builtin to SourceVariableMapping 2020-02-06 17:58:42 +00:00
baldurk 661ee35f30 Refactor ShaderDebugTrace to not return a single list of complete states
* The ShaderDebugTrace now only sets up the initial state of an opaque
  ShaderDebugger handle.
* This handle can then be passed to a new function - ContinueDebug - to
  iteratively return N more states. The number of states is implementation
  defined and may be a fixed number or it may run for a fixed time.
* The states themselves no longer contain a complete snapshot of all variables,
  but instead only the changed variables for that iteration. The changes are
  stored as before and after value to make it easier to step forwards and
  backwards (only the ShaderDebugState is needed to move forward or backwards,
  you don't have to search back for the last set value of a variable to 'undo' a
  change).
2020-02-06 17:58:42 +00:00
baldurk fa9289c372 Remove dependency of DXBCDebug::State on ShaderDebugTrace
* This means the quad doesn't have a trace per thread. All per-thread data is in
  the State itself, and anything that's not per-thread is in the GlobalState.
2020-02-06 17:58:41 +00:00
baldurk c037aac6b3 Rename ShaderDebug namespace to DXBCDebug 2020-02-06 17:58:41 +00:00
baldurk 410f9d86bd Remove register/HLSL handling from shader viewer, work agnostically
* The shader viewer shouldn't handle specifics of D3D bytecode, instead it now
  works generally with whatever the debug and source variables are.
* VarType::Unknown is used for D3D registers which are typeless.
2020-02-06 17:58:41 +00:00
baldurk fdb6617cb1 Pass back 'registers' for resource bindings in debug trace 2020-02-06 17:58:41 +00:00
baldurk 0e0ff8714c Add fake source-mapping information for constants in debug traces
* cbuffer and input registers no longer have any names elided into them, they
  are 'raw' registers. The source mapping provides the information of where they
  come from as best as possible.
* Since we're now using source-mapping for constants, fix some source mapping
  issues with arrays, nested structs/arrays, and matrix major-ness.
2020-02-06 17:58:41 +00:00
baldurk 66cebe0a4c Refactor shader debug trace to have single mutable variable array
* Moving away from 'registers' explicitly being stored, we now have a single
  variable array where the shader representation is responsible for allocating
  it.
* In DXBC we calculate the number of each type of mutable variable (temps,
  indexable temps, and outputs) and assign slots linearly.
* We also update some naming - high-level variables aren't "locals" since they
  could be globals too, and debugging variables aren't "registers" but simply
  the variables we use for debugging which may be more complex than float4 for
  other APIs.
* The local variable matching by string name is unnecessary for this change
  but will be more useful in future after further refactors where there isn't
  a single list of variables to index into at the upper level.
2020-02-06 17:58:41 +00:00
baldurk 2294b988ba Move some DXBC helper functions to global scope and use normal ToStr() 2020-02-06 17:58:41 +00:00
baldurk 01461db738 Store mapping from instruction to disassembly line in shader debug trace
* This avoids having the UI need to do a scan and expecting to find
  "instruction:" on the start of a line.
* We also move the callstack to be stored per-step, and not in the line info
  mapping.
2020-02-06 17:58:41 +00:00
baldurk 14c1af06a3 Make ShaderViewer::ensureLineScrolled more conservative 2020-02-06 17:58:41 +00:00
baldurk c9b96421ae Always overwrite shader files with #line-expanded source
* Otherwise a plain #line that only changes the line number and not the file
  won't be expanded properly
2020-02-06 17:58:41 +00:00
baldurk 796f5ab328 Make sure scintilla margin is updated when text is updated 2020-02-06 17:58:41 +00:00
Rémi Palandri 007118ab98 force-stop non-JDWP applications at launch time 2020-02-06 00:41:37 +00:00
Rémi Palandri 8356b67c0a use process name instead of package name for android 2020-02-06 00:41:37 +00:00
baldurk 380e7715ac Fix check for queue family index 2020-02-05 22:56:51 +00:00
baldurk bb6557c237 Allocate more bits for aspectMask in packed image subresource range 2020-02-05 19:46:50 +00:00
baldurk 4d205eb818 Handle ASPECT_COLOR_BIT used with multi-plane formats. Closes #1708
* This is spec'd as a simple alias for all planes, useful for creating image
  views.
2020-02-05 19:46:24 +00:00
baldurk 5dc69969bb If we didn't get a queue, fetch the reserved one. Closes #1711
* If we didn't get any queue at all in our queue family then we can safely pick
  the first queue as we would have done anyway.
2020-02-05 19:45:08 +00:00
baldurk 530d7fbc12 Don't try to render triangle size for line or point draws 2020-02-05 15:17:46 +00:00
baldurk 08c0b13aaa Add further checks for windows being deleted during long async callbacks
* This is not really a full solution but fixes the common cases at least.
2020-02-05 15:06:53 +00:00
baldurk bf92f9adf0 Fix a crash loading a completely empty capture on D3D11 2020-02-05 14:39:37 +00:00
baldurk d3cbc6aadb Handle invalid filenames passed to CopyCaptureToRemote 2020-02-05 14:15:10 +00:00
baldurk dd3c63e8ca Add resource usage for CPU writes to resources 2020-02-05 13:53:59 +00:00
baldurk 6c974fd026 Add missing downsampling in non-FOURCC format strings 2020-02-05 11:09:51 +00:00
baldurk 42f8f83dbc Fix YUVA plane parameters for 3-plane format. Closes #1710 2020-02-05 11:09:51 +00:00
Steve Karolewics 67457bd784 Add a test for D3D12 shader debugging
This mimics the D3D11 shader debugging test, but performs the draws
twice - once with SM 5.0 and once with SM 5.1. The python test performs
the same checks as the D3D11 version, but is explicitly disabled since
D3D12 shader debugging is not yet enabled by default.
2020-02-04 19:11:17 +00:00
Steve Karolewics bd04112dd4 Add a non-shader-visible heap to D3D12ViewCreator for clearing UAVs 2020-02-04 19:11:17 +00:00
baldurk da3bd8dbcb Don't try to serialise attachments in imageless framebuffer 2020-02-04 12:19:55 +00:00
baldurk 58ea347ad1 Don't pass parent struct ID for multidimensional arrays in SPIR-V 2020-02-04 12:19:44 +00:00
baldurk dc8131f49f Fix compilation 2020-02-03 21:51:38 +00:00
baldurk edbedd4484 Try to handle no shared memory types between external & normal resources
* This cannot be replayed, as the memory type selected will be invalid on replay
  for the buffer. However this lets us at least capture and if the buffer is
  destroyed or not used in the capture, the capture would succeed, so it's at
  least no worse.
2020-02-03 21:10:26 +00:00
baldurk bb43ba45e3 Add test of newer resource creation methods in D3D12.4 2020-02-03 18:18:17 +00:00
baldurk 8bc4e4c719 Test that imageless framebuffer parameters are properly ignored
* This is kind of what VK_Parameter_Zoo is intended to test, but I don't want to
  add conditional extension tests in there unless there's nowhere else to put
  it, since it adds mental overhead to reading the code.
2020-02-03 18:18:17 +00:00
baldurk f427a7ce02 Test that repeated redundant calls for spin-sync aren't serialised
* If the application is calling e.g. vkGetFenceStatus() in a loop we don't want
  to serialise every call.
2020-02-03 18:18:17 +00:00
baldurk 3c61c01ba7 Don't allow buffers to be destroyed during D3D12 capture
* We need to make sure we can still look up GPU addresses for buffers that were
  destroyed during the frame, otherwise we might get the wrong contents for
  descriptors.
2020-02-03 18:18:17 +00:00
baldurk d7b61176c5 Don't save every queue creation in D3D12 device record
* Otherwise we try to create every queue that has ever existed on replay.
* Check for resource leaks in Resource_Lifetimes tests.
2020-02-03 18:18:17 +00:00
baldurk c3b6b6890e Add tests that shader ISA disasm works, including live driver output 2020-02-03 18:18:17 +00:00
baldurk 4df8ce7a02 Test VK_EXT_tooling_info in VK_Parameter_Zoo not VK_Simple_Triangle
* Keep the simple triangle really the bare minimum.
2020-02-03 18:18:17 +00:00
baldurk f18cf01671 test optional EXT_transform_feedback parameters in VK_Parameter_Zoo 2020-02-03 18:18:17 +00:00
baldurk d326d61b1e Add D3D12_Parameter_Zoo test to check edge-case parameters/interfaces 2020-02-03 18:18:17 +00:00
baldurk 09be5f4047 Fix structured export/import of initial states resource contents on GL 2020-02-03 18:18:16 +00:00
baldurk 26ed01ec8a Ensure that queue used in vkQueuePresentKHR is referenced 2020-02-03 18:18:16 +00:00