#[SOLVED] Confused about Vulkan Spec for Depth/Stencil attachments

2 messages · Page 1 of 1 (latest)

novel palm
#

Can I have both a depth texture and a stencil texture as rendertargets in a single renderpass? Can I have a texture view of both the depth and the stencil aspects at the same time?

I am using dynamic rendering in vulkan 1.3 and trying to have a color target, a depth texture and a stencil texture in a single renderpass.

I tried having a Depth32Stencilu8 texture with separate views of the depth and stencil aspects set, but got issues (see below). I then tried having a Depth32 texture for depth and a separate StencilU8 texture, but also got issues.

Can I conclude that I cannot use a Depth32Stencilu8 texture as both the depth texture and the stencil texture in a single renderpass nor can I have a depth32 and a separate stencilu8 bound?

(https://vulkan.lunarg.com/doc/view/1.3.296.0/linux/1.3-extensions/vkspec.html#VUID-VkRenderingInfo-pDepthAttachment-06085)

Validation Error: The Vulkan spec states: If neither pDepthAttachment or pStencilAttachment are NULL and the imageView member of either structure is not VK_NULL_HANDLE, the imageView member of each structure must be the same

(https://vulkan.lunarg.com/doc/view/1.3.296.0/linux/1.3-extensions/vkspec.html#VUID-VkDescriptorImageInfo-imageView-01976)

The Vulkan spec states: If imageView is created from a depth/stencil image, the aspectMask used to create the imageView must include either VK_IMAGE_ASPECT_DEPTH_BIT or VK_IMAGE_ASPECT_STENCIL_BIT but not both

If anyone with some experience could chip in with their two sents I would appreciate it a lot xD

novel palm
#

[SOLVED] Confused about Vulkan Spec for Depth/Stencil attachments