I'm getting the following validation error when using depth writing/testing in certain cases:
[2019-11-26T22:42:24Z ERROR gfx_backend_vulkan]
VALIDATION [VUID-VkImageSubresource-aspectMask-parameter (0)] : vkCmdPipelineBarrier(): Depth-only image formats must have the VK_IMAGE_ASPECT_DEPTH_BIT set. The Vulkan spec states: aspectMask must be a valid combination of VkImageAspectFlagBits values (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-VkImageSubresource-aspectMask-parameter)
object info: (type: IMAGE, hndl: 116)
I don't know if I'm doing anything wrong, since things work as expected.. the relevant part of my pipeline config looks like this:
.create_render_pipeline(&wgpu::RenderPipelineDescriptor {
...
rasterization_state: Some(wgpu::RasterizationStateDescriptor {
front_face: wgpu::FrontFace::Ccw,
cull_mode: wgpu::CullMode::None,
depth_bias: 0,
depth_bias_slope_scale: 0.0,
depth_bias_clamp: 0.0,
}),
...
depth_stencil_state: Some(wgpu::DepthStencilStateDescriptor {
format: wgpu::TextureFormat::Depth32Float,
depth_write_enabled: true,
depth_compare: wgpu::CompareFunction::LessEqual,
stencil_front: wgpu::StencilStateFaceDescriptor::IGNORE,
stencil_back: wgpu::StencilStateFaceDescriptor::IGNORE,
stencil_read_mask: 0,
stencil_write_mask: 0,
}),
index_format: wgpu::IndexFormat::Uint16,
vertex_buffers: &[vertex_attrs],
sample_count: 1,
sample_mask: !0,
alpha_to_coverage_enabled: false,
});
I'm getting the following validation error when using depth writing/testing in certain cases:
I don't know if I'm doing anything wrong, since things work as expected.. the relevant part of my pipeline config looks like this: