Wgpu: Image layout mismatch in VkImage

Created on 5 Feb 2020  路  2Comments  路  Source: gfx-rs/wgpu

Ran into the following vk validation message when reading a depth texture in a shader for a shadow mapping implementation in https://github.com/subdgtl/HURBAN-Selector/pull/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)

question

All 2 comments

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

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

FlorianUekermann picture FlorianUekermann  路  18Comments

simast picture simast  路  15Comments

MarekLg picture MarekLg  路  39Comments

zicklag picture zicklag  路  84Comments

ZKing1000 picture ZKing1000  路  23Comments