Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add "depth32float_stencil8" extension for GPUTextureFormat #755

@rconde01

Description

@rconde01

Currently the following depth-stencil formats are available:

  • depth32float
  • depth24plus
  • depth24plus-stencil8

However, depth32float-stencil8 is desired since some techniques require depth32float depth and you may want to use those techniques together with a stencil buffer. depth24plus-stencil8 may provide this but is undesirable for a couple of reasons:

  • a depth32float result would only be detectable through a readback test
  • the current spec does not say implementations should prefer depth24 or depth32float if both options are available. Therefore the result is implementation defined. It may be desired to specify a preference when both options are available.

My understanding is that this option is not available in core because not all targets require this format. Therefore it seems appropriate to add it as an extension.

  1. depth32float-stencil8 would be added to the GPUExtensionName enum.
  2. depth32float-stencil8 would be added to the GPUTextureFormat enum and documented to only be valid when the depth32float-stencil8 extension is available.

In terms of backend support you have:
Metal

  • Depth32Float_Stencil8 for MSAA on all targets

D3D12

  • DXGI_FORMAT_D32_FLOAT_S8X24_UINT support is required

Vulkan

  • Table 50: "VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT feature ... must be supported for at least one of VK_FORMAT_D24_UNORM_S8_UINT and VK_FORMAT_D32_SFLOAT_S8_UINT"

Metadata

Metadata

Assignees

Labels

feature requestA request for a new GPU feature exposed in the APIproposal

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions