Commit Graph

88 Commits

Author SHA1 Message Date
baldurk 9d3f7169ed Add thumbnails to texture tooltips in pipeline state view
* If there would be no tooltip otherwise, it just shows the thumbnail. Otherwise
  any tooltip text (like view parameters or image layout) is displayed below the
  thumbnail
2021-04-20 13:51:41 +01:00
baldurk 270d4e5b07 Add resource usage entries into context menu in pipeline state viewer 2021-04-19 16:44:19 +01:00
baldurk 026da176bb Update copyright years to 2021 2021-01-13 13:56:10 +00:00
baldurk 58e16414e0 Add a number of control functions to the Qt python interface 2020-11-20 17:02:33 +00:00
baldurk 1dc1b4d167 Add some profile markers in common hotspots 2020-11-19 14:47:11 +00:00
baldurk 806187f613 Save and load edited shaders as capture modifications
* When a shader edit is loaded with a capture, it's loaded as "pending" and not
  immediately applied.
2020-10-21 14:14:20 +01:00
baldurk 55c57f7e89 Display stencil values in binary and decimal in tooltips. Closes #2052 2020-10-01 15:56:52 +01:00
baldurk 311dcb989b Default to D3D11 pipeline state at the last minute
* If we default to D3D11 at construction time, if we have persist data (very
  likely) and it's for another API then we'll have to destroy the D3D11 viewer
  and recreate the other API's viewer.
2020-09-04 15:02:04 +01:00
baldurk 7b191861e8 Don't remove replacement when capture is closing
* There's no need, and this can cause races.
2020-07-16 20:39:25 +01:00
baldurk ad10f9ac01 Store shader profile in ShaderCompileFlags for D3D 2020-06-19 14:45:44 +01:00
windog18 d59147ba9d Fixed hlsl cbuffer variable gen bug 2020-06-03 18:40:49 +01:00
windog18 579dec8b4b Solved cbuffer bind issue 2020-05-15 19:02:41 +01:00
baldurk 9ba81634b4 Improve the title of shader edit windows 2020-04-03 15:19:28 +01:00
baldurk 590785c470 Mark edited resources with an (Edited) suffix on their names 2020-04-03 15:19:28 +01:00
baldurk 936e6372cb Remove use of 3rdparty/ prefix from includes
* We instead always have 3rdparty/ in the relevant include search paths and rely
  on that. Each library still has its own unique base dir within 3rdparty to
  clarify where the include is coming from.
2020-03-11 18:00:53 +00:00
baldurk f23d86fb6b Use shader encoding when saving shaders to disk 2020-03-06 17:56:27 +00:00
baldurk a18716e63d Fix crash if no drawcall is selected when exporting pipeline state 2020-03-05 11:15:48 +00:00
baldurk 2916c0f9f7 Update copyright years to 2020 2020-01-06 16:20:45 +00:00
baldurk c4ca8cb1d1 Reduce reliance on big public headers where possible
* Mostly moving includes from common headers to cpp where possible, and removing
  includes of the whole thing where only enums or rdcstr etc are needed.
2019-12-16 17:06:16 +00:00
baldurk ec7a852582 Refactor and improve rdcarray/rdcstr interface
* We are going to replace all std::string/std::vector use with these.
2019-12-16 17:06:15 +00:00
baldurk e205054317 Add UI support for GPU typed pointers in buffers 2019-11-29 13:53:44 +00:00
baldurk b3979262a5 Replace FormatElement with ShaderConstant/ShaderVariableType
* FormatElement is now a static BufferFormatter class to help generate and parse
  buffer formatting strings
2019-11-29 13:53:44 +00:00
baldurk f42cb9e23c Use shader bindpoint mapping when generating HLSL shader editing stubs 2019-11-21 21:25:40 +00:00
baldurk 4458ab3205 Remove assumptions that captures are always frames
* Previously we had "Frame X" and "Start of Frame" hardcoded in the event
  browser, and the end of frame was in many cases assumed to be a present call.
  However with the in-application API this is not necessarily true.
* Presents are now serialised separately in all APIs and displayed wherever they
  happen in the frame, and if there is no present at the end of the frame an
  "End of Capture" marker is inserted. Similarly API-defined captures are not
  given a potentially misleading frame number.
2019-11-21 17:09:01 +00:00
baldurk 2d0b18b18b Don't crash if shader viewer is closed while shader compilation is going 2019-09-02 12:54:08 +01:00
baldurk e525630a17 Add special resource type for A8_UNORM. Closes #1426
* While it's redundant this format is still valid in D3D so needs to be handled
  correctly.
2019-06-25 19:08:07 +01:00
baldurk e48065c96b Replace use of std::pair with rdcpair wherever possible
* Only remaining uses in our code is when we're interacting with std::map where
  it uses std::pair internally
