Commit Graph
17431 Commits
Author SHA1 Message Date
Jake Turner d4253c2618 Change Mac github runner to macos-15 2026-10-06 06:32:45 +01:00
Jake Turner 66d008ecd0 Changes to Metal protocols to support MacOS SDK 15.0 2026-10-06 06:32:41 +01:00
Jake Turner 6597049558 Add #define for calcoffset() to fix Apple clang compile error
- offset of on non-standard-layout type -Winvalid-offsetof
2026-10-06 06:32:34 +01:00
Jake Turner 6906fce2be Fix Apple compile errors from -Wnontrivial-memcall
- first argument in call to 'memset' is a pointer to non-trivially copyable type 'MetalInitialContents'
2026-10-06 06:32:26 +01:00
Jake Turner e3c71e6e13 Fix Apple xcode path capitalisation to match disk 2026-10-06 06:32:05 +01:00
baldurk 14b5863046 Add misisng stringise for VkStructureType
* This wasn't included accidentally in last header bump.
2026-10-05 12:55:27 +01:00
Student Main 662623da68 Fix LoongArch BREAK instruction encoding 2026-10-05 20:16:53 +09:00
Jake Turner 4c07524147 Improve support for resource array display in Shader Debugging UI
- Use Shader feedback to get the accessed resource array index
- Use Shader feedback to show accessed elements in unbounded resource arrays

Before

tex1    [128]
tex1[0] _100[0] Resource Colour Tex
tex1[1] _100[1] Resource Black Tex

inbuf _166[unbounded] [unbounded]

tex2 _208[unbounded] [unbounded]

tex3    [3]
tex3[0] _221[0] Resource Colour Tex

After

tex1    [128]
tex1[4] _100[4] Resource Colour Tex
tex1[19] _100[19] Resource Black Tex

inbuf    unbounded
inbuf[15] _166[15] RW Resource Buffer 171

tex2    unbounded
tex2[381] _208[381] Resource Colour Tex
tex2[386] _208[386] Resource Colour Tex

tex3    [3]
tex3[1] _221[1] Resource Colour Tex
2026-10-02 14:25:14 +01:00
Jake Turner 9f12bf79a3 Allow spirv shader debugging for unbounded SSBOs 2026-10-02 14:25:14 +01:00
baldurk 0db41a0cde Don't use != in rdcpair as not every struct will implement it
* We can use !(a == b) instead for the same effect as we assume an equality
  operator.
2026-10-02 14:22:16 +01:00
baldurk 5b666aebef Improve autocomplete over rdcarray variables
* Anything obtained via the aliased interfaces will act as if it's a List[], but
  any globals from the repl will be rdcarray typed so we need to handle looking
  up the 'real' type for that.
2026-10-02 14:22:16 +01:00
baldurk e189be893c Unwrap/ignore optional for purposes of autocomplete 2026-10-02 14:22:15 +01:00
papalqi 42e52b48a3 vulkan: work around Qualcomm opaque capture address ordering bug
On some Qualcomm drivers (observed on Adreno 740, Xiaomi 2304FPN6DC,
Android 16) vkAllocateMemory returns an address different from the
requested opaque capture address when the pNext chain lists
VkMemoryOpaqueCaptureAddressAllocateInfo before
VkMemoryAllocateFlagsInfo carrying
VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT. The allocation
itself succeeds, so replay only fails later at the post-allocation
address equality check ("opaque address 0x%llx has changed on replay").

A standalone NDK Vulkan probe that replays the captured allocation
sequence without any RenderDoc layer involved deterministically
reproduces the wrong address with the captured chain order, and gets
all addresses matching when the two structures are swapped. pNext
chain order is not supposed to affect behaviour, so this is a driver
bug.

Move the existing VkMemoryAllocateFlagsInfo node to the head of the
chain when the new QualcommBrokenOpaqueCaptureAddress driver
workaround is active, immediately before AllocateMemory. The captured
address, flags, and all other chain nodes are left untouched, and the
existing address equality check still applies. The workaround only
triggers when both structures are present, a non-zero opaque address
is requested, and the flags node is not already first, so unrelated
captures are unaffected. The flag is enabled unconditionally for
Qualcomm for now as the fix version is unknown, matching the other
Qualcomm workarounds.

