Commit Graph

2516 Commits

Author SHA1 Message Date
baldurk 43fa3cd94b Use BufferViewer for viewing constant buffers
* Unifying these views means that constant buffers have all the same
  reformatting and it avoids having multiple paths for what is now effectively
  the same control (a buffer can either have fixed data, repeating data, or
  both)
2022-05-20 14:15:30 +01:00
baldurk fcdcc9714b Implement export options for fixed items in buffer view 2022-05-20 13:37:27 +01:00
baldurk a36516c8a5 Explicitly handle unbounded arrays and display declared fixed vars
* GL and Vulkan allow buffers to have fixed variables before a trailing AoS
  unbounded array. These fixed variables can't be easily displayed in a table
  and previously we skipped them. Now we display these in a tree format.
* We also support formats which don't have an unbounded array at all and display
  these just with the tree. This will allow the BufferViewer to subsume the
  capabilities of the ConstantBufferPreviewer (though it needs to handle opaque
  non-buffer-backed variables, and slot-following).
2022-05-20 13:37:26 +01:00
baldurk d0720fe787 Allow a [[pad]] annotation to specify padding elements
* These elements are consumed but not shown, so the offsets of subsequent
  elements still act as if they're there. This may be more convenient than
  specifying a manual offset on the next element or a struct size.
2022-05-20 13:37:26 +01:00
baldurk ac886728ca Don't use docking UI for raw buffer viewer mode 2022-05-20 13:37:26 +01:00
baldurk d2bbf76479 Fix struct declaration order when multiple structs use a common struct 2022-05-20 13:37:26 +01:00
baldurk 97a3943cdd Use packing rules when generating format strings for structs
* This allows the calling code to pass a hint of what packing is known or likely
  to be used, meaning less generated manual offsetting/padding when the implicit
  rules cover it.
2022-05-20 13:37:26 +01:00
baldurk 4dc7b3f8b7 Process packing rules when parsing formatting strings
* Instead of having a global tight/non-tight we now let the format string
  specify the packing rules (defaulting to scalar - i.e. tight packing as
  before), and use the resulting properties to calculate packing.
2022-05-20 13:37:26 +01:00
baldurk 7abe72be6b Add a function to estimate packing rules based on members
* This is primarily for GL/VK where the packing rules are not pre-defined and
  are also not explicitly reflected, so we instead see what rules are broken
  along the way to get the most conservative ruleset we can (that way minimising
  the need for manual offset decorations)
2022-05-20 13:37:26 +01:00
baldurk 43fda618f3 Add a packing rules struct to contain important packing rules
* There are several different API packing rulesets - GL has std140 and std430
  (and packed/shared, which is implementation defined but is likely to be
  similar to one of these or more conservative), VK effectively has rules for
  those both, as well as scalar packing which is close to C packing. D3D has one
  ruleset for cbuffer packing similar to std140, and effectively scalar for
  structured resources.
* These rulesets are quite similar and only differ by the properties here. There
  is one exception in the handling of empty structs - but in GLSL these are
  illegal so we will take the HLSL interpretation and always treat them as 0
  bytes.
2022-05-20 13:37:26 +01:00
baldurk cee4b25b28 Allow specifying offsets and struct strides manually with offsets
* Use these when generating buffer formatter strings instead of declaring manual
  padding variables.
2022-05-20 13:37:26 +01:00
baldurk 91f530f039 Parse out annotation name and parameter explicitly 2022-05-20 13:37:26 +01:00
baldurk a42f9edc3a Add annotation for binary view 2022-05-20 13:37:26 +01:00
baldurk 0890afd70e Specify rgb, hex, unorm/snorm and format packing as annotations 2022-05-20 13:37:26 +01:00
baldurk 01d9c6698b Add flags for format-intepreted packed types 2022-05-20 13:37:26 +01:00
baldurk cb49f21f2a Support enums in buffer formatter 2022-05-20 13:37:26 +01:00
baldurk 2399c9d136 Add support for bitfield packing in the buffer viewer formatting 2022-05-20 13:37:25 +01:00
baldurk cef00a102b Add struct VarType and combine flags into single field
* This is not a space saving right now, but allows more flags to be added
  without adding more storage.
