Remove support for depth24unorm-stencil8

It was removed from the spec after determining it didn't provide any
additional capabilities beyond depth24plus-stencil8.

Bug: dawn:1454
Change-Id: Ifba62f22cd38bea88866c849c8d1754a2aa683e2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/92963
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Brandon Jones <bajones@chromium.org>
This commit is contained in:
Brandon Jones 2022-06-14 22:48:31 +00:00 committed by Dawn LUCI CQ
parent 3b808be7c5
commit 6d48f573af
26 changed files with 97 additions and 277 deletions

126
dawn.json
View File

@ -1345,14 +1345,13 @@
"values": [
{"value": 0, "name": "undefined", "jsrepr": "undefined"},
{"value": 1, "name": "depth clip control"},
{"value": 2, "name": "depth24 unorm stencil8"},
{"value": 3, "name": "depth32 float stencil8"},
{"value": 4, "name": "timestamp query"},
{"value": 5, "name": "pipeline statistics query"},
{"value": 6, "name": "texture compression BC"},
{"value": 7, "name": "texture compression ETC2"},
{"value": 8, "name": "texture compression ASTC"},
{"value": 9, "name": "indirect first instance"},
{"value": 2, "name": "depth32 float stencil8"},
{"value": 3, "name": "timestamp query"},
{"value": 4, "name": "pipeline statistics query"},
{"value": 5, "name": "texture compression BC"},
{"value": 6, "name": "texture compression ETC2"},
{"value": 7, "name": "texture compression ASTC"},
{"value": 8, "name": "indirect first instance"},
{"value": 1000, "name": "depth clamping", "tags": ["emscripten", "dawn"]},
{"value": 1001, "name": "dawn shader float 16", "tags": ["dawn"]},
{"value": 1002, "name": "dawn internal usages", "tags": ["dawn"]},
@ -2639,66 +2638,65 @@
{"value": 38, "name": "depth16 unorm"},
{"value": 39, "name": "depth24 plus"},
{"value": 40, "name": "depth24 plus stencil8"},
{"value": 41, "name": "depth24 unorm stencil8"},
{"value": 42, "name": "depth32 float"},
{"value": 43, "name": "depth32 float stencil8"},
{"value": 41, "name": "depth32 float"},
{"value": 42, "name": "depth32 float stencil8"},
{"value": 44, "name": "BC1 RGBA unorm", "jsrepr": "'bc1-rgba-unorm'"},
{"value": 45, "name": "BC1 RGBA unorm srgb", "jsrepr": "'bc1-rgba-unorm-srgb'"},
{"value": 46, "name": "BC2 RGBA unorm", "jsrepr": "'bc2-rgba-unorm'"},
{"value": 47, "name": "BC2 RGBA unorm srgb", "jsrepr": "'bc2-rgba-unorm-srgb'"},
{"value": 48, "name": "BC3 RGBA unorm", "jsrepr": "'bc3-rgba-unorm'"},
{"value": 49, "name": "BC3 RGBA unorm srgb", "jsrepr": "'bc3-rgba-unorm-srgb'"},
{"value": 50, "name": "BC4 R unorm", "jsrepr": "'bc4-r-unorm'"},
{"value": 51, "name": "BC4 R snorm", "jsrepr": "'bc4-r-snorm'"},
{"value": 52, "name": "BC5 RG unorm", "jsrepr": "'bc5-rg-unorm'"},
{"value": 53, "name": "BC5 RG snorm", "jsrepr": "'bc5-rg-snorm'"},
{"value": 54, "name": "BC6H RGB ufloat", "jsrepr": "'bc6h-rgb-ufloat'"},
{"value": 55, "name": "BC6H RGB float", "jsrepr": "'bc6h-rgb-float'"},
{"value": 56, "name": "BC7 RGBA unorm", "jsrepr": "'bc7-rgba-unorm'"},
{"value": 57, "name": "BC7 RGBA unorm srgb", "jsrepr": "'bc7-rgba-unorm-srgb'"},
{"value": 43, "name": "BC1 RGBA unorm", "jsrepr": "'bc1-rgba-unorm'"},
{"value": 44, "name": "BC1 RGBA unorm srgb", "jsrepr": "'bc1-rgba-unorm-srgb'"},
{"value": 45, "name": "BC2 RGBA unorm", "jsrepr": "'bc2-rgba-unorm'"},
{"value": 46, "name": "BC2 RGBA unorm srgb", "jsrepr": "'bc2-rgba-unorm-srgb'"},
{"value": 47, "name": "BC3 RGBA unorm", "jsrepr": "'bc3-rgba-unorm'"},
{"value": 48, "name": "BC3 RGBA unorm srgb", "jsrepr": "'bc3-rgba-unorm-srgb'"},
{"value": 49, "name": "BC4 R unorm", "jsrepr": "'bc4-r-unorm'"},
{"value": 50, "name": "BC4 R snorm", "jsrepr": "'bc4-r-snorm'"},
{"value": 51, "name": "BC5 RG unorm", "jsrepr": "'bc5-rg-unorm'"},
{"value": 52, "name": "BC5 RG snorm", "jsrepr": "'bc5-rg-snorm'"},
{"value": 53, "name": "BC6H RGB ufloat", "jsrepr": "'bc6h-rgb-ufloat'"},
{"value": 54, "name": "BC6H RGB float", "jsrepr": "'bc6h-rgb-float'"},
{"value": 55, "name": "BC7 RGBA unorm", "jsrepr": "'bc7-rgba-unorm'"},
{"value": 56, "name": "BC7 RGBA unorm srgb", "jsrepr": "'bc7-rgba-unorm-srgb'"},
{"value": 58, "name": "ETC2 RGB8 unorm", "jsrepr": "'etc2-rgb8unorm'"},
{"value": 59, "name": "ETC2 RGB8 unorm srgb", "jsrepr": "'etc2-rgb8unorm-srgb'"},
{"value": 60, "name": "ETC2 RGB8A1 unorm", "jsrepr": "'etc2-rgb8a1unorm'"},
{"value": 61, "name": "ETC2 RGB8A1 unorm srgb", "jsrepr": "'etc2-rgb8a1unorm-srgb'"},
{"value": 62, "name": "ETC2 RGBA8 unorm", "jsrepr": "'etc2-rgba8unorm'"},
{"value": 63, "name": "ETC2 RGBA8 unorm srgb", "jsrepr": "'etc2-rgba8unorm-srgb'"},
{"value": 64, "name": "EAC R11 unorm", "jsrepr": "'eac-r11unorm'"},
{"value": 65, "name": "EAC R11 snorm", "jsrepr": "'eac-r11snorm'"},
{"value": 66, "name": "EAC RG11 unorm", "jsrepr": "'eac-rg11unorm'"},
{"value": 67, "name": "EAC RG11 snorm", "jsrepr": "'eac-rg11snorm'"},
{"value": 57, "name": "ETC2 RGB8 unorm", "jsrepr": "'etc2-rgb8unorm'"},
{"value": 58, "name": "ETC2 RGB8 unorm srgb", "jsrepr": "'etc2-rgb8unorm-srgb'"},
{"value": 59, "name": "ETC2 RGB8A1 unorm", "jsrepr": "'etc2-rgb8a1unorm'"},
{"value": 60, "name": "ETC2 RGB8A1 unorm srgb", "jsrepr": "'etc2-rgb8a1unorm-srgb'"},
{"value": 61, "name": "ETC2 RGBA8 unorm", "jsrepr": "'etc2-rgba8unorm'"},
{"value": 62, "name": "ETC2 RGBA8 unorm srgb", "jsrepr": "'etc2-rgba8unorm-srgb'"},
{"value": 63, "name": "EAC R11 unorm", "jsrepr": "'eac-r11unorm'"},
{"value": 64, "name": "EAC R11 snorm", "jsrepr": "'eac-r11snorm'"},
{"value": 65, "name": "EAC RG11 unorm", "jsrepr": "'eac-rg11unorm'"},
{"value": 66, "name": "EAC RG11 snorm", "jsrepr": "'eac-rg11snorm'"},
{"value": 68, "name": "ASTC 4x4 unorm", "jsrepr": "'astc-4x4-unorm'"},
{"value": 69, "name": "ASTC 4x4 unorm srgb", "jsrepr": "'astc-4x4-unorm-srgb'"},
{"value": 70, "name": "ASTC 5x4 unorm", "jsrepr": "'astc-5x4-unorm'"},
{"value": 71, "name": "ASTC 5x4 unorm srgb", "jsrepr": "'astc-5x4-unorm-srgb'"},
{"value": 72, "name": "ASTC 5x5 unorm", "jsrepr": "'astc-5x5-unorm'"},
{"value": 73, "name": "ASTC 5x5 unorm srgb", "jsrepr": "'astc-5x5-unorm-srgb'"},
{"value": 74, "name": "ASTC 6x5 unorm", "jsrepr": "'astc-6x5-unorm'"},
{"value": 75, "name": "ASTC 6x5 unorm srgb", "jsrepr": "'astc-6x5-unorm-srgb'"},
{"value": 76, "name": "ASTC 6x6 unorm", "jsrepr": "'astc-6x6-unorm'"},
{"value": 77, "name": "ASTC 6x6 unorm srgb", "jsrepr": "'astc-6x6-unorm-srgb'"},
{"value": 78, "name": "ASTC 8x5 unorm", "jsrepr": "'astc-8x5-unorm'"},
{"value": 79, "name": "ASTC 8x5 unorm srgb", "jsrepr": "'astc-8x5-unorm-srgb'"},
{"value": 80, "name": "ASTC 8x6 unorm", "jsrepr": "'astc-8x6-unorm'"},
{"value": 81, "name": "ASTC 8x6 unorm srgb", "jsrepr": "'astc-8x6-unorm-srgb'"},
{"value": 82, "name": "ASTC 8x8 unorm", "jsrepr": "'astc-8x8-unorm'"},
{"value": 83, "name": "ASTC 8x8 unorm srgb", "jsrepr": "'astc-8x8-unorm-srgb'"},
{"value": 84, "name": "ASTC 10x5 unorm", "jsrepr": "'astc-10x5-unorm'"},
{"value": 85, "name": "ASTC 10x5 unorm srgb", "jsrepr": "'astc-10x5-unorm-srgb'"},
{"value": 86, "name": "ASTC 10x6 unorm", "jsrepr": "'astc-10x6-unorm'"},
{"value": 87, "name": "ASTC 10x6 unorm srgb", "jsrepr": "'astc-10x6-unorm-srgb'"},
{"value": 88, "name": "ASTC 10x8 unorm", "jsrepr": "'astc-10x8-unorm'"},
{"value": 89, "name": "ASTC 10x8 unorm srgb", "jsrepr": "'astc-10x8-unorm-srgb'"},
{"value": 90, "name": "ASTC 10x10 unorm", "jsrepr": "'astc-10x10-unorm'"},
{"value": 91, "name": "ASTC 10x10 unorm srgb", "jsrepr": "'astc-10x10-unorm-srgb'"},
{"value": 92, "name": "ASTC 12x10 unorm", "jsrepr": "'astc-12x10-unorm'"},
{"value": 93, "name": "ASTC 12x10 unorm srgb", "jsrepr": "'astc-12x10-unorm-srgb'"},
{"value": 94, "name": "ASTC 12x12 unorm", "jsrepr": "'astc-12x12-unorm'"},
{"value": 95, "name": "ASTC 12x12 unorm srgb", "jsrepr": "'astc-12x12-unorm-srgb'"},
{"value": 67, "name": "ASTC 4x4 unorm", "jsrepr": "'astc-4x4-unorm'"},
{"value": 68, "name": "ASTC 4x4 unorm srgb", "jsrepr": "'astc-4x4-unorm-srgb'"},
{"value": 69, "name": "ASTC 5x4 unorm", "jsrepr": "'astc-5x4-unorm'"},
{"value": 70, "name": "ASTC 5x4 unorm srgb", "jsrepr": "'astc-5x4-unorm-srgb'"},
{"value": 71, "name": "ASTC 5x5 unorm", "jsrepr": "'astc-5x5-unorm'"},
{"value": 72, "name": "ASTC 5x5 unorm srgb", "jsrepr": "'astc-5x5-unorm-srgb'"},
{"value": 73, "name": "ASTC 6x5 unorm", "jsrepr": "'astc-6x5-unorm'"},
{"value": 74, "name": "ASTC 6x5 unorm srgb", "jsrepr": "'astc-6x5-unorm-srgb'"},
{"value": 75, "name": "ASTC 6x6 unorm", "jsrepr": "'astc-6x6-unorm'"},
{"value": 76, "name": "ASTC 6x6 unorm srgb", "jsrepr": "'astc-6x6-unorm-srgb'"},
{"value": 77, "name": "ASTC 8x5 unorm", "jsrepr": "'astc-8x5-unorm'"},
{"value": 78, "name": "ASTC 8x5 unorm srgb", "jsrepr": "'astc-8x5-unorm-srgb'"},
{"value": 79, "name": "ASTC 8x6 unorm", "jsrepr": "'astc-8x6-unorm'"},
{"value": 80, "name": "ASTC 8x6 unorm srgb", "jsrepr": "'astc-8x6-unorm-srgb'"},
{"value": 81, "name": "ASTC 8x8 unorm", "jsrepr": "'astc-8x8-unorm'"},
{"value": 82, "name": "ASTC 8x8 unorm srgb", "jsrepr": "'astc-8x8-unorm-srgb'"},
{"value": 83, "name": "ASTC 10x5 unorm", "jsrepr": "'astc-10x5-unorm'"},
{"value": 84, "name": "ASTC 10x5 unorm srgb", "jsrepr": "'astc-10x5-unorm-srgb'"},
{"value": 85, "name": "ASTC 10x6 unorm", "jsrepr": "'astc-10x6-unorm'"},
{"value": 86, "name": "ASTC 10x6 unorm srgb", "jsrepr": "'astc-10x6-unorm-srgb'"},
{"value": 87, "name": "ASTC 10x8 unorm", "jsrepr": "'astc-10x8-unorm'"},
{"value": 88, "name": "ASTC 10x8 unorm srgb", "jsrepr": "'astc-10x8-unorm-srgb'"},
{"value": 89, "name": "ASTC 10x10 unorm", "jsrepr": "'astc-10x10-unorm'"},
{"value": 90, "name": "ASTC 10x10 unorm srgb", "jsrepr": "'astc-10x10-unorm-srgb'"},
{"value": 91, "name": "ASTC 12x10 unorm", "jsrepr": "'astc-12x10-unorm'"},
{"value": 92, "name": "ASTC 12x10 unorm srgb", "jsrepr": "'astc-12x10-unorm-srgb'"},
{"value": 93, "name": "ASTC 12x12 unorm", "jsrepr": "'astc-12x12-unorm'"},
{"value": 94, "name": "ASTC 12x12 unorm srgb", "jsrepr": "'astc-12x12-unorm-srgb'"},
{"value": 96, "name": "R8 BG8 Biplanar 420 unorm", "tags": ["dawn"]}
{"value": 95, "name": "R8 BG8 Biplanar 420 unorm", "tags": ["dawn"]}
]
},
"texture usage": {

View File

@ -92,7 +92,6 @@ MaybeError ValidateTextureDepthStencilToBufferCopyRestrictions(const ImageCopyTe
switch (src.texture->GetFormat().format) {
case wgpu::TextureFormat::Depth24Plus:
case wgpu::TextureFormat::Depth24PlusStencil8:
case wgpu::TextureFormat::Depth24UnormStencil8:
return DAWN_FORMAT_VALIDATION_ERROR(
"The depth aspect of %s format %s cannot be selected in a texture to "
"buffer copy.",

View File

@ -61,9 +61,6 @@ static constexpr FeatureEnumAndInfoList kFeatureNameAndInfoList = {{
{Feature::DepthClamping,
{"depth-clamping", "Clamp depth to [0, 1] in NDC space instead of clipping",
"https://bugs.chromium.org/p/dawn/issues/detail?id=716"}},
{Feature::Depth24UnormStencil8,
{"depth24unorm-stencil8", "Support depth24unorm-stencil8 texture format",
"https://bugs.chromium.org/p/dawn/issues/detail?id=690"}},
{Feature::Depth32FloatStencil8,
{"depth32float-stencil8", "Support depth32float-stencil8 texture format",
"https://bugs.chromium.org/p/dawn/issues/detail?id=690"}},
@ -107,8 +104,6 @@ Feature FromAPIFeature(wgpu::FeatureName feature) {
return Feature::DepthClipControl;
case wgpu::FeatureName::DepthClamping:
return Feature::DepthClamping;
case wgpu::FeatureName::Depth24UnormStencil8:
return Feature::Depth24UnormStencil8;
case wgpu::FeatureName::Depth32FloatStencil8:
return Feature::Depth32FloatStencil8;
case wgpu::FeatureName::IndirectFirstInstance:
@ -143,8 +138,6 @@ wgpu::FeatureName ToAPIFeature(Feature feature) {
return wgpu::FeatureName::DepthClipControl;
case Feature::DepthClamping:
return wgpu::FeatureName::DepthClamping;
case Feature::Depth24UnormStencil8:
return wgpu::FeatureName::Depth24UnormStencil8;
case Feature::Depth32FloatStencil8:
return wgpu::FeatureName::Depth32FloatStencil8;
case Feature::IndirectFirstInstance:

View File

@ -35,7 +35,6 @@ enum class Feature {
TimestampQuery,
DepthClipControl,
DepthClamping,
Depth24UnormStencil8,
Depth32FloatStencil8,
ChromiumExperimentalDp4a,
IndirectFirstInstance,

View File

@ -403,9 +403,6 @@ FormatTable BuildFormatTable(const DeviceBase* device) {
AddDepthFormat(wgpu::TextureFormat::Depth24Plus, 4, true);
AddMultiAspectFormat(wgpu::TextureFormat::Depth24PlusStencil8,
Aspect::Depth | Aspect::Stencil, wgpu::TextureFormat::Depth24Plus, wgpu::TextureFormat::Stencil8, true, true, true, 2);
bool isD24S8Supported = device->IsFeatureEnabled(Feature::Depth24UnormStencil8);
AddMultiAspectFormat(wgpu::TextureFormat::Depth24UnormStencil8,
Aspect::Depth | Aspect::Stencil, wgpu::TextureFormat::Depth24Plus, wgpu::TextureFormat::Stencil8, true, isD24S8Supported, true, 2);
AddDepthFormat(wgpu::TextureFormat::Depth32Float, 4, true);
bool isD32S8Supported = device->IsFeatureEnabled(Feature::Depth32FloatStencil8);
AddMultiAspectFormat(wgpu::TextureFormat::Depth32FloatStencil8,
@ -480,7 +477,8 @@ FormatTable BuildFormatTable(const DeviceBase* device) {
// clang-format on
// This checks that each format is set at least once, the second part of checking that all
// formats are checked exactly once.
// formats are checked exactly once. If this assertion is failing and texture formats have been
// added or removed recently, check that kKnownFormatCount has been updated.
ASSERT(formatsSet.all());
return table;

View File

@ -79,7 +79,7 @@ struct AspectInfo {
// The number of formats Dawn knows about. Asserts in BuildFormatTable ensure that this is the
// exact number of known format.
static constexpr uint32_t kKnownFormatCount = 96;
static constexpr uint32_t kKnownFormatCount = 95;
using FormatIndex = TypedInteger<struct FormatIndexT, uint32_t>;

View File

@ -135,7 +135,6 @@ MaybeError Adapter::InitializeSupportedFeaturesImpl() {
mSupportedFeatures.EnableFeature(Feature::TextureCompressionBC);
mSupportedFeatures.EnableFeature(Feature::PipelineStatisticsQuery);
mSupportedFeatures.EnableFeature(Feature::MultiPlanarFormats);
mSupportedFeatures.EnableFeature(Feature::Depth24UnormStencil8);
mSupportedFeatures.EnableFeature(Feature::Depth32FloatStencil8);
mSupportedFeatures.EnableFeature(Feature::IndirectFirstInstance);

View File

@ -176,9 +176,9 @@ DXGI_FORMAT D3D12TypelessTextureFormat(wgpu::TextureFormat format) {
case wgpu::TextureFormat::Depth24Plus:
return DXGI_FORMAT_R32_TYPELESS;
// Depth24UnormStencil8 is the smallest format supported on D3D12 that has stencil.
// DXGI_FORMAT_D24_UNORM_S8_UINT is the smallest format supported on D3D12 that has stencil,
// for which the typeless equivalent is DXGI_FORMAT_R24G8_TYPELESS.
case wgpu::TextureFormat::Stencil8:
case wgpu::TextureFormat::Depth24UnormStencil8:
return DXGI_FORMAT_R24G8_TYPELESS;
case wgpu::TextureFormat::Depth24PlusStencil8:
case wgpu::TextureFormat::Depth32FloatStencil8:
@ -344,9 +344,8 @@ DXGI_FORMAT D3D12TextureFormat(wgpu::TextureFormat format) {
case wgpu::TextureFormat::Depth32Float:
case wgpu::TextureFormat::Depth24Plus:
return DXGI_FORMAT_D32_FLOAT;
// Depth24UnormStencil8 is the smallest format supported on D3D12 that has stencil.
// DXGI_FORMAT_D24_UNORM_S8_UINT is the smallest format supported on D3D12 that has stencil.
case wgpu::TextureFormat::Stencil8:
case wgpu::TextureFormat::Depth24UnormStencil8:
return DXGI_FORMAT_D24_UNORM_S8_UINT;
case wgpu::TextureFormat::Depth24PlusStencil8:
case wgpu::TextureFormat::Depth32FloatStencil8:
@ -689,7 +688,6 @@ DXGI_FORMAT Texture::GetD3D12CopyableSubresourceFormat(Aspect aspect) const {
ASSERT(GetFormat().aspects & aspect);
switch (GetFormat().format) {
case wgpu::TextureFormat::Depth24UnormStencil8:
case wgpu::TextureFormat::Depth24PlusStencil8:
case wgpu::TextureFormat::Depth32FloatStencil8:
case wgpu::TextureFormat::Stencil8:
@ -1210,8 +1208,7 @@ TextureView::TextureView(TextureBase* texture, const TextureViewDescriptor* desc
case wgpu::TextureFormat::Depth16Unorm:
mSrvDesc.Format = DXGI_FORMAT_R16_UNORM;
break;
case wgpu::TextureFormat::Stencil8:
case wgpu::TextureFormat::Depth24UnormStencil8: {
case wgpu::TextureFormat::Stencil8: {
Aspect aspects = SelectFormatAspects(textureFormat, descriptor->aspect);
ASSERT(aspects != Aspect::None);
if (!HasZeroOrOneBits(aspects)) {

View File

@ -384,13 +384,6 @@ class Adapter : public AdapterBase {
mSupportedFeatures.EnableFeature(Feature::MultiPlanarFormats);
}
#if DAWN_PLATFORM_IS(MACOS)
// MTLPixelFormatDepth24Unorm_Stencil8 is only available on macOS 10.11+
if ([*mDevice isDepth24Stencil8PixelFormatSupported]) {
mSupportedFeatures.EnableFeature(Feature::Depth24UnormStencil8);
}
#endif
mSupportedFeatures.EnableFeature(Feature::IndirectFirstInstance);
return {};

View File

@ -318,9 +318,6 @@ MTLPixelFormat MetalPixelFormat(wgpu::TextureFormat format) {
return MTLPixelFormatStencil8;
#if DAWN_PLATFORM_IS(MACOS)
case wgpu::TextureFormat::Depth24UnormStencil8:
return MTLPixelFormatDepth24Unorm_Stencil8;
case wgpu::TextureFormat::BC1RGBAUnorm:
return MTLPixelFormatBC1_RGBA;
case wgpu::TextureFormat::BC1RGBAUnormSrgb:
@ -350,8 +347,6 @@ MTLPixelFormat MetalPixelFormat(wgpu::TextureFormat format) {
case wgpu::TextureFormat::BC7RGBAUnormSrgb:
return MTLPixelFormatBC7_RGBAUnorm_sRGB;
#else
case wgpu::TextureFormat::Depth24UnormStencil8:
case wgpu::TextureFormat::BC1RGBAUnorm:
case wgpu::TextureFormat::BC1RGBAUnormSrgb:
case wgpu::TextureFormat::BC2RGBAUnorm:
@ -1066,11 +1061,6 @@ MaybeError TextureView::Initialize(const TextureViewDescriptor* descriptor) {
if (textureFormat == MTLPixelFormatDepth32Float_Stencil8) {
viewFormat = MTLPixelFormatX32_Stencil8;
}
#if DAWN_PLATFORM_IS(MACOS)
else if (textureFormat == MTLPixelFormatDepth24Unorm_Stencil8) {
viewFormat = MTLPixelFormatX24_Stencil8;
}
#endif
else {
UNREACHABLE();
}

View File

@ -231,7 +231,6 @@ MaybeError Adapter::InitializeSupportedFeaturesImpl() {
supportsBPTC) {
mSupportedFeatures.EnableFeature(dawn::native::Feature::TextureCompressionBC);
}
mSupportedFeatures.EnableFeature(Feature::Depth24UnormStencil8);
}
// Non-zero baseInstance requires at least desktop OpenGL 4.2, and it is not supported in

View File

@ -92,7 +92,6 @@ GLFormatTable BuildGLFormatTable(GLenum internalFormatForBGRA) {
// Depth stencil formats
AddFormat(wgpu::TextureFormat::Depth32Float, GL_DEPTH_COMPONENT32F, GL_DEPTH_COMPONENT, GL_FLOAT, Type::DepthStencil);
AddFormat(wgpu::TextureFormat::Depth24Plus, GL_DEPTH_COMPONENT32F, GL_DEPTH_COMPONENT, GL_FLOAT, Type::DepthStencil);
AddFormat(wgpu::TextureFormat::Depth24UnormStencil8, GL_DEPTH24_STENCIL8, GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8, Type::DepthStencil);
AddFormat(wgpu::TextureFormat::Depth24PlusStencil8, GL_DEPTH32F_STENCIL8, GL_DEPTH_STENCIL, GL_FLOAT_32_UNSIGNED_INT_24_8_REV, Type::DepthStencil);
AddFormat(wgpu::TextureFormat::Depth16Unorm, GL_DEPTH_COMPONENT16, GL_DEPTH_COMPONENT, GL_UNSIGNED_SHORT, Type::DepthStencil);
AddFormat(wgpu::TextureFormat::Stencil8, GL_STENCIL_INDEX8, GL_STENCIL, GL_UNSIGNED_BYTE, Type::DepthStencil);

View File

@ -48,7 +48,6 @@ GLuint ToOpenGLCompareFunction(wgpu::CompareFunction compareFunction) {
GLint GetStencilMaskFromStencilFormat(wgpu::TextureFormat depthStencilFormat) {
switch (depthStencilFormat) {
case wgpu::TextureFormat::Depth24PlusStencil8:
case wgpu::TextureFormat::Depth24UnormStencil8:
case wgpu::TextureFormat::Depth32FloatStencil8:
case wgpu::TextureFormat::Stencil8:
return 0xFF;

View File

@ -155,10 +155,6 @@ MaybeError Adapter::InitializeSupportedFeaturesImpl() {
mSupportedFeatures.EnableFeature(Feature::TimestampQuery);
}
if (IsDepthStencilFormatSupported(VK_FORMAT_D24_UNORM_S8_UINT)) {
mSupportedFeatures.EnableFeature(Feature::Depth24UnormStencil8);
}
if (IsDepthStencilFormatSupported(VK_FORMAT_D32_SFLOAT_S8_UINT)) {
mSupportedFeatures.EnableFeature(Feature::Depth32FloatStencil8);
}

View File

@ -314,8 +314,6 @@ VkFormat VulkanImageFormat(const Device* device, wgpu::TextureFormat format) {
} else {
return VK_FORMAT_D24_UNORM_S8_UINT;
}
case wgpu::TextureFormat::Depth24UnormStencil8:
return VK_FORMAT_D24_UNORM_S8_UINT;
case wgpu::TextureFormat::Depth32FloatStencil8:
return VK_FORMAT_D32_SFLOAT_S8_UINT;
case wgpu::TextureFormat::Stencil8:

View File

@ -63,12 +63,6 @@ class DepthStencilCopyTests : public DawnTestWithParams<DepthStencilCopyTestPara
std::vector<wgpu::FeatureName> GetRequiredFeatures() override {
switch (GetParam().mTextureFormat) {
case wgpu::TextureFormat::Depth24UnormStencil8:
if (SupportsFeatures({wgpu::FeatureName::Depth24UnormStencil8})) {
mIsFormatSupported = true;
return {wgpu::FeatureName::Depth24UnormStencil8};
}
return {};
case wgpu::TextureFormat::Depth32FloatStencil8:
if (SupportsFeatures({wgpu::FeatureName::Depth32FloatStencil8})) {
mIsFormatSupported = true;

View File

@ -98,12 +98,6 @@ class DepthStencilLoadOpTests : public DawnTestWithParams<DepthStencilLoadOpTest
std::vector<wgpu::FeatureName> GetRequiredFeatures() override {
switch (GetParam().mFormat) {
case wgpu::TextureFormat::Depth24UnormStencil8:
if (SupportsFeatures({wgpu::FeatureName::Depth24UnormStencil8})) {
mIsFormatSupported = true;
return {wgpu::FeatureName::Depth24UnormStencil8};
}
return {};
case wgpu::TextureFormat::Depth32FloatStencil8:
if (SupportsFeatures({wgpu::FeatureName::Depth32FloatStencil8})) {
mIsFormatSupported = true;
@ -267,8 +261,7 @@ auto GenerateParam() {
auto params2 = MakeParamGenerator<DepthStencilLoadOpTestParams>(
{D3D12Backend(), D3D12Backend({}, {"use_d3d12_render_pass"}), MetalBackend(),
OpenGLBackend(), OpenGLESBackend(), VulkanBackend()},
{wgpu::TextureFormat::Depth24PlusStencil8, wgpu::TextureFormat::Depth24UnormStencil8,
wgpu::TextureFormat::Depth32FloatStencil8},
{wgpu::TextureFormat::Depth24PlusStencil8, wgpu::TextureFormat::Depth32FloatStencil8},
{Check::CopyStencil, Check::StencilTest, Check::DepthTest, Check::SampleDepth});
std::vector<DepthStencilLoadOpTestParams> allParams;
@ -322,7 +315,6 @@ DAWN_INSTANTIATE_TEST_P(StencilClearValueOverflowTest,
{D3D12Backend(), D3D12Backend({}, {"use_d3d12_render_pass"}),
MetalBackend(), OpenGLBackend(), OpenGLESBackend(), VulkanBackend()},
{wgpu::TextureFormat::Depth24PlusStencil8,
wgpu::TextureFormat::Depth24UnormStencil8,
wgpu::TextureFormat::Depth32FloatStencil8, wgpu::TextureFormat::Stencil8},
{Check::CopyStencil, Check::StencilTest});

View File

@ -62,12 +62,6 @@ class DepthStencilSamplingTest : public DawnTestWithParams<DepthStencilSamplingT
std::vector<wgpu::FeatureName> GetRequiredFeatures() override {
switch (GetParam().mTextureFormat) {
case wgpu::TextureFormat::Depth24UnormStencil8:
if (SupportsFeatures({wgpu::FeatureName::Depth24UnormStencil8})) {
mIsFormatSupported = true;
return {wgpu::FeatureName::Depth24UnormStencil8};
}
return {};
case wgpu::TextureFormat::Depth32FloatStencil8:
if (SupportsFeatures({wgpu::FeatureName::Depth32FloatStencil8})) {
mIsFormatSupported = true;
@ -610,10 +604,6 @@ TEST_P(DepthStencilSamplingTest, SampleExtraComponents) {
wgpu::TextureFormat format = GetParam().mTextureFormat;
// TODO(crbug.com/dawn/1239): depth24unorm-stencil8 fails on D3D12 Nvidia old driver version.
DAWN_SUPPRESS_TEST_IF(format == wgpu::TextureFormat::Depth24UnormStencil8 && IsD3D12() &&
IsNvidia());
DoSamplingExtraStencilComponentsRenderTest(TestAspect::Stencil, format,
{uint8_t(42), uint8_t(37)});
@ -636,8 +626,6 @@ TEST_P(DepthStencilSamplingTest, SampleDepthAndStencilRender) {
wgpu::TextureViewDescriptor stencilViewDesc = {};
stencilViewDesc.aspect = wgpu::TextureAspect::StencilOnly;
float tolerance = format == wgpu::TextureFormat::Depth24UnormStencil8 ? 0.001f : 0.0f;
// With render pipeline
{
wgpu::RenderPipeline pipeline =
@ -683,8 +671,7 @@ TEST_P(DepthStencilSamplingTest, SampleDepthAndStencilRender) {
float expectedDepth = 0.0f;
memcpy(&expectedDepth, &passDescriptor.cDepthStencilAttachmentInfo.depthClearValue,
sizeof(float));
EXPECT_BUFFER(depthOutput, 0, sizeof(float),
new ::detail::ExpectEq<float>(expectedDepth, tolerance));
EXPECT_BUFFER(depthOutput, 0, sizeof(float), new ::detail::ExpectEq<float>(expectedDepth));
uint8_t expectedStencil = 0;
memcpy(&expectedStencil, &passDescriptor.cDepthStencilAttachmentInfo.stencilClearValue,
@ -731,8 +718,7 @@ TEST_P(DepthStencilSamplingTest, SampleDepthAndStencilRender) {
float expectedDepth = 0.0f;
memcpy(&expectedDepth, &passDescriptor.cDepthStencilAttachmentInfo.depthClearValue,
sizeof(float));
EXPECT_BUFFER(depthOutput, 0, sizeof(float),
new ::detail::ExpectEq<float>(expectedDepth, tolerance));
EXPECT_BUFFER(depthOutput, 0, sizeof(float), new ::detail::ExpectEq<float>(expectedDepth));
uint8_t expectedStencil = 0;
memcpy(&expectedStencil, &passDescriptor.cDepthStencilAttachmentInfo.stencilClearValue,
@ -746,10 +732,7 @@ class DepthSamplingTest : public DepthStencilSamplingTest {};
// Test that sampling a depth texture with a render/compute pipeline works
TEST_P(DepthSamplingTest, SampleDepthOnly) {
wgpu::TextureFormat format = GetParam().mTextureFormat;
float tolerance = format == wgpu::TextureFormat::Depth16Unorm ||
format == wgpu::TextureFormat::Depth24UnormStencil8
? 0.001f
: 0.0f;
float tolerance = format == wgpu::TextureFormat::Depth16Unorm ? 0.001f : 0.0f;
// Test 0, between [0, 1], and 1.
DoSamplingTest(TestAspect::Depth, CreateSamplingRenderPipeline({TestAspect::Depth}, 0), format,
@ -765,10 +748,8 @@ TEST_P(DepthSamplingTest, CompareFunctionsRender) {
DAWN_SUPPRESS_TEST_IF(IsMetal() && IsIntel());
wgpu::TextureFormat format = GetParam().mTextureFormat;
// Test does not account for precision issues when comparison testing Depth16Unorm and
// Depth24UnormStencil8.
DAWN_TEST_UNSUPPORTED_IF(format == wgpu::TextureFormat::Depth16Unorm ||
format == wgpu::TextureFormat::Depth24UnormStencil8);
// Test does not account for precision issues when comparison testing Depth16Unorm.
DAWN_TEST_UNSUPPORTED_IF(format == wgpu::TextureFormat::Depth16Unorm);
wgpu::RenderPipeline pipeline = CreateComparisonRenderPipeline();

View File

@ -37,13 +37,6 @@ class ReadOnlyDepthStencilAttachmentTests
std::vector<wgpu::FeatureName> GetRequiredFeatures() override {
switch (GetParam().mTextureFormat) {
case wgpu::TextureFormat::Depth24UnormStencil8:
if (SupportsFeatures({wgpu::FeatureName::Depth24UnormStencil8})) {
mIsFormatSupported = true;
return {wgpu::FeatureName::Depth24UnormStencil8};
}
return {};
case wgpu::TextureFormat::Depth32FloatStencil8:
if (SupportsFeatures({wgpu::FeatureName::Depth32FloatStencil8})) {
mIsFormatSupported = true;

View File

@ -422,10 +422,9 @@ class CopyCommandTest_B2T : public CopyCommandTest {
protected:
WGPUDevice CreateTestDevice(dawn::native::Adapter dawnAdapter) override {
wgpu::DeviceDescriptor descriptor;
wgpu::FeatureName requiredFeatures[2] = {wgpu::FeatureName::Depth24UnormStencil8,
wgpu::FeatureName::Depth32FloatStencil8};
wgpu::FeatureName requiredFeatures[1] = {wgpu::FeatureName::Depth32FloatStencil8};
descriptor.requiredFeatures = requiredFeatures;
descriptor.requiredFeaturesCount = 2;
descriptor.requiredFeaturesCount = 1;
return dawnAdapter.CreateDevice(&descriptor);
}
};
@ -718,12 +717,10 @@ TEST_F(CopyCommandTest_B2T, IncorrectBufferOffsetForColorTexture) {
TEST_F(CopyCommandTest_B2T, IncorrectBufferOffsetForDepthStencilTexture) {
// TODO(dawn:570, dawn:666): List other valid parameters after missing texture formats
// are implemented, e.g. Stencil8.
std::array<std::tuple<wgpu::TextureFormat, wgpu::TextureAspect>, 5> params = {
std::array<std::tuple<wgpu::TextureFormat, wgpu::TextureAspect>, 4> params = {
std::make_tuple(wgpu::TextureFormat::Depth16Unorm, wgpu::TextureAspect::DepthOnly),
std::make_tuple(wgpu::TextureFormat::Depth16Unorm, wgpu::TextureAspect::All),
std::make_tuple(wgpu::TextureFormat::Depth24PlusStencil8, wgpu::TextureAspect::StencilOnly),
std::make_tuple(wgpu::TextureFormat::Depth24UnormStencil8,
wgpu::TextureAspect::StencilOnly),
std::make_tuple(wgpu::TextureFormat::Depth32FloatStencil8,
wgpu::TextureAspect::StencilOnly),
};
@ -893,9 +890,10 @@ TEST_F(CopyCommandTest_B2T, CopyToDepthAspect) {
}
}
constexpr std::array<wgpu::TextureFormat, 5> kDisallowBufferToDepthCopyFormats = {
wgpu::TextureFormat::Depth32Float, wgpu::TextureFormat::Depth24Plus,
wgpu::TextureFormat::Depth24PlusStencil8, wgpu::TextureFormat::Depth24UnormStencil8,
constexpr std::array<wgpu::TextureFormat, 4> kDisallowBufferToDepthCopyFormats = {
wgpu::TextureFormat::Depth32Float,
wgpu::TextureFormat::Depth24Plus,
wgpu::TextureFormat::Depth24PlusStencil8,
wgpu::TextureFormat::Depth32FloatStencil8,
};
@ -1032,10 +1030,9 @@ class CopyCommandTest_T2B : public CopyCommandTest {
protected:
WGPUDevice CreateTestDevice(dawn::native::Adapter dawnAdapter) override {
wgpu::DeviceDescriptor descriptor;
wgpu::FeatureName requiredFeatures[2] = {wgpu::FeatureName::Depth24UnormStencil8,
wgpu::FeatureName::Depth32FloatStencil8};
wgpu::FeatureName requiredFeatures[1] = {wgpu::FeatureName::Depth32FloatStencil8};
descriptor.requiredFeatures = requiredFeatures;
descriptor.requiredFeaturesCount = 2;
descriptor.requiredFeaturesCount = 1;
return dawnAdapter.CreateDevice(&descriptor);
}
};
@ -1354,14 +1351,12 @@ TEST_F(CopyCommandTest_T2B, IncorrectBufferOffsetForColorTexture) {
TEST_F(CopyCommandTest_T2B, IncorrectBufferOffsetForDepthStencilTexture) {
// TODO(dawn:570, dawn:666): List other valid parameters after missing texture formats
// are implemented, e.g. Stencil8.
std::array<std::tuple<wgpu::TextureFormat, wgpu::TextureAspect>, 8> params = {
std::array<std::tuple<wgpu::TextureFormat, wgpu::TextureAspect>, 7> params = {
std::make_tuple(wgpu::TextureFormat::Depth16Unorm, wgpu::TextureAspect::DepthOnly),
std::make_tuple(wgpu::TextureFormat::Depth16Unorm, wgpu::TextureAspect::All),
std::make_tuple(wgpu::TextureFormat::Depth24PlusStencil8, wgpu::TextureAspect::StencilOnly),
std::make_tuple(wgpu::TextureFormat::Depth32Float, wgpu::TextureAspect::DepthOnly),
std::make_tuple(wgpu::TextureFormat::Depth32Float, wgpu::TextureAspect::All),
std::make_tuple(wgpu::TextureFormat::Depth24UnormStencil8,
wgpu::TextureAspect::StencilOnly),
std::make_tuple(wgpu::TextureFormat::Depth32FloatStencil8, wgpu::TextureAspect::DepthOnly),
std::make_tuple(wgpu::TextureFormat::Depth32FloatStencil8,
wgpu::TextureAspect::StencilOnly),
@ -1538,9 +1533,10 @@ TEST_F(CopyCommandTest_T2B, CopyFromDepthAspect) {
}
}
constexpr std::array<wgpu::TextureFormat, 3> kDisallowDepthCopyFormats = {
wgpu::TextureFormat::Depth24Plus, wgpu::TextureFormat::Depth24PlusStencil8,
wgpu::TextureFormat::Depth24UnormStencil8};
constexpr std::array<wgpu::TextureFormat, 2> kDisallowDepthCopyFormats = {
wgpu::TextureFormat::Depth24Plus,
wgpu::TextureFormat::Depth24PlusStencil8,
};
for (wgpu::TextureFormat format : kDisallowDepthCopyFormats) {
{
wgpu::Texture source =
@ -1671,10 +1667,9 @@ class CopyCommandTest_T2T : public CopyCommandTest {
protected:
WGPUDevice CreateTestDevice(dawn::native::Adapter dawnAdapter) override {
wgpu::DeviceDescriptor descriptor;
wgpu::FeatureName requiredFeatures[2] = {wgpu::FeatureName::Depth24UnormStencil8,
wgpu::FeatureName::Depth32FloatStencil8};
wgpu::FeatureName requiredFeatures[1] = {wgpu::FeatureName::Depth32FloatStencil8};
descriptor.requiredFeatures = requiredFeatures;
descriptor.requiredFeaturesCount = 2;
descriptor.requiredFeaturesCount = 1;
return dawnAdapter.CreateDevice(&descriptor);
}

View File

@ -663,14 +663,6 @@ TEST_F(TextureValidationTest, TextureFormatUndefined) {
ASSERT_DEVICE_ERROR(device.CreateTexture(&descriptor));
}
// Test that the creation of a texture with depth24unorm-stencil8 will fail when the feature
// Depth24UnormStencil8 is not enabled.
TEST_F(TextureValidationTest, UseD24S8FormatWithoutEnablingFeature) {
wgpu::TextureDescriptor descriptor = CreateDefaultTextureDescriptor();
descriptor.format = wgpu::TextureFormat::Depth24UnormStencil8;
ASSERT_DEVICE_ERROR(device.CreateTexture(&descriptor));
}
// Test that the creation of a texture with depth32float-stencil8 will fail when the feature
// Depth32FloatStencil8 is not enabled.
TEST_F(TextureValidationTest, UseD32S8FormatWithoutEnablingFeature) {
@ -709,28 +701,6 @@ TEST_F(TextureValidationTest, UseASTCFormatWithoutEnablingFeature) {
}
}
class D24S8TextureFormatsValidationTests : public TextureValidationTest {
protected:
WGPUDevice CreateTestDevice(dawn::native::Adapter dawnAdapter) override {
wgpu::DeviceDescriptor descriptor;
wgpu::FeatureName requiredFeatures[1] = {wgpu::FeatureName::Depth24UnormStencil8};
descriptor.requiredFeatures = requiredFeatures;
descriptor.requiredFeaturesCount = 1;
return dawnAdapter.CreateDevice(&descriptor);
}
};
// Test that depth24unorm-stencil8 format is invalid for 3D texture
TEST_F(D24S8TextureFormatsValidationTests, DepthStencilFormatsFor3D) {
wgpu::TextureDescriptor descriptor = CreateDefaultTextureDescriptor();
for (wgpu::TextureDimension dimension : kDimensions) {
descriptor.format = wgpu::TextureFormat::Depth24UnormStencil8;
descriptor.dimension = dimension;
ASSERT_DEVICE_ERROR(device.CreateTexture(&descriptor));
}
}
class D32S8TextureFormatsValidationTests : public TextureValidationTest {
protected:
WGPUDevice CreateTestDevice(dawn::native::Adapter dawnAdapter) override {

View File

@ -746,15 +746,6 @@ TEST_F(TextureViewValidationTest, TextureViewFormatCompatibility) {
ASSERT_DEVICE_ERROR(texture.CreateView(&viewDesc));
}
// Regression test for crbug.com/1312780.
// viewFormat is not supported (Null backend does not support any optional features).
{
textureDesc.format = wgpu::TextureFormat::Depth24PlusStencil8;
viewDesc.format = wgpu::TextureFormat::Depth24UnormStencil8;
wgpu::Texture texture = device.CreateTexture(&textureDesc);
ASSERT_DEVICE_ERROR(texture.CreateView(&viewDesc), testing::HasSubstr("Unsupported"));
}
// It is valid to create a texture view with a depth format of a depth-stencil texture
// if the depth only aspect is selected.
{
@ -923,52 +914,6 @@ TEST_F(TextureViewValidationTest, AspectMustExist) {
}
}
class D24S8TextureViewValidationTests : public ValidationTest {
protected:
WGPUDevice CreateTestDevice(dawn::native::Adapter dawnAdapter) override {
wgpu::DeviceDescriptor descriptor;
wgpu::FeatureName requiredFeatures[1] = {wgpu::FeatureName::Depth24UnormStencil8};
descriptor.requiredFeatures = requiredFeatures;
descriptor.requiredFeaturesCount = 1;
return dawnAdapter.CreateDevice(&descriptor);
}
};
// Test that the selected TextureAspects must exist in the Depth24UnormStencil8 texture format
TEST_F(D24S8TextureViewValidationTests, AspectMustExist) {
wgpu::Texture texture =
CreateDepthStencilTexture(device, wgpu::TextureFormat::Depth24UnormStencil8);
// Can select: All, DepthOnly, and StencilOnly from Depth24UnormStencil8
{
wgpu::TextureViewDescriptor viewDescriptor = {};
viewDescriptor.aspect = wgpu::TextureAspect::All;
texture.CreateView(&viewDescriptor);
viewDescriptor.aspect = wgpu::TextureAspect::DepthOnly;
texture.CreateView(&viewDescriptor);
viewDescriptor.aspect = wgpu::TextureAspect::StencilOnly;
texture.CreateView(&viewDescriptor);
}
}
// Test the format compatibility rules when creating a texture view.
TEST_F(D24S8TextureViewValidationTests, TextureViewFormatCompatibility) {
wgpu::Texture texture =
CreateDepthStencilTexture(device, wgpu::TextureFormat::Depth24UnormStencil8);
wgpu::TextureViewDescriptor base2DTextureViewDescriptor =
CreateDefaultViewDescriptor(wgpu::TextureViewDimension::e2D);
// It is an error to create a texture view in color format on a depth-stencil texture.
{
wgpu::TextureViewDescriptor descriptor = base2DTextureViewDescriptor;
descriptor.format = wgpu::TextureFormat::RGBA8Unorm;
ASSERT_DEVICE_ERROR(texture.CreateView(&descriptor));
}
}
class D32S8TextureViewValidationTests : public ValidationTest {
protected:
WGPUDevice CreateTestDevice(dawn::native::Adapter dawnAdapter) override {

View File

@ -198,7 +198,7 @@ TEST_F(WireInstanceTests, RequestAdapterWireLacksFeatureSupport) {
instance.RequestAdapter(&options, cb.Callback(), userdata);
std::initializer_list<wgpu::FeatureName> fakeFeatures = {
wgpu::FeatureName::Depth24UnormStencil8,
wgpu::FeatureName::Depth32FloatStencil8,
// Some value that is not a valid feature
static_cast<wgpu::FeatureName>(-2),
};
@ -246,7 +246,7 @@ TEST_F(WireInstanceTests, RequestAdapterWireLacksFeatureSupport) {
ASSERT_EQ(adapter.EnumerateFeatures(nullptr), 1u);
adapter.EnumerateFeatures(&feature);
EXPECT_EQ(feature, wgpu::FeatureName::Depth24UnormStencil8);
EXPECT_EQ(feature, wgpu::FeatureName::Depth32FloatStencil8);
})));
FlushServer();
}

View File

@ -272,7 +272,6 @@ uint32_t GetTexelBlockSizeInBytes(wgpu::TextureFormat textureFormat) {
return 2u;
case wgpu::TextureFormat::Depth24Plus:
case wgpu::TextureFormat::Depth24UnormStencil8:
case wgpu::TextureFormat::Depth32Float:
return 4u;
@ -392,7 +391,6 @@ uint32_t GetTextureFormatBlockWidth(wgpu::TextureFormat textureFormat) {
case wgpu::TextureFormat::Depth24Plus:
case wgpu::TextureFormat::Depth24PlusStencil8:
case wgpu::TextureFormat::Depth16Unorm:
case wgpu::TextureFormat::Depth24UnormStencil8:
case wgpu::TextureFormat::Depth32FloatStencil8:
case wgpu::TextureFormat::Stencil8:
return 1u;
@ -509,7 +507,6 @@ uint32_t GetTextureFormatBlockHeight(wgpu::TextureFormat textureFormat) {
case wgpu::TextureFormat::Depth24Plus:
case wgpu::TextureFormat::Depth24PlusStencil8:
case wgpu::TextureFormat::Depth16Unorm:
case wgpu::TextureFormat::Depth24UnormStencil8:
case wgpu::TextureFormat::Depth32FloatStencil8:
case wgpu::TextureFormat::Stencil8:
return 1u;

View File

@ -63,7 +63,6 @@ static constexpr std::array<wgpu::TextureFormat, 95> kAllTextureFormats = {
wgpu::TextureFormat::Depth32Float,
wgpu::TextureFormat::Depth24Plus,
wgpu::TextureFormat::Depth24PlusStencil8,
wgpu::TextureFormat::Depth24UnormStencil8,
wgpu::TextureFormat::Depth32FloatStencil8,
wgpu::TextureFormat::Stencil8,
wgpu::TextureFormat::BC1RGBAUnorm,
@ -206,20 +205,18 @@ static_assert(kCompressedFormats.size() ==
kBCFormats.size() + kETC2Formats.size() + kASTCFormats.size(),
"Number of compressed format must equal number of BC, ETC2, and ASTC formats.");
static constexpr std::array<wgpu::TextureFormat, 6> kDepthFormats = {
static constexpr std::array<wgpu::TextureFormat, 5> kDepthFormats = {
wgpu::TextureFormat::Depth16Unorm, wgpu::TextureFormat::Depth32Float,
wgpu::TextureFormat::Depth24Plus, wgpu::TextureFormat::Depth24PlusStencil8,
wgpu::TextureFormat::Depth24UnormStencil8, wgpu::TextureFormat::Depth32FloatStencil8,
wgpu::TextureFormat::Depth32FloatStencil8,
};
static constexpr std::array<wgpu::TextureFormat, 4> kStencilFormats = {
static constexpr std::array<wgpu::TextureFormat, 3> kStencilFormats = {
wgpu::TextureFormat::Depth24PlusStencil8,
wgpu::TextureFormat::Depth24UnormStencil8,
wgpu::TextureFormat::Depth32FloatStencil8,
wgpu::TextureFormat::Stencil8,
};
static constexpr std::array<wgpu::TextureFormat, 3> kDepthAndStencilFormats = {
static constexpr std::array<wgpu::TextureFormat, 2> kDepthAndStencilFormats = {
wgpu::TextureFormat::Depth24PlusStencil8,
wgpu::TextureFormat::Depth24UnormStencil8,
wgpu::TextureFormat::Depth32FloatStencil8,
};

View File

@ -24,7 +24,6 @@ bool IsFeatureSupported(WGPUFeatureName feature) {
case WGPUFeatureName_Force32:
case WGPUFeatureName_DawnNative:
return false;
case WGPUFeatureName_Depth24UnormStencil8:
case WGPUFeatureName_Depth32FloatStencil8:
case WGPUFeatureName_TimestampQuery:
case WGPUFeatureName_PipelineStatisticsQuery: