Commit Graph
11734 Commits
Author SHA1 Message Date
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
Jake Turner 2b0e143509 Change DXIL ShaderVarible construction for cbuffer variables
Fixes a crash trying to add a watch for these variables
2026-01-05 12:59:05 +13:00
baldurk 9e2be03e09 Only read sampler when unwrapping combined image/sampler descriptor 2026-01-03 16:41:44 +00:00
baldurk 084e1c5acc Fix depth resolve barrier in D3D12 renderpass api 2026-01-01 16:52:20 +00:00
Jasper St. Pierre f5c73155b5 d3d12: Implement ID3D12SharingContract on the ID3D12CommandQueue
https://learn.microsoft.com/en-us/windows/win32/api/d3d12sdklayers/nn-d3d12sdklayers-id3d12sharingcontract
says:

> You may want to use this interface to enable diagnostic tools to
> capture usage patterns that don't use DXGI swap chains for
> presentation. If so, you can access this interface via
> QueryInterface from a D3D12 command queue.

Currently, this is implemented on the ID3D12Device. Implement
it on the D3D12CommandQueue as well.
2025-12-28 20:25:18 +09:00
Jake Turner 6d89b15bc9 Fix D3D validation warning in ResolvePendingIndirectState()
D3D12 WARNING: ID3D12Resource3::ID3D12Resource::Unmap: pWrittenRange does not point to an empty D3D12_RANGE and the heap type is D3D12_HEAP_TYPE_READBACK. Readback resources can be written by the CPU but there's not much utility. The rationale is that readback heaps are stuck in COPY_DEST state such that the GPU can never use what the CPU is writing. The range [0, 4194304) should be empty (Begin >= End). [ EXECUTION WARNING #929: UNMAP_RANGE_NOT_EMPTY]
2025-12-20 07:27:33 +13:00
baldurk 191e8cd10d Bump version to v1.43 2025-12-19 17:41:39 +00:00
Jake Turner e7f0b0ea67 DXBC Debugger fix for CalculateLevelOfDetailUnclamped
The LOD result has already been swizzed into result.x
2025-12-14 08:13:05 +13:00
Jake Turner a3f3f1a510 Support for DXIL SM6.6 Derivatives in Compute Shaders
linear layout (4x1x1) : for 1D workgroup (Nx1x1) otherwise quad layout (2x2x1)

HLSL
ddx()
ddx_coarse()
ddy()
ddy_coarse()
ddx_fine()
ddy_fine()

CalculateLevelOfDetail()
CalculateLevelOfDetailUnclamped()
Sample()
SampleBias()
SampleCmp()

DXIL
DXOp::DerivCoarseX
DXOp::DerivCoarseY
DXOp::DerivFineX
DXOp::DerivFineY
DXOp::CalculateLOD
DXOp::Sample
DXOp::SampleBias
2025-12-12 12:02:16 +13:00
Jake Turner ab7016e142 D3D12 DXIL Debugger pure quad scope fixes
Initialise global SV_GroupID builtin
Resize containers to correct number of threads
2025-12-12 12:02:16 +13:00
Jake Turner cd0faba571 Made enum DerivType be class enum to reduce its scope 2025-12-12 12:02:16 +13:00
baldurk 72c6bbe302 Also check mesh shader for exported primitive ID. Refs #3746
* We were only checking geometry shader before.
2025-12-11 19:07:16 +00:00
Jake Turner 95702ce6f7 Support for DXIL Quad Ops in Compute Shader Debugging
linear layout (4x1x1) : for 1D workgroup (Nx1x1) otherwise quad layout (2x2x1)
2025-12-11 15:39:19 +13:00
Jake Turner dc61249328 Set ThreadScope::Quad if DXIL compute shader uses Quad Ops
Check for dx.op.quadReadLaneAt.* or dx.op.quadOp.* or dx.op.quadVote.*
2025-12-11 15:39:19 +13:00
Jake Turner 823ab380c1 Move hasQuadScope assert to the correct place (after workgroup check) 2025-12-11 14:56:14 +13:00
Jake Turner 10cf43b703 ICaptureAccess APIs for externally referenced dependency files
ResultDetails EmbedDependentFilesIntoCapture();
ResultDetails RemoveDependentFilesFromCapture();
int32_t CountEmbeddedDependentFiles();
int32_t CountExternallyReferencedFiles();
rdcarray<rdcstr> GetExternallyReferencedFiles();
2025-12-11 11:13:29 +13:00
Jake Turner 0bd07bf283 Connect Vk and DXBC Shader Debug files to dependent files Core API
Add any found external shader debug file as a tracked dependency.
If external shader file is not found on disk, try to find it in the loaded tracked file data.
Use the shader debug filename reference as the dependency nickname : this might be an absolute path, relative path or a hash.
2025-12-11 10:18:34 +13:00
Jake Turner 5db4350193 RenderDoc Core APIs to support external file dependencies in captures 2025-12-11 10:18:34 +13:00
Jake Turner 0d1220aab9 Missing UnregisterMemoryRegion() in ~ReplayController 2025-12-10 22:04:36 +13:00
baldurk c554f726dd Enable depth clipping for solid mesh render, disable for wireframes
* Wireframes can render without a near plane clip and be mostly fine, but solid
  renders need the depth so they should clip. Behaviour was inconsistent between
  APIs before
