Commit Graph

15190 Commits

Author SHA1 Message Date
Jake Turner 2443dbcb55 Shader Editing: Fix problem where single Replace didn't work
Use the same findHash string in performReplace() as in performFind() by including the find direction in the findHash in performReplace()
2024-11-09 07:07:11 +00:00
baldurk 94b01feb22 Fix missing include for std::hash 2024-11-08 13:57:12 +00:00
baldurk 634e74793a Add recursive search of shader debug paths for debug files
* This doesn't seem to be documented anywhere but some applications rely on it
  and it seems like PIX behaves this way, so it is as with many things in D3D
  the defacto standard
2024-11-08 12:00:23 +00:00
baldurk 991b8c3a01 Add std::hash overload for rdcstr to allow it to be used in hashmaps 2024-11-08 11:57:24 +00:00
baldurk e9a6e0ebd0 When disabling XFB after replay, note if it was enabled. Closes #3478 2024-11-08 10:49:05 +00:00
baldurk 90411d50ed Refuse to read contents of AS buffers on D3D12 2024-11-08 10:49:05 +00:00
baldurk c427a3f85f Handle NULL AS descriptors correctly 2024-11-08 10:49:05 +00:00
Jake Turner d1663d9be7 D3D12 Pixel History fix device removed with large number of fragments
Destination copy buffer was sized to the number of events, this did not guarantee enough storage for the per fragment data i.e. small number of events with large of fragments per event

Reserve space for at least 256 fragments or 128 events in the buffer
Do not get data for fragments if the buffer does not have enough space

In the problem case the buffer went from 4KB to 28KB
2024-11-07 15:27:38 +00:00
Jake Turner 0be2b866a9 DXIL Debugger fix up argument indexes for DXOp::IMul, UMul, UDiv 2024-11-07 15:27:17 +00:00
Jake Turner 1b2b91edde DXIL Debugger treat Undef constants as 0 2024-11-07 15:27:01 +00:00
Jake Turner ecafb6206d DXIL Debugger support for dx.op.discard 2024-11-07 15:25:58 +00:00
Jake Turner b168e9ab0f DXIL Debugger improve the output variable mapping
Use the DXBC semanticIdxName for the variable names
Use the DXIL Output signature for the elements, data and ordering
2024-11-07 15:24:53 +00:00
Jake Turner 84f6799444 Improve testcase _find_action
Search for the action with the closest EID to the request
Previously it would return the first action that was larger than the EID
2024-11-07 15:23:31 +00:00
Jake Turner dc27caaa08 Iter Test : pixel history and vertex debug changes
Do not pixel debug on an unknown primitive ID (-1)
Allow pixel debug and vertex debug on non-drawcall actions which have non-zero drawIndex i.e. Indirect draws
2024-11-07 15:23:27 +00:00
Jake Turner 88fdd4a2e9 Apply SampleBias bias correctly when debugging D3D12 Shaders 2024-11-06 07:34:51 +00:00
Jake Turner a888296148 DXIL Debugger skip ignored PSInputs when calculating derivatives 2024-11-05 15:13:25 +00:00
Cam Mannett 0e9322e610 Skip incompatible image formats when building discard pattern
If the pattern's dimensions are not an integer multiple of the format's block size, then do not attempt to create the discard pattern, just exit early.

Fixes 3466
2024-11-05 14:03:22 +00:00
baldurk 8b3ae8fd4d Move stdio.h include outside of namespace, avoids some compilers choking 2024-11-05 10:12:16 +00:00
baldurk 78b86bcbd1 Guess handling of matrices in mesh outputs as pessimistically packed
* It is unclear currently what the stride of these matrices are since
  MatrixStride can't be applied to the type, so we reserve the worst-case
  memory.
