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

Image layout mismatch in VkImage #484

Closed
yanchith opened this issue Feb 5, 2020 · 2 comments
Closed

Image layout mismatch in VkImage #484

yanchith opened this issue Feb 5, 2020 · 2 comments
Assignees
Labels
type: question Further information is requested

Comments

@yanchith
Copy link
Contributor

yanchith commented Feb 5, 2020

Ran into the following vk validation message when reading a depth texture in a shader for a shadow mapping implementation in subdgtl/HURBAN-Selector#124

VALIDATION [UNASSIGNED-CoreValidation-DrawState-InvalidImageLayout (0)] : Submitted command buffer expects VkImage 0x686f310000000034[] (subresource: aspectMask 0x2 array layer 0, mip level 0) to be in layout VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL--instead, current layout is VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL.
object info: (type: COMMAND_BUFFER, hndl: 2817864330592)

I didn't have time to investigate properly yet, but I plan to (feel free to assign me). The wgpu-rs shadow example does not trigger the validation error, so I think I will need to trim it down to a small reproducible example first (ugh). Any thoughts on what might be going wrong?

wgpu version: 0.4 (crates.io)

@yanchith yanchith changed the title Image layout mismatch Submitted command buffer expects VkImage Image layout mismatch in VkImage Feb 5, 2020
@grovesNL grovesNL added the type: question Further information is requested label Feb 5, 2020
@kvark
Copy link
Member

kvark commented Feb 5, 2020

Looks similar to #459
I'll be happy to look once you provide the repro case.

@kvark kvark assigned kvark and unassigned yanchith Feb 5, 2020
@yanchith
Copy link
Contributor Author

Good news! Update to 0.5 in that particular project makes the validation error go away :)

kvark pushed a commit to kvark/wgpu that referenced this issue Jun 3, 2021
484: Enable features in CI to prevent compiler errors r=kvark a=cwfitzgerald

Simple change, this also builds features in CI.

I added trace and replay features to wasm, even though wasm doesn't support tracing as is, because people may enable them to get serde support for wgpu-types stuff.

Co-authored-by: Connor Fitzgerald <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants