KhronosGroup / KhronosGroup/Vulkan-Docs

At least one depth-stencil format should support SAMPLED | ATTACHMENT

Open
#1,283 2 comments 1 reaction 1 assignee Claimed by @TomOlson View on GitHub
Dominant language
JavaScript
Stars
3.3k
Forks
549
Avg merge
5d 5h
Merged PRs (30d)
2

Description

The Vulkan spec doesn't give guarantees as to which depth-stencil format can be rendered into, but specifies that at least one of them must be supported:

> VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT feature must be supported for at least one of VK_FORMAT_X8_D24_UNORM_PACK32 and VK_FORMAT_D32_SFLOAT, and must be supported for at least one of VK_FORMAT_D24_UNORM_S8_UINT and VK_FORMAT_D32_SFLOAT_S8_UINT.

In particular it is technically allowed to have a single renderable depth-stencil format that doesn't support `SAMPLED`. This is a feature level regression compared to OpenGL ES 3.1 where all depth-stencil formats are sampleable. Would it be possible to have the spec say instead:

> The VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT and VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT features must be supported for at least one of VK_FORMAT_X8_D24_UNORM_PACK32 and VK_FORMAT_D32_SFLOAT, and must be supported for at least one of VK_FORMAT_D24_UNORM_S8_UINT and VK_FORMAT_D32_SFLOAT_S8_UINT.

This would more closely match what's the actual guarantees and make depth-stencil formats more usable without looking at the detail of device support.

Loosely related to #1223

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.