2022-05-20 13:37:25 +01:00
baldurk 2fc0866c9f Fix display of register names for matrix source variables 2022-05-09 11:32:11 +01:00
baldurk 8d34ea577d Add some missing tooltips for event browser location buttons 2022-05-06 13:17:09 +01:00
baldurk e5000ff91b Handle source variables that map to non-existant debug variables 2022-05-04 15:47:04 +01:00
baldurk d9c98f44f6 Fix stepping backwards working incorrectly with multiple location maps 2022-04-28 16:34:44 +01:00
baldurk 8aa0390948 Add string messages to returned result codes to display to user
* Most of the main entry points that can fail with relevant reasons now has a
  way of specifying a message to return with it. This message can be displayed
  to the user to give more information or context about an error.
2022-04-26 16:21:54 +01:00
baldurk 10dd4c194c Update some tips that are out of date 2022-04-26 16:21:35 +01:00
Tatsuyuki Ishi 3d4cd457bd foz: Encode sampleMask as array 2022-04-25 14:17:12 +01:00
Tatsuyuki Ishi b0ff54fbcf foz: Reconstruct specialization constants with correct layout 2022-04-25 14:17:12 +01:00
Tatsuyuki Ishi a2d77f58db foz: Rename dynamic rendering colorAttachmentFormats 2022-04-25 14:17:12 +01:00
baldurk 1ae2afc05a Apply shader prefix even if encoding is directly accepted. Closes #2561
* The prefix, if available, must always be applied for custom shaders to compile
  correctly.
2022-04-22 12:55:40 +01:00
baldurk 1201d47db4 Fix tooltips for sampler variables in shader debugger 2022-04-21 00:58:15 +01:00
baldurk 0c672aff22 Set the conservative raster state display properly on vulkan 2022-04-19 12:51:26 +01:00
baldurk dee3c37d90 Fix some edge cases when handling unsaved captures. Closes #2554
* The 'no to all' option should always be present if there are multiple unsaved
  captures across the connections, even if the current connection only has one
  capture and so otherwise wouldn't have a 'no to all' option.
* The 'no to all' option will always discard all unsaved captures in all
  connections when closing the window, if the user clicks no on the confirmation
  of this, abort the close operation entirely and let them decide how to handle
  it (e.g. discarding/saving captures in connections individually).
2022-04-18 17:06:44 +01:00
baldurk 26585e9a1b Fix arrayed resource bindings shader debug variables. Closes #2550 2022-04-18 17:06:44 +01:00
baldurk 4c7d59c008 Update toolwindowmanager to 299471d 2022-04-11 13:13:21 +01:00
baldurk be38f45171 Fix handling of split-register matrix source variables. Closes #2536 2022-04-11 12:57:10 +01:00
baldurk 9c1eeed29b Fix copy-paste error with GLSL unsigned integer texture declarations 2022-03-30 12:51:36 +01:00
baldurk 378cad24bd Fix some missing comments in custom shader snippet generation 2022-03-30 12:48:38 +01:00
Benoit Dumesnil dfd00b1e38 Add support for shader model 6.6 bindless resources. 2022-03-21 11:30:47 +00:00
baldurk f4d9cf2b7e Fix UAV slot matching for D3D11 with merged UAV/RTV bindings 2022-03-17 18:10:05 +00:00
baldurk ad9a4e854f Fix to bizarre CI failure
* For some reason using != on these QSet<QString> fails in release only on
  github's CI only. I don't know what is broken on their runners but this
  workaround fixes it.
2022-03-09 03:02:13 +00:00
baldurk a265a8363d Compile fixes 2022-03-08 18:32:31 +00:00
baldurk 7b4f535663 Refactor watch variables to support complex types including structs 2022-03-07 18:45:57 +00:00
baldurk b0db52c80b Show variable context menu for constants panel as well 2022-03-07 14:45:44 +00:00
baldurk 26de305e1a Allow adding a watch for any text selection 2022-03-07 14:45:44 +00:00
baldurk 8e76069ecf Switch watch variables control from table to tree widget
* This will allow watching structs or arrays
2022-03-07 14:45:44 +00:00
baldurk 3af7458763 Continue to show last value of a watch variable when it's not available 2022-03-07 14:45:44 +00:00
baldurk 87f2adc829 Improve mapping of source locations to instructions in shader debugging 2022-03-07 14:45:44 +00:00
Jake Turner 949aaa2c0a Guard XCode project generation specific settings 2022-02-19 11:17:33 +00:00
baldurk 08e7a55732 Fix potential crash internally to Qt when removing tree widget items 2022-02-19 10:24:33 +00:00
baldurk fcdea67879 Update copyright years to 2022 2022-02-17 17:38:32 +00:00
Jake Turner ce36cc340f CMake files base setup for Metal 2022-02-17 14:06:28 +00:00