Remove support for the weird 5 byte pixel format.

This commit is contained in:
Chinmay Garde
2022-01-06 12:17:59 -08:00
committed by Dan Field
parent 7d52f15ab7
commit 5e9aeeb11b
2 changed files with 0 additions and 12 deletions

View File

@@ -25,8 +25,6 @@ constexpr PixelFormat FromMTLPixelFormat(MTLPixelFormat format) {
return PixelFormat::kB8G8R8A8UNormInt;
case MTLPixelFormatBGRA8Unorm_sRGB:
return PixelFormat::kB8G8R8A8UNormIntSRGB;
case MTLPixelFormatDepth32Float_Stencil8:
return PixelFormat::kD32FloatS8UNormInt;
case MTLPixelFormatRGBA8Unorm:
return PixelFormat::kR8G8B8A8UNormInt;
case MTLPixelFormatStencil8:
@@ -47,8 +45,6 @@ constexpr MTLPixelFormat ToMTLPixelFormat(PixelFormat format) {
return MTLPixelFormatBGRA8Unorm;
case PixelFormat::kB8G8R8A8UNormIntSRGB:
return MTLPixelFormatBGRA8Unorm_sRGB;
case PixelFormat::kD32FloatS8UNormInt:
return MTLPixelFormatDepth32Float_Stencil8;
case PixelFormat::kR8G8B8A8UNormInt:
return MTLPixelFormatRGBA8Unorm;
case PixelFormat::kS8UInt:

View File

@@ -52,9 +52,6 @@ enum class PixelFormat {
kB8G8R8A8UNormIntSRGB,
kS8UInt,
// Esoteric formats only used as render targets.
kD32FloatS8UNormInt,
// Defaults. If you don't know which ones to use, these are usually a safe
// bet.
//
@@ -183,11 +180,6 @@ constexpr size_t BytesPerPixelForPixelFormat(PixelFormat format) {
case PixelFormat::kB8G8R8A8UNormInt:
case PixelFormat::kB8G8R8A8UNormIntSRGB:
return 4u;
case PixelFormat::kD32FloatS8UNormInt:
// This is an esoteric format and implementations may use 64 bits.
// Impeller doesn't work with these natively and this return is only here
// for completeness. The 40 bits is as documented.
return 5u;
}
return 0u;
}