Commit Graph

10149 Commits

Author SHA1 Message Date
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
baldurk a98a8c49a7 Improve handling of multi-dimensional array input/outputs from shaders 2020-02-03 18:18:16 +00:00
baldurk 850ff5b65d Only promote one push constant range to compute, from vertex
* The spec says that you can only have one push constant range per stage, so
  don't promote all push ranges to compute (as only one will be used in the
  vertex shader).
2020-02-03 18:18:16 +00:00
baldurk 2af2146ad8 Only add captureReplay buffer device flags when capturing
* This means internal buffers we use on replay can still be used even if we
  don't enable capture replay.
2020-02-03 18:18:16 +00:00
baldurk 01fca43ecd Ensure we have buffer device address features turned on when using them
* On replay we enable these for shader feedback even if the capture didn't use
  them, so need to enable the device feature.
2020-02-03 18:18:16 +00:00
baldurk 56fb75ff46 Fix formatting mistake in thread name 2020-02-03 18:18:16 +00:00
Steve Karolewics 1dc4d5b15e Display the demos UI if argv[1] isn't a valid test 2020-02-03 18:18:03 +00:00
Steve Karolewics 9b72d79c06 UI improvements for the demos UI
Made the API filters inclusive, so that if any are checked, only the
selected ones are shown. If none are selected, then all tests are
shown as before. Moved the test name filter to the top pane, so that
it is always visible - before if you scrolled down in the test list,
it would be hidden. Added more room for test descriptions in the bottom
pane - long descriptions were previously truncated.
2020-01-31 20:08:25 +00:00
Steve Karolewics b2150e901f Fix D3D12 sharing test when the adapters used by D3D11/D3D12 differ
D3D11 may default to a different adapter than D3D12. For the sharing
test, both adapters must be D3D12 compatible. Tell D3D11 to use the
adapter that D3D12 is using to ensure compatibility.

Also fixed a memory leak in the test.
2020-01-31 20:08:25 +00:00
Steve Karolewics 2f7b260d39 Try creating a device with successive adapters until one succeeds.
On laptops with integrated+discrete adapters, adapter 0 may not
support D3D12, so a default create device call will fail. Adapters
other than the 0th one need to be specified explicitly.
2020-01-31 20:08:25 +00:00
baldurk 385121d2ca Fix android deadlock on shutdown 2020-01-30 14:34:54 +00:00
baldurk a8071679bd Fix renderdoccmd commands 2020-01-30 14:21:32 +00:00
baldurk b38cbc1b0c Add explicit functions to initialise and shutdown replay. Closes #1685
* It's required for replay applications to call InitialiseReplay() before doing
  any work, and to call ShutdownReplay() once they're finished.
* This lets us do more heavyweight shutdown work before global destructors are
  being invoked and the RenderDoc instance is being destroyed.
* Anything that needs to be shut down during capture still has to happen in
  RenderDoc::~RenderDoc since we obviously can't get the application to call a
  shutdown function in that situation.
2020-01-30 13:39:15 +00:00