2019-05-17 16:32:56 +01:00
baldurk 4520dcbaa2 Adjust offset used in VB string if there was padding bytes 2019-05-10 23:50:32 +01:00
baldurk 8ffe33767c Handle UNormSRGB in some places that were missing handling 2019-04-23 16:31:18 +01:00
baldurk ee76ed7a4c Sanitise []s out of vertex attribute names when opening buffer viewer 2019-04-05 17:16:16 +01:00
baldurk e9e42839c3 Support specifying structs in buffer formatter. Closes #805
* Structs and arrays-of-structs are completely flattened for the purposes of
  displaying them still.
2019-02-14 12:55:44 +00:00
baldurk bbc2f47fa8 Centralise generation of buffer format strings for struct buffers
* We also fix a number of issues that could cause incorrect formats to be
  generated.
* Test cases added for D3D11/GL/Vulkan to test different struct types. These
  aren't automated at the moment because most of the code they're testing is in
  the UI itself.
2019-02-13 18:50:56 +00:00
baldurk 6bc6ca9557 Drop legacy ShaderRegister struct, store byte offset per constant
* For D3D11 byte offsets are always uint32 aligned, but for other APIs that's
  not guaranteed. Storing a byte offset is strictly more expressive and a lot
  simpler to reason about.
2019-02-07 15:23:06 +00:00
baldurk 86ff87863e Update copyright years to 2019 2019-02-01 18:32:13 +00:00
baldurk 1d0a9926b7 Fix error message referring to incorrect argument 2019-01-24 19:07:46 +00:00
baldurk 68b23c5f62 Add support for YUV resource formats
* We handle 4:4:4, 4:2:2, and 4:2:0, with packed, 2-plane and 3-plane formats,
  for 8, 10, 12, and 16 bit depths.
* This covers most common formats but still leaves a few out - NV11, palettised
  formats, V208/V408 JPG formats.
2018-12-11 19:57:20 +00:00
baldurk 953652b398 Replace . with _ when creating buffer viewer format from input attrs 2018-11-14 18:32:35 +00:00
baldurk eec6efc692 Add default case to switch statement 2018-10-11 12:19:06 +01:00
baldurk b91d19e316 Generate better buffer format strings when opening VB or IB buffer views 2018-10-11 11:09:36 +01:00
baldurk babe36bf7e Preserve stdout/stderr from external shader tools and display to user 2018-08-15 13:40:21 +01:00
baldurk e2c6dc0317 Remove unused function 2018-08-10 18:12:29 +01:00
baldurk 3c7b420e59 Expand SPIR-V disassemblers to general shader processing tools
* Instead of just configuring SPIR-V disassemblers and picking only the first
  one when we need to edit SPIR-V, we allow setting up any shader processor that
  goes between two shader encodings.
* When editing, the default will still be to use embedded source, and then after
  that the first tool that goes from the native shader format to a text format,
  but the drop-down allows you to pick any of them.
* Similarly in the shader viewer you can configure the compilation options and
  method, to choose the compiler you want to use. Embedded command line
  parameters in the shader are automatically appended.
2018-08-09 16:56:53 +01:00
baldurk a81e4a2b45 Pass through and allow different source shader encodings when editing
* This means e.g. the D3D11 back-end can accept DXBC directly if the UI can
  provide it, or compile from HLSL as before.
* More importantly, the Vulkan back-end can take SPIR-V compiled from any
  source, or compile from GLSL as before as a fall-back.
2018-08-09 16:56:52 +01:00
baldurk de59556c3b Don't allow HTML pipeline export with no capture loaded 2018-08-09 16:56:49 +01:00
baldurk e87eacb2a0 Fix switching between pipeline state viewers 2018-06-19 12:38:18 +01:00
baldurk 0dda96a045 Change previous/next/parent IDs in DrawcallDescription to pointers
* This is a legacy holdover from the C# interop not being able to preserve
  pointers easily.
2018-06-18 18:39:06 +01:00
baldurk 14e3a3d360 Move API-agnostic pipeline state wrapper into core interface
* There's no need for this to be in the UI, and moving it allows it to be used
  from script which is very useful.
2018-06-18 18:39:06 +01:00
baldurk 082ab4d75d GUIInvoke takes a QObject* to avoid callbacks after object lifetime
* The GUIInvoke object takes a QObject, and uses QPointer to check that
  it hasn't been deleted when the callback fires. This prevents delayed
  callbacks from executing after the object has been deleted and
  crashing.
* In most cases the pointer is just 'this'.
2018-05-08 11:54:34 +01:00
baldurk 9548f74f16 Only set ShaderEditing analytic bit when saving, not first editing
* This means if someone just clicks to edit but doesn't actually edit,
  won't register as having used the feature.
2018-03-02 14:31:01 +00:00
baldurk ec68f9ec0e Only print real bools as True/False, not anything that can convert 2018-02-02 16:09:25 +00:00