Commit Graph
17406 Commits
Author SHA1 Message Date
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
baldurk 527f34614b vkDeviceWaitIdle workaround because presentation is broken 2026-09-13 12:57:43 +01:00
baldurk 1fbec8ee48 Print total number of cases properly in log 2026-09-13 12:54:54 +01:00
baldurk 18e4d44ec3 Log VkResult errors to demos log 2026-09-13 12:54:40 +01:00
baldurk cd4b13836e Use annotation type string massaging on path with ForwardRef 2026-09-12 15:40:46 +01:00
baldurk 3e9202699f Handle exception properly if stubs generation fails 2026-09-12 15:40:28 +01:00
baldurk 0628f10b9a Fix docstring/function signature errors 2026-09-12 10:27:55 +01:00
baldurk a3fafbc29a Don't pre-split work across parallel job workers 2026-09-12 02:15:12 +01:00
baldurk 19718e4feb Add UI extension for running tests within the UI 2026-09-11 21:46:16 +01:00
baldurk 8bcf63aced Return current text of combo box properly in MiniQtHelper 2026-09-11 21:37:21 +01:00
baldurk 8392bca098 Fix incorrect error string 2026-09-11 21:17:19 +01:00
baldurk 48b968e9a7 Add a MiniQtHelper to set spacing/margins on layouts 2026-09-11 21:17:19 +01:00
baldurk 3579ecc065 Fix use of TransientPopupArea with no ref window 2026-09-11 21:17:19 +01:00
baldurk f58d376b3a Add an option to the logger to immediately fatal on first error
* This is mostly useful for some of the tests that want to be able to run and
  accumulate multiple errors, but while debugging we want an exception to catch.
2026-09-11 21:17:19 +01:00
baldurk d56ea92fd5 Add some helpers for querying and reloading tests 2026-09-11 21:17:18 +01:00
baldurk 7faac83b00 Add a helper and context for tracking the last pixel pick 2026-09-11 21:17:18 +01:00
baldurk ff7e147b39 Allow setting a capture context if tests are run in UI
* This means we can keep the UI in sync with things like resource replacements.
2026-09-11 21:17:18 +01:00
baldurk 01893b9896 Use context helpers for pixel history 2026-09-11 21:17:18 +01:00
baldurk ca682d6d34 Use context helpers for pixel debugging 2026-09-11 21:17:17 +01:00
baldurk 3452ba8ffd Use context helpers for thread debugging 2026-09-11 21:17:17 +01:00
baldurk e6948a8c7e Check for degenerate debug traces in process_trace 2026-09-11 21:17:17 +01:00
baldurk 191597b27c Don't allow find_*_source_var to return None
* Almost all callers expect a return value, so better to raise an exception
  inside and make it non-optional return
2026-09-11 21:17:17 +01:00
baldurk ae019398cb Remove checks for shader debuggability
* All APIs now support shader debugging by default and we assume/require all
  shaders in tests to be debuggable.
2026-09-11 21:17:17 +01:00
baldurk 04af66d71f Check for failed ShaderDebugTrace centrally
* We don't expect the debug to fail entirely and if it does we can throw a test
  failure
2026-09-11 21:17:16 +01:00
baldurk 031212e916 Use context helpers for vertex debugging 2026-09-11 21:17:16 +01:00
baldurk d9c72e7651 Include context information for pixel history and shader debug attempts 2026-09-11 21:17:16 +01:00