Skip to content

d3d12: name compute modules for selective GPU validation - #2072

Open
GGandCo wants to merge 2 commits into
ProjectLeonida:mainfrom
GGandCo:fix/compute-shader-debug-names
Open

GGandCo wants to merge 2 commits into
ProjectLeonida:mainfrom
GGandCo:fix/compute-shader-debug-names

Conversation

@GGandCo

@GGandCo GGandCo commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

Claim: RT-COMPUTE-GPUAV-SELECTION — #1608 (comment)

Selective GPU-assisted validation matches shader-module debug names. The layer's compute modules had no such names, so selecting a library entry instrumented nothing. Name each compute module with its shader-library entry before pipeline creation, when VK_EXT_debug_utils and its naming entry point are available. Shader code and execution are unchanged.

The compute fixture now forwards its enabled debug-utils capability. An opt-in standard-library Python check runs that synthetic fixture with a matching and an unmatched GPUAV selector, verifies modified before/after SPIR-V dumps, and requires the existing compute readback checks to pass. Its caches and dumps stay in temporary directories. This adds no default CTest dependency on GPUAV.

Validation on Windows 11, Intel UHD Graphics (i5-1334U), driver 32.0.101.6314, Vulkan SDK 1.4.363.1, MSVC RelWithDebInfo, based on main 75a41f5:

  • Built d3d12_compute_test from this contribution tree.
  • New opt-in check: matching cs_user_data selects 4 module instances; unmatched name selects 0; all compute readback checks pass.
  • Negative control before the naming hunk, with the same fixture debug-utils forwarding: compute checks pass but the matching selector produces 0 instrumented dumps.
  • d3d12_compute passes with ordinary Vulkan validation and with validation disabled.
  • Separately, 15 targeted runtime/CPU/GPU tests pass in the existing private integration tree. This is additional integration coverage, not an isolated-main full-suite result.
  • git diff --check and check_no_game_data.py pass for all four changed files.

No title files or shader content are included. No playability claim. Full CTest was not run.

GPUs tested: Intel UHD Graphics, 32.0.101.6314, Windows 11.
AI-assisted: OpenAI Codex.

…thub.com/ubiquitarianism/leonida into fix/compute-shader-debug-names

# Conflicts:
#	runtime/shims/d3d12_vulkan_device.cpp
@GGandCo

GGandCo commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

Updated onto main a73a57e in e27fcb3. The conflict came from the shared build_compute_pipeline refactor: module naming now happens immediately after vkCreateShaderModule in that shared function, preserving the new helper/journal/driver-turn paths.

Rebuilt d3d12_compute_test from this contribution tree on Windows 11, Intel UHD Graphics 32.0.101.6314, MSVC. The opt-in GPUAV selection check passes again: matching selector instruments 4 module instances, unmatched selector 0, and compute readbacks pass. git diff --check and check_no_game_data.py pass for the four PR files.

I also read both failed checks on the previous head. linux-gpu-tools failed to build vk_null_descriptor_test when LEONIDA_TEST_NULL_DESCRIPTORS_SPV was undefined (existing fix #2055). Windows failed vk_xdxr_postbuild_readback because the runner's no-device exit 77 was counted as failure (existing fix #1418). Those paths are outside this PR; this update does not claim those CI failures are fixed. No full-suite result claimed.

AI-assisted: OpenAI Codex.

@ammonium231

Copy link
Copy Markdown

RTX 3090 / 621.40, this PR merged onto current main a73a57e: check_compute_gpuav_selection.py passes (matching cs_user_data selects 4 modules, unmatched name selects 0, compute readback checks pass). On unpatched main the same script reports 0 instrumented dumps for the matching selector. d3d12_compute with ordinary validation passes on both, 0 VUID.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants