Commit Graph
10393 Commits
Author SHA1 Message Date
baldurk f11e6a067e Fix mapping for arrays when element is selected. Closes #1736 2020-02-24 18:10:55 +00:00
baldurk c05dd34962 Switch back to setPointSizeF for scaling fonts 2020-02-24 18:10:55 +00:00
baldurk 930b688518 Slightly expand margin for testing sleep, to account for OS X 2020-02-24 18:10:55 +00:00
Steve KarolewicsandBaldur Karlsson 3927d82e24 Improve D3D12 compute shader debugging
Added fetching of texture data for UAVs, to allow stores to occur.
Fixed issues with sample/gather when debugging a compute shader.
Added a demo for dispatch in D3D12.
2020-02-24 18:10:43 +00:00
Benson JoerisandBaldur Karlsson 640fc256dd Record MemRefs for every VkDeviceMemory
This fixes an ambiguity between old captures (where missing MemRefs
indicates a lack of information, and we need to act pessimistically), vs
new captures where the memory contents were not accessed (e.g. only
bound to images). Now the latter case will have an explicit MemRefs
entry indicating that the memory was not referenced.

Change-Id: Ib76d56ef6f2e250952412b4cdbe0b2432a4ca0ec
2020-02-24 18:10:30 +00:00
baldurk aacf148201 Add test of creating an empty capture 2020-02-21 17:56:53 +00:00
baldurk 70913fdda5 Add test that GL multi-draw mesh output works with builtins 2020-02-21 17:56:53 +00:00
baldurk db04c797d1 Fix comparisons between single elements and tuples of one element 2020-02-21 17:56:53 +00:00
baldurk 81110ceca3 Fix accidental stomping of relative byte offsets in tests 2020-02-21 17:56:53 +00:00
baldurk e8b342f332 Add event for base of GL multi draw commands 2020-02-21 17:56:53 +00:00
baldurk 4ec8280ee8 Add test of KHR/EXT GL debug marker behaviour 2020-02-21 17:56:53 +00:00
baldurk 4b57eec35d Treat glStringMarkerGREMEDY the same as EXT_debug_marker 2020-02-21 17:56:53 +00:00
baldurk 31e2447db4 Extract out some common code from GL_Simple_Triangle 2020-02-21 17:56:53 +00:00
baldurk 91ede3348c Update API methods for detecting RenderDoc's presence 2020-02-21 17:56:52 +00:00
baldurk b756423a8d Fix Iter_Test for new DebugVertex signature 2020-02-21 17:56:52 +00:00
Steve KarolewicsandBaldur Karlsson c56373ed94 Add impls of GetBuffer/ResourceInfo for D3D12 shader debugging 2020-02-21 17:56:33 +00:00
baldurk 9d3e4dc5e7 Add a deny flag when necessary on tier 1 heap devices 2020-02-20 23:32:33 +00:00
baldurk cf3153f238 Use isinf() instead of finite() 2020-02-20 20:02:49 +00:00
baldurk 6b28d14089 Add source variables for named IDs where possible 2020-02-20 19:07:30 +00:00
baldurk 5ae8fc1ed7 Implement load/store through access chains and composite swizzles
* This is enough for very simple shaders. We add a utility function for setting
  values and handling pointer changes.
2020-02-20 19:07:30 +00:00
baldurk 5fee776a52 Allocate function variables in stack frame, and copy function parameters 2020-02-20 19:07:29 +00:00
baldurk d0ff4f27aa Start iteration of SPIR-V opcodes
* Currently the only flow control we handle is function calls and returns,
  ending the thread when we return from the entry point.
2020-02-20 19:07:29 +00:00
baldurk ffbb9a353a Set up instruction list when parsing SPIR-V 2020-02-20 19:07:29 +00:00
baldurk 013ea145d4 Populate constants in global state for vulkan debugging 2020-02-20 19:07:29 +00:00
baldurk 7f38c690d8 Populate input and output variables in SPIR-V debugging 2020-02-20 19:07:29 +00:00
baldurk b4b100004f Support SPIR-V pointers with our own pointers
* When we need a SPIR-V pointer we box up a real pointer to a ShaderVariable,
  and optionally column/scalar selectors if it's a pointer to a scalar within a
  vector or matrix.