2024-11-05 10:12:16 +00:00
baldurk ec261a2f85 Use API entry point not source entry point when decompiling source 2024-11-05 10:12:16 +00:00
baldurk e4bd840125 Add SPIR-V version to compile flags after debug info 2024-11-05 10:12:16 +00:00
baldurk ec7ecf6896 Fix buffer declaration not properly declaring structs 2024-11-05 10:12:16 +00:00
baldurk 4fbce3b662 Fix action patching of indirect mesh draws 2024-11-05 10:12:15 +00:00
baldurk ac482e7dd1 Don't apply deferred debug names to resources that don't exist 2024-11-05 10:12:15 +00:00
Aras Pranckevicius 784156cc23 Disable "Recompress capture" on images
When renderdoc opens an image file, it treats it as a
"somewhat special" capture. However compressing it only corrupts
the source image file, without doing anything useful. So disable
that menu item for "image" captures.
2024-11-04 17:24:38 +00:00
Shahbaz Youssefi 76b6d47f9c Support VK_KHR_dynamic_rendering_local_read
Fixes #3341
2024-11-04 16:58:03 +00:00
Cam Mannett 1ce89dfc62 Improved handling for sparse buffers
Change-Id: I12d74140f8b3df862a15d6966431862c145612d8
2024-11-04 15:53:21 +00:00
Cam Mannett 38a61a2ec6 Do not access baseResourceMem on unbound buffer 2024-11-04 15:53:21 +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
Jake Turner 3656641194 DXIL Disassembly use resource alias for resource handle in CBufferLoad 2024-10-31 18:26:14 +00:00
Jake Turner fc109ce3ac DXIL Debugger support for bindless resources
Change to find resource references by DXILDebug::Id
2024-10-31 18:26:14 +00:00
Jake Turner 3c0e64d97a DXIL Disassembly Improve the Input signature display
Match DXBC reflection parameter using the Input register and element
2024-10-31 18:26:14 +00:00
Jake Turner 2799bbfb59 DXIL Debugger fix extract PS input shader compile errors 2024-10-31 18:26:14 +00:00
Jake Turner bf6610a8cf DXIL Debugger fix logic to detect bindless access 2024-10-31 18:26:14 +00:00
Jake Turner 281c34c922 DXIL Debugger Use DXIL Signature for the Inputs
Use the DXIL Signature input register and element linkage to extract the correct data from the initial values
2024-10-31 18:26:14 +00:00
Jake Turner b9372b403f Added DXIL::SetResultSSAId() and DXIL::FindSigParameter() 2024-10-31 18:26:14 +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 bb3b571c90 EXR: multi-threaded exr image loading
EXR files internally are split into independent "parts", which can
be decoded separately. Tinyexr already supports that via
TINYEXR_USE_THREAD.

Time taken to load 4K video resolution EXR files, on Ryzen 5950X/VS2022:
- FP16 file (27MB): 536ms -> 77ms
- FP32 file (69MB): 793ms -> 118ms
2024-10-31 17:48:45 +00:00
baldurk b4403b2d8d Test different whitespacing around pointers 2024-10-31 13:04:25 +00:00
baldurk 89ee55bd0c Fix matching variable-less buffer formats
* It's convenient and we sometimes automatically create formats that are just
  'xint' so make sure they parse correctly.
2024-10-31 12:57:12 +00:00
baldurk ef1c633df3 Offset per-primitive data correctly when meshlet filtering 2024-10-31 12:47:18 +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
Aras Pranckevicius 897d36ee03 Update tinyexr to current (1.0.9, from 2024 Jul)
Disable some warnings that happen on vs2015/2019
while building it, since whole build uses
warnings as errors.
2024-10-31 11:58:30 +00:00
Mario-Cui 6f95cf276d allow d3d12 insert null rt descriptor. 2024-10-31 10:22:49 +00:00
baldurk 2dfd7e55b7 Disable buggy wegame layer 2024-10-30 10:33:41 +00:00
baldurk 1827548666 Fix EID miscounting around ExecuteIndirect partial replay 2024-10-30 10:33:41 +00:00