Validated on the original failing capture: remote replay of a
33 MB frame that previously failed the address check now opens in
~2.7 s and replays through Present with matching addresses.
2026-10-01 19:01:11 +09:00
Triang3l 894e51ccf2 Support null vertex/index buffers in D3D12 ExecuteIndirect
According to the D3D12 debug layer, setting either BufferLocation or
SizeInBytes to 0 in IASetVertexBuffers and IASetIndexBuffer commands
causes a null view to be bound, with the rest of the VBV/IBV description
structure being ignored.

In particular, this means that a BufferLocation of 0 must be supported
by RenderDoc, and also if SizeInBytes is 0, BufferLocation may be an
invalid address, so it must be ignored.

This change disables the resource lookup for null VBVs and IBVs.

Additionally, if the application has provided an invalid address for a
non-null VBV or IBV, it's replaced with a null view now instead of
passing the original address from the application through.
2026-10-01 10:29:42 +01:00
baldurk 91ea80af1d Display evaluated assertion expression if present 2026-09-30 12:29:31 +01:00
baldurk d3555c51af Use move helper for rdcarray move append
* This makes a big difference for move-appending basic types like bytes or ints
2026-09-30 12:29:31 +01:00
baldurk c63d957359 Fix fetching extra buffer data if fixed range is larger than clamp size 2026-09-30 12:29:31 +01:00
baldurk 2e32b910dd Ignore empty dxbc extended operands 2026-09-28 10:31:37 +01:00
Jake Turner d842e0240c Set Matrix and ArrayStride to Typed Pointers Closes #3914
- set both to known pointers
- set array stride to opaque pointers (matrix stride was already set)
2026-09-28 09:24:32 +01:00
Jake Turner 6653194e69 Add a test to load through a bda pointer array to a member of a struct
OuterStruct { float4 a; float4 b; InnerStruct* pInner; }
InnerStruct { float x; float y; float z; }

