Commit Graph

10258 Commits

Author SHA1 Message Date
baldurk 8102a784bf Update ToolWindowManager to eb4eb70f1 2020-02-25 18:19:52 +00:00
baldurk 8de39dd850 Don't report duplicate GL extensions. Closes #1739 2020-02-25 18:19:52 +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 12e378f04b Add cases for opcodes we explicitly expect not to handle 2020-02-25 18:19:52 +00:00
Steve Karolewics 58227c2214 Add impl of D3D12 vertex shader debugging 2020-02-25 18:19:36 +00:00
baldurk 4673f29da1 Add an error if an unknown global is processed 2020-02-24 18:10:56 +00:00
baldurk d034c91686 Check for supported capability/extensions when debugging 2020-02-24 18:10:56 +00:00
baldurk 0a309f04c2 Handle block-level flow control 2020-02-24 18:10:56 +00:00
baldurk 66931b146a Remove extra margin on replay settings tab 2020-02-24 18:10:56 +00:00
baldurk fd14205d40 Don't refresh current event every ContinueDebug 2020-02-24 18:10:56 +00:00
baldurk 4d6938614e Add a couple of simple operations
* This includes maths, comparison, conversion.
2020-02-24 18:10:56 +00:00
baldurk 0ff541caca Handle scope changes between function calls properly 2020-02-24 18:10:56 +00:00
baldurk fbfd337de9 Fix vector/matrix constants having members added
* Only arrays and structs should have members, vectors and matrices have values
  stored directly
2020-02-24 18:10:56 +00:00
baldurk 55ea78f331 Improve OpDecoder's AddUsedIDs to instead call a callback per-ID
* Also fix handling of opcodes that take a variable number of IDs
2020-02-24 18:10:56 +00:00
baldurk a81d5c78b2 Update ToolWindowManager to 4c47912 2020-02-24 18:10:55 +00:00
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 Karolewics 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 Joeris 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 Karolewics 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