Commit Graph

10181 Commits

Author SHA1 Message Date
baldurk 5977c2ef37 Fix compilation 2020-02-13 12:45:51 +00:00
baldurk 7d4685fc17 Fix exception catch-and-rethrow in extension BlockInvoke. Closes #1721 2020-02-13 11:01:45 +00:00
baldurk 5e6ec417c1 Add a global font scale option in settings window
* This lets the user override the default application font.
* Unfortunately Qt seems to behave inconsistently with font scaling from the
  system, so we take the font size initially from QApplication::font() (which
  doesn't always pick up the font size) and scale from there. While this might
  cause some font scaling to be lost it does mean at least we have a consistent
  scale, as otherwise you get some text scaling and others not.
2020-02-13 11:01:45 +00:00
baldurk ce96d120a4 Fix loop condition in diverging workgroup debug 2020-02-13 11:01:45 +00:00
baldurk baa058a7e8 Add some safety checks of edge case problems 2020-02-13 11:01:45 +00:00
baldurk 56cfd25849 Fix check for EXT_buffer_device_address 2020-02-13 11:01:45 +00:00
baldurk 69a82202e5 Remove redundant/tautological checks 2020-02-13 11:01:45 +00:00
baldurk 9c091cf791 Fix memory leak in error case 2020-02-13 11:01:44 +00:00
Steve Karolewics dd69f8642a Add APIProperties for debugging and pixel history
Checks to enable debugging and pixel history are gated by the
APIProperties instead of whether the capture is D3D11. Shader
debugging for D3D12 is gated on a config option, which can be enabled
by adding "d3d12ShaderDebugging": "true" to the ConfigSettings
2020-02-12 21:58:33 +00:00
baldurk 7076e9d451 Fix handling of awful EXT_debug_marker/KHR_debug inconsistency 2020-02-11 18:15:33 +00:00
baldurk 06570ea7ad Remove backbuffer comparisons from test suite, simplify default triangle
* It's not particularly scalable and can be brittle to driver changes, and we
  can use targeted specific pixel tests to check what we really want - to see if
  the output has rendered correctly.
* Overlay tests still check files directly - this is a future refactor to
  remove.
2020-02-11 17:11:33 +00:00
baldurk f121b05fda Fix check for depth in MSAA <-> Array copies 2020-02-11 17:11:32 +00:00
baldurk 3e7273121f Fix numRows calculation in D3D12 texture zoo 2020-02-11 17:11:32 +00:00
baldurk a70be5bd98 Add missing sync in D3D12_Parameter_Zoo test 2020-02-11 17:11:32 +00:00
baldurk 76a88cc7a3 Add test of D3D12 render passes 2020-02-11 17:11:32 +00:00
baldurk 1a088db6ff Don't try to clear block/YUV textures for vulkan initial states 2020-02-11 17:11:09 +00:00
Steve Karolewics e154470fe9 Fix constant buffer array debugging with reflection info stripped 2020-02-11 17:10:57 +00:00
Steve Karolewics 671add4035 Fix shader debugging and pipeline viewer with constant buffer arrays
With SM5.1 and D3D12, constant buffer arrays can be declared which
are treated as an array of resources on the shader side, and a simple
collection of descriptors on the D3D12 side. DXBCDebug::GlobalState
handles the bridge between these by storing each array resource as a
nested ShaderVariable struct. Accessing the data for instructions
traverses the structure similarly. The shader viewer handles nested
resources and displays them in the appropriate tree view. In the
pipeline viewer, descriptors for CB arrays now indicate the array
index and correctly handle buffer offsets for viewing.
2020-02-11 17:10:57 +00:00
Steve Karolewics 392d362ee8 Add a D3D12 test to exercise various resource mapping scenarios 2020-02-11 17:10:57 +00:00
Steve Karolewics ad69e791ad Add CBV support to D3D12ViewCreator 2020-02-11 17:10:57 +00:00
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