Open Pengiie opened 2 months ago
When I was searching around for if there was limitations for what usages surfaces can be made with I didn't check the docs (my bad), https://docs.rs/wgpu/latest/wgpu/type.SurfaceConfiguration.html. I see now that only RENDER_ATTACHMENT
is supported.
We should be validating this
Description When creating a Surface with the only texture usage being
COPY_DST
with the vulkan backend, an image view is still attempted to be made withVK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT
which causes a validation error.Repro steps
Expected vs observed behavior When the surface textures are created with just
COPY_DST
, I expect a VkImageView not to be created since there is no reason to due to the only VkImageUsage beingVK_IMAGE_USAGE_TRANSFER_DST_BIT
.What actually happens is the image view is attempted to be created with the
VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT
even though I didn't setwgpu::TextureUsages::RENDER_ATTACHMENT
.Extra materials Vulkan validation errors:
Platform wgpu v0.20.1 NixOS 24.05 using Vulkan Nvidia drivers 555.42.02