Commit Graph
192 Commits
Author SHA1 Message Date
baldurk e744863a06 Ensure annotations aren't deleted early on device lost
* Similar to the structured file, the ownership of these must pass to the dummy
  driver to be kept alive until it's deleted.
2026-08-25 23:20:28 +01:00
Jake Turner e48450cc53 ImageViewer get the Custom Texture Description from the proxy
Use the cached Texture Description for all other Textures which matches the behaviour of GetTextureData()

When saving a texture when a custom visualisation shader is in use:
- fixes a crash when saving as HDR or EXT
- fixes incorrect image saved to DDS
2026-03-13 10:27:41 +00:00
Jake Turner cbecdfacb0 Add new replay API void ReloadShaderDebugInformation() 2026-02-06 11:36:38 +13:00
baldurk 43cde7debd Remove GetLiveID entirely 2026-01-05 22:51:39 +00:00
baldurk 856c838def Update copyright years to 2026 and fix copyright ranges
* In a previous update in 2021 many copyright ranges were truncated
  accidentally, and some files have been copy-pasted with wrong years. These
  dates have been fixed based on git history and original copyright messages.
2026-01-05 14:17:28 +00:00
baldurk ce4edad163 Fix calculation of remapped 3D mips in image viewer. Closes #3697
* For OpenGL we need to remap a 3D block-compressed texture to a 2D array for
  display, when doing so we need to account for the mip size when calculating
  the size of each chunk of data.
2025-09-08 16:35:40 +01:00
baldurk 2322e165de Update copyright years to 2025 2025-03-14 18:54:37 +00:00
baldurk 31d29fcea1 Add python function to clear replay cache 2025-02-21 14:19:12 +00:00
baldurk 3c5ce8a84a Remove unused API function
* Headless windows are used as immutable in tests so allowing resizing is
  unnecessary complication
2025-01-13 11:09:10 +00:00
Honeybunch 3ea9735866 Mesh Shader Debugging 2024-11-20 10:50:14 +00:00
Aras Pranckevicius 0193703037 Refactor: factor out load_exr_from_file
Move all of EXR reading/preparation code into load_exr_from_file,
similar to how load_dds_from_file is done.

ImageViewer::RefreshFile code now uses very similar flow
for both DDS and EXR files (i.e. "what can have mipmaps")
2024-11-04 15:52:30 +00:00
Aras Pranckevicius 02fd7ac0cd Refactor: is_exr_file checks memory buffer
All places that used is_exr_file already had first four bytes
of the file read into memory. So make is_exr_file work just
like is_dds_file does and check those bytes directly, no need
to hit stdio again.
2024-11-04 15:52:30 +00:00
Aras Pranckevicius 6a05176075 EXR: support mipmaps in exr image files
Tiled EXR files can have mipmaps levels. When they do,
and the odd size rounding mode matches what all the
graphics APIs do ("round down"), load them when loading
the exr file. Using the same machinery that the DDS
mipmap loading uses.
2024-11-04 15:52:30 +00:00
Aras Pranckevicius 8917bc5416 Refactor: rename dds_data -> tex_data
And move it out into a tex_data.h header. This is in preparation
for getting mipmaps out of EXR files, where read_dds_data for
that would be a bit confusing.
2024-11-04 15:52:30 +00:00
Aras Pranckevicius 154354f297 EXR: simplify pixel swizzling to RGBA
A tiny bit faster, and I think it is easier to understand too.

Time taken to load 4K video resolution EXR files, on Ryzen 5950X/VS2022:
- FP16 file (27MB): 77ms -> 75ms
- FP32 file (69MB): 118ms -> 113ms
2024-10-31 17:48:45 +00:00
Aras Pranckevicius 0baf7b5f49 EXR: more standard RGBA channel name detection
Various EXR images especially from movie assets do not simply have "R"
etc as channel names; the convention seems to be to have "layer name",
".", "color channel name". For example, channels in EXR might be
"rgb.R", "rgb.G", "rgb.B", which RenderDoc was not detecting previously
and displaying an all-black image.
2024-10-31 11:58:30 +00:00
Aras Pranckevicius 2357c26651 EXR: support tiled images 2024-10-31 11:58:30 +00:00
Arnaud Carré 97ea37d64f typo fix 2024-08-26 11:03:29 +01:00
baldurk af67b951de Ensure descriptor sizes are properly initialised in default pipe state 2024-06-04 10:08:08 +01:00
baldurk 153cd2aa16 Expose queries for descriptor stores and D3D12 root signature range
* This will allow a UI viewer or consumer of the replay API to more easily query
  'all' descriptors for a given store.
2024-04-10 18:58:53 +01:00
baldurk 0284d551ea Switch from specific Attachment structs to using Descriptor for outputs 2024-04-10 18:58:52 +01:00
baldurk d88aad8fc2 Add a query to determine logical identifiers for descriptors
* This is a consideration for any cases where binding numbers are relevant -
  primarily D3D11 and GL - where the offset into an arbitrary (and possibly
  fake) descriptor storage is not helpful but knowing the register binding
  definitely is.
* If someone wants to look at the raw descriptor contents without respect to a
  particular shader access they can use this query to determine a more useful
  'name' for any given descriptor. On D3D11 and GL this gives the register
  number, on Vulkan it gives the binding number (and array element). On D3D12 it
  just repeats the offset effectively.
