Commit Graph
75 Commits
Author SHA1 Message Date
baldurk c7c9d79ceb Add indirect patching of shader records for indirect ray dispatch
* We use a worst-case estimate of how much scratch buffer space will be needed
  as there's no way to know beforehand on the CPU.
2024-06-13 13:33:06 +01:00
baldurk cfc5204a69 Don't require dxc for compiling RT patching shaders
* We do some manual uint64 emulation with uint2 which compiles on fxc, re-used
  from the execute indirect patching.
2024-04-30 18:28:33 +01:00
Jake Turner c1458fc420 Fix handling of UScaled, SScaled in DecodeFormattedComponents
Only UInt and SInt data is stored in integer representation in return from DecodePixelData
2024-04-01 18:57:25 +01:00
Jake Turner dbee567300 Added DecodePixelData helper function
Moved from D3D12 Pixel History to common code to share with Vullkan Pixel History.

Similar to DecodeFormattedComponents() but it keeps UInt, SInt component data as uint, int.
DecodeFormattedComponents() now calls DecodePixelData() and then casts the uint, int data to float for UInt, SInt component data.
2024-03-26 09:19:37 +00:00
baldurk 9f4f0e6aa1 Update copyright years to 2024 2024-02-12 11:04:52 +00:00
baldurk 9d39b8e1a8 Reformat code for clang-format 15 2023-09-05 11:02:08 +01:00
baldurk d47e79ae07 Update copyright years to 2023 2023-02-01 12:23:32 +00:00
baldurk 2a519bbe70 Use fabs for floating point abs 2022-08-11 15:13:58 +01:00
Nicola CeroneandBaldur Karlsson 43462ea3c9 Fix arcball navigation by updating the basis matrix. 2022-07-20 10:38:38 +01:00
baldurk 9603f5a925 Pre-compile shaders for math and sampling opcodes during shader debug
* D3D12 math shader was already precompiled, but on D3D11 we now allocate
  everything up front and on D3D12 we also up-front compile sampling.