2025-12-08 18:24:19 +00:00
baldurk 071c62ee00 Add API to control the display camera's near and far planes
* This is separate from the near/far used to unproject rasterizer output vertex
  data.
2025-12-08 15:50:17 +00:00
baldurk 19cb12847a Don't replay RP suspend/resume and use store/load
* Suspend/resume must all happen in the same submit so we can't combine it with
  our own work or submit individual command buffers for work. Suspending and
  resuming is semantically equivalent to storing and loading so we can make this
  transformation without affecting correctness.
2025-12-08 15:24:05 +00:00
baldurk 762fc1b445 Add pipeline bit to remove validation message 2025-12-08 15:22:58 +00:00
baldurk 83b1638174 Silence warning 2025-12-08 13:42:08 +00:00
Jonathan Glines 2b22a0877a Sync GPU before decoding NVIDIA Nsight Perf SDK counters on D3D11
Syncing the GPU before decoding counters resolves an
"NVPA_STATUS_INSUFFICIENT_SPACE" error when collecting counters for
D3D11 applications with many event ranges.
2025-12-05 02:36:04 +09:00
Jake Turner 728ac77bf3 Fix D3D12 debug error when setting constants in EI
For instance would trigger when setting a single 32-bit root constant
Do not need to call resize_for_index() on constants because SetConstants() will handle any resizing that is required
2025-12-03 11:20:23 +13:00
Vladislav Korytsko 8530da8274 Fix dataSize calculation in WriteToSubresource
Corrects width, height, and depth calculation in WriteToSubresource for the specified subresource when storing provided source data blob. Using base resource dimensions could have led to source-data read access violation.
Also updates corresponding test to validate subresource modification.
2025-12-03 05:56:55 +09:00
baldurk 372aae1381 Add config option for vulkan GPU VA 2025-12-02 14:21:55 +00:00
baldurk c4f35d45cc Fix compilation on old linux compilers 2025-12-02 13:10:34 +00:00
baldurk 09a0c34979 Add manual implicit bias path for Android 2025-12-02 12:37:19 +00:00
baldurk d89b763e49 Fix issues for Android debugging 2025-12-02 12:37:19 +00:00
baldurk ac8b786476 Remove GL shader debugging config variable 2025-12-02 12:37:19 +00:00
baldurk 910f7ab65f Handle matrices when copying program attribute bindings 2025-12-02 12:17:36 +00:00
baldurk 7c438edd2a Fix column lookup via access chain in SPIR-V debugging 2025-12-02 12:17:36 +00:00
baldurk 0f70937707 Dump input fetcher & SPIR-V to disk based on config option 2025-12-02 12:17:36 +00:00
baldurk 01d305eb4e Detect gl_PerVertex for GL shaders 2025-12-02 12:17:36 +00:00
baldurk 88cf6f295a Add vertex shader debugging setup on GL 2025-12-02 12:17:36 +00:00
baldurk d550195e4c Add compute shader debugging setup on GL 2025-12-02 12:17:36 +00:00
baldurk ddf19304b7 Handle resources encountered in the SPIR-V debugging that don't exist
* It is common for drivers to dead-code eliminate resources and they will not
  show up in reflection at all and will not have a binding. For these we will
  still encounter them when debugging so need to ensure we handle that case.
* This unfortunately makes a previously illegal/error-checked case silently
  continue, so we add API-specific asserts.
2025-12-02 12:17:35 +00:00
baldurk 7490abedcf Remap locations/binds back to match real shader as needed 2025-12-02 12:17:35 +00:00
baldurk 8ed7c14556 Try to compile GLSL shaders to SPIR-V to enable debugging 2025-12-02 12:17:35 +00:00
baldurk c4f71f6223 Support plain bare uniforms in GL SPIR-V 2025-12-02 12:17:35 +00:00
baldurk 02096dd75e Add input fetcher generation for GL shader debugging 2025-12-02 12:17:35 +00:00
baldurk 55e8c42f50 Require SSBOs & CS for shader debuggging at minimum 2025-12-02 12:17:35 +00:00
baldurk 5a4b4dca03 Add GL API wrapper skeleton, based on vulkan wrapper
* We keep some of the threading code rather than removing it, but this will run
  single threaded.
2025-12-02 12:17:34 +00:00
baldurk e66dc5cd6b Update GL headers to latest as of 2025-11-14 2025-12-02 12:17:34 +00:00
baldurk d62d2d8848 Add CPU side handling of math/sampling operations 2025-12-02 12:17:33 +00:00
baldurk 118baf6432 Add GL versions of shader debug pixel shaders 2025-12-01 17:25:57 +00:00
baldurk 22979a8696 Allow shader debug vertex shader to compile on GL or Vulkan 2025-12-01 17:25:57 +00:00
baldurk 6749e47177 Move shader debugging replay function stubs into new file 2025-12-01 17:25:57 +00:00