2024-04-10 18:58:50 +01:00
baldurk b9787606ea Add reported descriptor access from vulkan and D3D12 bindless feedback 2024-04-10 16:31:17 +01:00
baldurk 227842a295 Add a structure and query for reporting descriptor accesses 2024-04-10 15:33:36 +01:00
baldurk b94e6ff90c Add a stubbed out query for pulling descriptor contents out of a store 2024-04-10 15:01:26 +01:00
Jake Turner 7934d1d16e Change DebugPixel() to take a DebugShaderInputs struct
DebugShaderInputs struct contains existing the parameters:

sample
primitive

and a new parameter

view

Default constructor for DebugShaderInputs sets the parameters to NoPreference (~0U).
2024-03-13 07:58:48 +00:00
baldurk 9f4f0e6aa1 Update copyright years to 2024 2024-02-12 11:04:52 +00:00
Jake Turner 788a0ca98f Zero initialize read_dds_data before loading DDS file 2023-08-25 10:20:28 +01:00
baldurk cd897063e3 Make error message more explicit when proxy texture fails to create 2023-08-14 16:37:04 +01:00
baldurk a34f890604 Disallow EXR files that are too large 2023-06-22 13:09:25 +01:00
baldurk 0f851df6c2 Batch prepare and allow limited buffering for vulkan initial states
* We add a capture option that defines a soft limit we aim to keep under for
  memory overhead during capture, excess initial states after that will be
  stored temporarily on disk.
2023-06-02 18:53:45 +01:00
baldurk d47e79ae07 Update copyright years to 2023 2023-02-01 12:23:32 +00:00
baldurk 4103f6a545 Properly zero initialise DDS return structure 2022-04-28 11:39:11 +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 fcdea67879 Update copyright years to 2022 2022-02-17 17:38:32 +00:00
baldurk 3ac4bd0ebd Refactor custom shaders to abstract binding differences. Closes #2458
* Newly written shaders and any updated shaders can now use pre-defined macros
  to abstract away binding differences between APIs, so custom shaders will be
  more portable in particular shaders written in HLSL for D3D or GLSL on OpenGL
  won't break on vulkan because they refer to incorrect binds.
2022-01-31 19:14:08 +00:00
Mikkel Gjoel 90cad57410 ApplyCustomShader accepts TextureDisplay instead of extracted data 2021-11-01 11:49:05 +00:00
baldurk c24dd2e7aa Use shader stage to properly disambiguate entry points on vulkan
* It's possible to have two entry points in a SPIR-V module both named "main" as
  long as they have different stages.
2021-10-04 17:03:27 +01:00
baldurk 1b42dcc05f Fix crash returning serialiser's structured file to dummy driver
* If we hit a fatal error during initialisation, the structured file pointer
  still points at the temporary serialiser's structured file. It's not until we
  finish loading that we swap it into the driver-stored file that we can safely
  return and detach ownership of.
2021-09-17 14:29:05 +01:00
baldurk 620e75c2a1 Add a system for backends to handle device lost/OOM errors and report it
* The UI will become non-functional and the backend will be replaced with a do-
  nothing one that keeps things alive without needing error bulletproofing
  everywhere in the real backend.
2021-08-18 20:12:07 +01:00
baldurk 45a8a63474 Dynamically allocate shaders and structured files to allow detaching
* These are the only handles returned up by reference from the replay driver,
  dynamically allocating them means that we can steal/move the ownership of
  these and keep them valid even after the replay driver is destroyed.
* Note - ShaderDebugTrace is also returned by reference but it is already
  dynamically allocated like this.
2021-08-18 20:12:06 +01:00
baldurk c319ac0234 Store API pipeline states in the replay controller
* Instead of storing the API pipeline states in the replay driver and returning
  pointers, we store them in the replay controller and write into it from the
  replay driver.
* This will allow us to remove the replay driver and still keep any previously
  obtained references/pointers to the pipeline state valid.
2021-08-18 20:12:06 +01:00
baldurk d0accc409b Rename 'name' member of ActionDescription to 'customName'
* This is a deliberate break of compatibility since the field is now often
  empty, for non-markers. This means code will get a more explicit error when
  the name is being referenced, so it can be updated to fetch the name it needs
  as needed.
2021-07-01 15:15:05 +01:00
baldurk 7149302680 Rename 'draw' or 'drawcall' to action
* There's not a good accepted terminology for this kind of event, and for
  historical reasons 'drawcall' has been the accepted term, even though
  that can be quite confusing when a dispatch or a copy is a 'drawcall'.
* This is particularly highlighted by the event browser filters where
  $draw() includes draws and dispatches, but $dispatch() only includes
  dispatches, it's hard to intuitively understand why $draw() matches all
  of these calls.
* As a result we've defined the term 'action' to cover these types of
  events in the same way that we defined 'event' in the first place to
  mean a single atomic API call.
2021-07-01 15:15:05 +01:00
baldurk d8d6557feb Add support for file includes from custom shaders. Closes #2275 2021-05-17 13:47:58 +01:00
baldurk a1e436a8e0 Add event and structured chunk for image viewer 2021-02-24 13:52:08 +00:00
baldurk d906e23f32 Store original texture details in image viewer, rather than patched
* If we need to patch the details we use that for proxy texture upload, but we
  still want to return the original details to the replay.
2021-02-24 13:52:07 +00:00
baldurk 11268b358a Remap block-compressed 3D textures to 2D arrays on GL. Closes #2186 2021-02-22 12:38:43 +00:00
baldurk c1c36f06ba Handle failed allocation in EXR image viewing path 2021-01-18 13:23:22 +00:00
baldurk 026da176bb Update copyright years to 2021 2021-01-13 13:56:10 +00:00