* For globals in opaque storage classes we'll allocate our own ShaderVariables
  so that we can safely keep pointers to them. Otherwise IDs of temporary
  pointers (from OpAccessChain) should always be a strict subset of the lifetime
  of the ID it's pointing to, so we can keep the pointer around. The variables
  don't move and are persistently allocated so they won't be relocated from
  under us (we pre-allocate space for the IDs).
* Before passing back a ShaderVariable to the outside world, we evaluate its
  current value. Thus pointers are presented as if they are just variables that
  happen to update when their parent does.
2020-02-20 19:07:29 +00:00
baldurk c4037e9246 Enable vulkan shader debugging on a hidden config setting 2020-02-20 19:07:29 +00:00
baldurk 5ef3a25f7f Add skeleton of SPIR-V shader debugging class 2020-02-20 19:07:29 +00:00
baldurk c23825292d Remove redundant instOffset/vertOffset parameters from DebugVertex() 2020-02-20 19:07:29 +00:00
baldurk de7f9d8e1c Remove hasSourceMapping from ShaderDebugTrace
* We expect to always have source mapping, from reflection data if nothing else.
2020-02-20 19:07:29 +00:00
baldurk 08e9d9b594 Fix typo - don't apply debug variables expansion to source vars 2020-02-20 19:07:29 +00:00
baldurk 3baedb966e Don't add a value representation for matrix/struct/array debug variables 2020-02-20 19:07:29 +00:00
baldurk b0e4cd6235 Handle matrix registers in shader viewer 2020-02-20 19:07:28 +00:00
baldurk d58691bc16 Standardise debug and source variable naming conventions
* We standardise on definitions: source variable names contain the full path,
  and identify debug variable by full path. Debug variable members only contain
  the child element - so foo doesn't contain members foo[0] or foo.bar, it
  contains [0] or bar. Path walking happens when mapping source variable to
  debug variable.
* This works just as well for DXBC but works much better for SPIR-V where debug
  variables can be more complex.
2020-02-20 19:07:28 +00:00
baldurk 04c335a9ff Move reflection helper functions to spirv_common.h 2020-02-20 19:07:28 +00:00
baldurk 49ad6ddaf6 Move EvaluateConstant to rdcspv::Processor so it can be shared 2020-02-20 19:07:28 +00:00
baldurk 19cb3c7cb3 Move SpecConstant to a common header for re-use 2020-02-20 19:07:28 +00:00
baldurk 18e10457df Store mapping from SPIR-V offset to disassembly line
* This will be used in debugging, but it's easier to store it at the same time
  as we disassemble.
2020-02-20 19:07:28 +00:00
baldurk 44e0269672 Force shader recompile to patch gl_DrawID in GL vertex output fetch 2020-02-20 19:07:28 +00:00
baldurk 2a348c3309 Identify gl_BaseVertex/Instance and gl_DrawID as builtin parameters 2020-02-20 19:06:32 +00:00
Steve KarolewicsandBaldur Karlsson dfbe7fb6bf Remove primitive ID usage from pixel shader debugging when invalid
SV_PrimitiveID is only valid as a pixel shader input if there's either
no geometry shader, or the geometry shader emits SV_PrimitiveID. With
D3D11, the debug layer will complain but rendering will proceed. With
D3D12, the PSO fails to compile. For both APIs, pixel shader debugging
now checks whether this is true, and disables its usage if it isn't.
Added tests for various valid scenarios with SV_PrimitiveID.
2020-02-20 19:06:22 +00:00
baldurk 6f1818e91c Completely disable buggy Rivatuner layer 2020-02-19 21:55:35 +00:00
baldurk 083aeb063a Don't add drawcalls for glCopyBufferSubData from before frame capture 2020-02-19 21:03:51 +00:00
baldurk 1e8c24fa56 Remove debug print 2020-02-19 11:33:51 +00:00
baldurk 579b1893c7 Make sure out-of-order resume replies are processed in JDWP 2020-02-18 23:49:26 +00:00
baldurk 454d03a28e Fix tautological compare 2020-02-18 20:47:57 +00:00
baldurk e7d1d5a3a1 Fix bad index in comparison 2020-02-18 19:34:49 +00:00
baldurk b377d70b1d Add helper function to compare resource/sampler operands by identifier 2020-02-18 19:18:51 +00:00
baldurk 83d77ea543 Improve formatting of Iter_Test output 2020-02-18 19:18:51 +00:00
baldurk f2c401a255 Check that all states are present before allowing any stepping 2020-02-18 19:18:51 +00:00