* The only exception is const offsets which can't be variable, so we cache these
  (likely we'll only see a few variants per shader/capture) and create them on
  demand.
2022-06-30 13:51:27 +01:00
baldurk fcdea67879 Update copyright years to 2022 2022-02-17 17:38:32 +00:00
John KattukudiyilandBaldur Karlsson 5ed073f395 address PR feedback
- create AxisMapping struct and fix camera location issue
- add more detail to axis mapping error message
- fix other minor issues
2021-11-08 11:39:28 +00:00
baldurk f80b5ce62a Fix texel read/write to respect format conversion when debugging shaders 2021-10-04 19:22:52 +01:00
baldurk 44eee83aa2 Fix some differences with DXC's disassembly
* We also add an option to tweak our disassembly output to be more easily
  compared with dxc's
2021-09-09 12:35:19 +01:00
baldurk a2da75c6dd Implement emulated depth readbacks on GL. Closes #2336 2021-08-10 15:38:45 +01:00
baldurk aa0be4ee47 Fix unit test expectations for proper truncated components 2021-04-23 20:33:43 +01:00
baldurk e78a48bfc3 Implement proper out-of-bounds value filling for vulkan post-vs fetch 2021-04-23 19:07:31 +01:00
baldurk 026da176bb Update copyright years to 2021 2021-01-13 13:56:10 +00:00
baldurk 0b0beb3a20 Call virtual functions by explicit class in constructor 2020-08-20 16:11:05 +01:00
baldurk 81fbf4bcc9 Fix some dodgy memcpy calls 2020-08-20 16:11:05 +01:00
baldurk ec6627af03 Use our own isinf/isnan over compiler provided ones that are unreliable
* Due to standards nonsense the availability of isinf/isnan in C++ is quite
  complex and varies a lot between compilers. Trying to access them reliably is
  quite brittle and they're easy to implement with bit-inspection of float
  patterns, so we do that instead.
2020-07-14 13:24:36 +01:00
baldurk 0d026a43d6 Remove CompType::Double
* This is a leftover artifact from before we had general extended type support
  and double was the only non-32 bit type we handled. Now we support most type
  formats so doubles are just CompType::Float with 8 byte width
2020-07-12 10:52:10 +01:00
baldurk 6fcd34dd0d Add missing cast to Vec4u 2020-06-03 18:41:11 +01:00
baldurk 45d15596de Make glGetTexImage blit fallback support more robust. Closes #1907 2020-05-25 16:27:53 +01:00
baldurk e17532c4ed Fix decoding of integer vertex attributes 2020-05-21 17:53:37 +01:00
baldurk 960f0b53eb Add missing include. Closes #1896 2020-05-19 09:38:03 +01:00
baldurk cf039acadc When possible with image viewer, manually unpack unsupported formats
* This is similar to the remapping the replay proxy does, and should support
  most non-compressed formats.
2020-05-18 13:21:55 +01:00
baldurk f622ac36d6 Standardise layout of packed texture formats on disk/network
* We preserve each API's interpretation of bit order for packed formats like
  RGBA4 or R5G6B5 when displaying the raw data in the UI, but when we need to
  proxy it or save to disk, we always transform to D3D's order as standard.
* This allows us to proxy them reliably because we always have a standard bit
  order and APIs that need a different order transform when fetching data to the
  standard format, or setting proxy data from the standard format.
2020-05-18 13:21:55 +01:00
baldurk 1db2947c86 Drop constexpr to work around gcc 5 compiler bug 2020-04-15 21:29:19 +01:00
baldurk c3a5d99bc0 Add support for matrix operations (transpose/determinant/inverse) 2020-04-15 20:33:57 +01:00
baldurk 1690d30621 Fix handling of w in Vec4 operators 2020-04-07 18:34:15 +01:00
baldurk fc2181d625 Fetch and apply pixel inputs and derivatives to quad 2020-04-03 17:17:46 +01:00
baldurk 6f2dfc1a2b Add support for non-compressed formats in DDS shell preview 2020-04-01 16:55:58 +01:00
baldurk ad44e4dcb6 Fix ConvertComponents and add some unit tests 2020-03-18 17:34:59 +00:00
baldurk 028364910e Refactor ConvertComponent to ConvertComponents
* This way it can ensure that alpha components aren't sRGB corrected, as well as
  handling BGRA swaps and some common packed formats.
2020-03-17 10:39:11 +00: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 4a779e371b Add bracketing to macro use of parameters 2020-01-21 18:28:56 +00:00
Daniel CraigandBaldur Karlsson b3d15996b2 Add headers required to build windows files without precompiled header 2020-01-13 13:02:46 +00:00
baldurk 7771c4bf1c Add compile fixes for VS2019 2020-01-06 16:25:34 +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 f68645bddc Reduce dependencies pulled in by common.h 2019-12-16 17:06:16 +00:00
baldurk ff08748238 Ensure all files have trailing new-lines and enforce with clang warning 2019-12-02 20:28:05 +00:00
baldurk 78fba8ec57 Fix linux build 2019-09-18 19:33:37 +01:00
baldurk af97e50b3a Implement ConvertToR11G11B10(), add conversion tests 2019-09-18 19:25:11 +01:00
baldurk d4d21ce736 Use texture viewer background color for 'clear before X' overlays 2019-07-11 17:05:58 +01:00
baldurk 11819ed3be Refactor and clean up internal shaders to be better organised
* Split up old uber-cbuffers used for unrelated shaders into shader-specific
  cbuffers (DebugPixelCBufferData -> TexDisplayPSCBuffer / CheckerboardCBuffer /
  MeshPixelCBuffer).
* Split up HLSL files so not everything is lumped into 'debugdisplay.hlsl' but
  has separate files as appropriate.
* Use #include in GLSL and HLSL to better organise shader code together rather
  than relying on lumping files together on the C++ side.
* Renamed files like 'debugcbuffers.h' to 'hlsl_cbuffers.h'.
* Trimmed out some extensions/cruft that isn't needed in the GLSL side since we
  no longer use separable shaders.
* Combine some shaders like Outline/Checkerboard that were similar into central
  place.
2019-02-13 18:50:53 +00:00
baldurk 86ff87863e Update copyright years to 2019 2019-02-01 18:32:13 +00:00
baldurk 62ba684567 Move Vec4u to a global struct next to Vec4f 2018-12-13 23:43:07 +00:00
baldurk 57caf01394 Refactor heatmap for quad overdraw/triangle size to be applied late
* Instead of baking these into the overlay texture and trying to decode them
  afterwards, we instead write a grayscale 16F value into the overlay texture,
  and add a special decode display mode that will use the heatmap and bucketing
  provided.
* This means that saving these overlay textures now saves grayscale. When saving
  to an 8-bit format, we remap to 0-255 so that greater than 1.0 values are
  mapped lower.
2018-11-01 12:23:12 +00:00