CRAFTER_GRAPHICS_VALIDATION without the validation layer runs unvalidated without a word, so every validation check passes with 0 errors #189
Labels
No labels
claude:blocked
claude:done
claude:failed
claude:in-progress
claude:ready
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Catcrafts/Crafter.Graphics#189
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Device::InitializetreatsCRAFTER_GRAPHICS_VALIDATIONas optional. IfVK_LAYER_KHRONOS_validationis not among the instance layers, it creates the instance without it and reports nothing.Device::validationErrorCountthen stays at 0, and every test that gates a validation check on the variable passes without anything having been validated.That is the situation with every released crafter-build today. Stable and beta 5.0.0 have no Khronos layer in their sandbox, and
flatpak runclearsVK_LAYER_PATHandVK_ADD_LAYER_PATH, so a layer installed on the host cannot stand in for it. A distro without its validation-layers package gives the same silent result.Line numbers refer to
3f646ec.Where
implementations/Crafter.Graphics-Device.cpp:1184reads the variable, and:1196chainsVkValidationFeaturesEXT(GPU-AV) into the instance create info.:1232enumerates the instance layers and counts the ones inlayerNames.:1248enables them only whenenableValidation && foundInstanceLayers >= ...holds. OtherwisevkCreateInstanceat:1254runs with no layer, and the chained validation features do nothing.Reproduction
Measured on 2026-11-01 (RTX 4090, NVIDIA 615.78.08, KDE Wayland). Reintroduce #157, a readback recorded after
vkQueuePresentKHR, then runCRAFTER_GRAPHICS_VALIDATION=1 crafter-build test SwapchainTransferDst:FAIL no Vulkan validation errors while clearing and capturing (1 seen), and the layer reportsvkQueueSubmit(): pSubmits[0] performs a layout transition on presentable VkImage 0xe000000000e, but the image has not been acquired from VkSwapchainKHR 0xd000000000d (either never or since the last present operation)., the same as a run on the host. That build is crafter-build branchclaude/flatpak-debug-tools, installed locally as Flatpak branchlocaland not released yet.Expected
When the variable is set and the layer cannot be enabled,
Device::Initializeshould fail with a message that names the layer, rather than run unvalidated. The variable asks for validation, and an unvalidated run cannot answer that question.AGENTS.template.mdassumes the layer is there:CRAFTER_GRAPHICS_VALIDATION=1 crafter-build test;crafter-build testpasses on the host withCRAFTER_GRAPHICS_VALIDATIONset";Related
crafter-build is adding the layer, GPU-AV included, to its Flatpak (branch
claude/flatpak-debug-tools). That makes the variable work inside the sandbox once released, but does not change what happens wherever the layer is missing.