OuterStruct is BDA in push constants
Code Access is OuterStruct->pInner[1].x
2026-09-28 09:11:14 +01:00
Jake Turner 54f92c222a Add DXIL Debugger support for LEXICAL_BLOCK_FILE 2026-09-23 14:17:42 +01:00
Jake Turner cbcba5a438 Add DXIL DebugInfo support for LEXICAL_BLOCK_FILE 2026-09-23 14:17:42 +01:00
Jake Turner 391227ea7b Add DXIL bitstream parsing support for LEXICAL_BLOCK_FILE 2026-09-23 12:53:06 +01:00
Jake Turner b299a12234 D3D12_Execute_Indirect: fix GPUVA Errors 2026-09-22 16:02:53 +01:00
Jake Turner ad5ea9973d D3D12 ApplyState when IB/VB resource is missing set NULL resource
- IB is always set to NULL if the application didn't set a valid IB
- VB is set to NULL if the application VB resource does not resolve
2026-09-22 13:31:32 +01:00
Jake Turner 83de1c287a Spirv debugger update behaviour of clustered subgroup instructions 2026-09-21 16:45:20 +01:00
Jake Turner b94e5ca171 Spirv debugger implement builtins for subgroup masks
- SubgroupEqualMask
- SubgroupGreaterEqualMask
- SubgroupGreaterMask
- SubgroupLessEqualMask
- SubgroupLessMask
2026-09-21 16:29:33 +01:00
Jake Turner b29e2cc987 Extend test coverage in Vk_Subgroup_Zoo
- gl_NumSubgroups
- gl_SubgroupID
- gl_SubgroupEqMask
- gl_SubgroupGeMask
- gl_SubgroupGtMask
- gl_SubgroupLeMask
- gl_SubgroupLtMask
- subgroupBallotInclusiveBitCount
- subgroupInverseBallot
- subgroupShuffleXor
- subgroupShuffleUp
- subgroupShuffleDown
- subgroupInclusiveAdd
- subgroupInclusiveMul
- subgroupInclusiveMin
- subgroupInclusiveMax
- subgroupInclusiveAnd
- subgroupInclusiveOr
- subgroupInclusiveXor
- subgroupExclusiveAdd
- subgroupExclusiveMul
- subgroupExclusiveMin
- subgroupExclusiveMax
- subgroupExclusiveAnd
- subgroupExclusiveOr
- subgroupExclusiveXor
- subgroupClusteredAdd
- subgroupClusteredMul
- subgroupClusteredMin
- subgroupClusteredMax
- subgroupClusteredAnd
- subgroupClusteredOr
- subgroupClusteredXor
2026-09-21 16:22:24 +01:00
Jake Turner cfa80924ef Extend test coverage in Vk_Workgroup_Zoo
- gl_SubgroupEqMask
2026-09-21 16:22:21 +01:00
Jake Turner a8270f72d7 Vk Tests make the parent tmp/ directory of the temporary directory 2026-09-21 16:21:35 +01:00
Jake Turner be2676ff56 Improve VK_Subgroup_Zoo tests
- compute any bitmasks using subgroupBallot() outside of flow control
- add tests for subgroupBallotBitExtract, subgroupBallotFindLSB, subgroupBallotFindMSB
2026-09-18 14:02:55 +01:00
baldurk 755ab657ef Pass visible range through to custom shaders consistently 2026-09-18 12:10:41 +01:00
baldurk beb55351df Apply texture visible range before conversion from int. Closes #3911 2026-09-18 12:10:41 +01:00
baldurk 590d5dea3e Fix self capturing 2026-09-18 12:10:41 +01:00
Jonas Rock ccb51b11dc Fixed Subgroup ballot operations with inactive invocations
As far as I can see, OpGroupNonUniformBallotBitCount,
OpGroupNonUniformBallotBitExtract, OpGroupNonUniformBallotFindLSB
and OpGroupNonUniformBallotFindMSB all work directly with the
ballot value without filtering the bits for active lanes
(https://registry.khronos.org/SPIR-V/specs/unified1/SPIRV.html#OpGroupNonUniformBallotBitCount).

With Nvidia 610 drivers this can also be confirmed by printing the
shader values. This should hopefully fix these operations.
2026-09-18 11:55:52 +01:00
baldurk 6b9cec797d Add signal when python extensions are changed
* This avoids repeatedly hitting disk to enumerate current extensions for UI
  updates.
2026-09-17 11:44:07 +01:00
baldurk ac902dc08a Only log once about extensions that require an incompatible version 2026-09-17 11:44:07 +01:00
baldurk 622625de7a Make sure link batch file goes to right directory 2026-09-17 11:44:07 +01:00
Triang3l d2284aa5cf Fix D3D12 DiscardResource resource state in compute command lists 2026-09-17 19:07:35 +09:00
Jeremy Gebben 2473e8aec5 Fix IDX_VALUE() for non-indexed draws in PatchLineStripIndexBuffer
Non indexed draws should use action->vertexOffset rather than
action->baseVertex.

Fixes VK_Overlay_Test, when running with KosmicKrisp.
2026-09-16 22:12:30 +09:00
Jeremy Gebben 32cd07ea6e Use per-format render paths for shader debug sampling
The sampling shader writes in the textures native format. Rather than
invalidly converting all formats to float, create a separate a separate
render path for each base type. All of the paths render into a single
mutable format image.

This fixes VK_Shader_Debug_Zoo, Section GLSL1, Test 180 when running with
KosmicKrisp and avoids a Undefined-Value-ShaderFragmentOutputMismatch
warning from validation.
2026-09-16 22:12:30 +09:00
baldurk 06da5d1974 Set demo window title for vulkan tests 2026-09-15 17:00:54 +01:00
baldurk 510d16d900 Report more accurate data for Pixel history with discards & fragments
* For draws where some fragments discard, D3D12 & Vulkan currently can't
  distinguish which specific fragments did and didn't discard because they're
  processed batched in separate callbacks rather than incrementally like D3D11 &
  GL which can track a discarded offset by doing one stencil count at a time.
  This means we can't get primitive information or ordering, we only get a list
  of the passing fragments and a set of failing fragments.
* Note that on all APIs we also can't distinguish when instancing is present,
  because there could be multiple "identical" primitives from different
  primitives, some of which discard and some don't.
2026-09-15 17:00:54 +01:00
baldurk 3ce17193e9 Don't remove dynamic states until we set a fixed state
* In pixel history we don't want to remove things like the depth op for the
  postmod pipe which executes with the normal depth op and we won't have
  replaced it yet.
2026-09-15 17:00:54 +01:00
Jake Turner 298d4ee466 Update the pyrenderdoc module filters to renderdoc_module_python.cxx 2026-09-15 07:31:31 +01:00
baldurk e748030cb8 Add CI workflow to check stubs on different python versions 2026-09-14 13:19:55 +01:00
baldurk 5cf2745c64 Add a script to make sure that python stubs are sensible 2026-09-14 13:19:54 +01:00
Marijn Suijten c42117f7c2 vulkan: Fix race conditions around static ApplicationInfo
The initialization path for both the capture and replay layers were
modifying a global `static` structure containing `VkApplicationInfo` to
update it when `Vulkan_Debug_ReplaceAppInfo` is enabled (the default),
and also always to pass through the most accurate `apiVersion` from the
caller instead of defaulting to a minimum.

Worse, code after `vkCreateInstance()` was reading back the value for
`apiVersion` passed through this global constant (rather than reading
the local copy).

The end result is that, at least on Android where 3 instances are
created at roughly the same time _on three different threads_ (as seen
in the logs captured in #3903) they all clobber this global state and
because `vkCreateInstance()` could easily take some time (4-12ms) those
threads would be reading back each others' `apiVersion`.

In turn when the last write to `renderdocAppInfo.apiVersion` is lower
than what an app originally set and expected based on the queried Vulkan
instance and physical device versions, all kinds of weird things happen
when expected promoted-to-core extensions are no longer treated as
available by RenderDoc [^1].

[^1]: A good example is an app enabling Ray Tracing extensions on a
Vulkan 1.2+ device: the buffer_device_address extension is in core
here and not explicitly enabled by at least our application, but if an
instance initializer for Vulkan 1.1 "won" the race condition (that's
the version `android framework` uses as of writing, even on Android 16)
RenderDoc doesn't load the extension function pointers.  Ray Tracing
(currently) forces RenderDoc to query BDA for every buffer and crashes
at the first occurrence on a NULL PFN.  Similar NULL pointers occurred
in our app when relying on `vkWaitSemaphores()` from the promoted
`VK_KHR_timeline_semaphore` extension for example.

The most trivial and correct solution is to no longer update this global
state, but instead keep it as `const` data and copy it to the stack for
modification and passing through to `vkCreateInstance()` without ever
leaking `apiVersion` outside of the calling function.
2026-09-14 21:17:43 +09:00
Jeremy Gebben 78a67d2fe9 Don't create a zero-sized patched index buffer for empty draws
For empty draws, VulkanDebugManager::PatchLineStripIndexBuffer() can end up
with an empty list of patched indices, which it then tries to put into a 0
length index buffer. The only caller of this method only uses the index buffer
if the returned indexCount is > 0, so this is wasted work.

Creating a 0 length buffer violates VUID-VkBufferCreateInfo-size-00912 and
fails on KosmicKrisp. Other mesa drivers silently round the size up to 4096
bytes, the minium allocation size for kernel mode drivers.

This is triggered by check_empty_draw_overlays() in the VK_Indirect test.
2026-09-14 18:29:38 +09:00
baldurk 49f3c76c57 Fix demos reference to device from window 2026-09-14 09:56:36 +01:00