Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Renderdoc shows vulkan validation errors when capturing multiple sequential frames. #5153

Open
Elabajaba opened this issue Jan 27, 2024 · 2 comments
Labels
external: upstream Issues happening in lower level APIs or platforms

Comments

@Elabajaba
Copy link
Contributor

Description
Depth attachments don't seem to always be getting set to the correct layout.

2 API High Miscellaneous 1303270965 Validation Error: [ UNASSIGNED-CoreValidation-DrawState-InvalidImageLayout ] Object 0: handle = Command Buffer 399, name = (wgpu internal) Transit, type = VK_OBJECT_TYPE_COMMAND_BUFFER; Object 1: handle = 2D Depth Attachment 241, type = VK_OBJECT_TYPE_IMAGE; | MessageID = 0x4dae5635 | vkQueueSubmit(): pSubmits[0].pCommandBuffers[1] command buffer VkCommandBuffer Command Buffer 399 expects VkImage 2D Depth Attachment 241 (subresource: aspectMask 0x2 array layer 0, mip level 0) to be in layout VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL--instead, current layout is VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL.

Repro steps
Launch the wgpu shadow example in renderdoc with the vulkan backend. Change the "Capture 1 Sequential Frame(s)" to some higher number (I've been using 5, but the error tends to pop up by the 2nd or 3rd capture), then run the capture. Open the captures and check the bottom left corner to see if it's erroring.
image

Expected vs observed behavior
Expected: No validation errors, observed: validation errors.

Platform
wgpu 0.19 and trunk (tested: e2e9ef5)

Windows 11, AMD 6800xt 24.1.1 drivers, Vulkan backend
It has also been reproduced by someone else on an nvidia 4080, not sure what drivers.

@cwfitzgerald
Copy link
Member

Does this happen without renderdoc attached? If not, this is likely a renderdoc problem. Similarly do we pass with synchronization validation enabled via the vk configurator?

@cwfitzgerald cwfitzgerald added the external: upstream Issues happening in lower level APIs or platforms label Jan 28, 2024
@jimblandy
Copy link
Member

jimblandy commented Feb 14, 2024

Perhaps related: #5253, which also raises UNASSIGNED-CoreValidation-DrawState-InvalidImageLayout when run against a recent build of Vulkan-ValidationLayers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external: upstream Issues happening in lower level APIs or platforms
Projects
None yet
Development

No branches or pull requests

3 participants