Remove vestiges of 32 float texture format support

Change-Id: I186b2ea83a0c41f0ff1ecfe4163704c71ed121fb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/244881
Commit-Queue: Greg Daniel <egdaniel@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
This commit is contained in:
Brian Salomon 2019-09-27 14:40:20 -04:00 committed by Skia Commit-Bot
parent 052761f1ae
commit dcbc359a00
19 changed files with 9 additions and 121 deletions

View File

@ -7,6 +7,7 @@ This file includes a list of high level updates for each milestone release.
* Remove isRectContour and ksNestedFillRects from public
* Start to move nested SkPath types (e.g. Direction, Verb) up to root level in SkPathTypes.h
* Remove Vulkan/Metal float32 RGBA texture support
Milestone 79

View File

@ -70,7 +70,6 @@ enum class GrGLFormat {
kRG8,
kRGB10_A2,
kRGBA4,
kRGBA32F,
kSRGB8_ALPHA8,
kCOMPRESSED_RGB8_ETC2,
kCOMPRESSED_ETC1_RGB8,

View File

@ -54,7 +54,6 @@ enum GrPixelConfig {
kBGRA_8888_GrPixelConfig,
kSRGBA_8888_GrPixelConfig,
kRGBA_1010102_GrPixelConfig,
kRGBA_float_GrPixelConfig,
kAlpha_half_GrPixelConfig,
kAlpha_half_as_Lum_GrPixelConfig,
kAlpha_half_as_Red_GrPixelConfig,
@ -859,8 +858,6 @@ static constexpr size_t GrBytesPerPixel(GrPixelConfig config) {
case kRGBA_half_Clamped_GrPixelConfig:
case kRGBA_16161616_GrPixelConfig:
return 8;
case kRGBA_float_GrPixelConfig:
return 16;
case kUnknown_GrPixelConfig:
case kRGB_ETC1_GrPixelConfig:
return 0;
@ -895,7 +892,6 @@ static constexpr bool GrPixelConfigIsOpaque(GrPixelConfig config) {
case kRGBA_1010102_GrPixelConfig:
case kRGBA_half_GrPixelConfig:
case kRGBA_half_Clamped_GrPixelConfig:
case kRGBA_float_GrPixelConfig:
case kRGBA_16161616_GrPixelConfig:
case kUnknown_GrPixelConfig:
return false;
@ -926,7 +922,6 @@ static constexpr bool GrPixelConfigIsAlphaOnly(GrPixelConfig config) {
case kBGRA_8888_GrPixelConfig:
case kSRGBA_8888_GrPixelConfig:
case kRGBA_1010102_GrPixelConfig:
case kRGBA_float_GrPixelConfig:
case kRGBA_half_GrPixelConfig:
case kRGBA_half_Clamped_GrPixelConfig:
case kRGB_ETC1_GrPixelConfig:
@ -961,7 +956,6 @@ static constexpr bool GrPixelConfigIsFloatingPoint(GrPixelConfig config) {
case kRG_1616_GrPixelConfig:
case kRGBA_16161616_GrPixelConfig:
return false;
case kRGBA_float_GrPixelConfig:
case kAlpha_half_GrPixelConfig:
case kAlpha_half_as_Lum_GrPixelConfig:
case kAlpha_half_as_Red_GrPixelConfig:
@ -1370,8 +1364,6 @@ static constexpr GrColorType GrPixelConfigToColorType(GrPixelConfig config) {
return GrColorType::kRGBA_8888_SRGB;
case kRGBA_1010102_GrPixelConfig:
return GrColorType::kRGBA_1010102;
case kRGBA_float_GrPixelConfig:
return GrColorType::kRGBA_F32;
case kAlpha_half_GrPixelConfig:
return GrColorType::kAlpha_F16;
case kRGBA_half_GrPixelConfig:
@ -1418,7 +1410,7 @@ static constexpr GrPixelConfig GrColorTypeToPixelConfig(GrColorType colorType) {
case GrColorType::kRG_88: return kRG_88_GrPixelConfig;
case GrColorType::kBGRA_8888: return kBGRA_8888_GrPixelConfig;
case GrColorType::kRGBA_1010102: return kRGBA_1010102_GrPixelConfig;
case GrColorType::kRGBA_F32: return kRGBA_float_GrPixelConfig;
case GrColorType::kRGBA_F32: return kUnknown_GrPixelConfig;
case GrColorType::kAlpha_F16: return kAlpha_half_GrPixelConfig;
case GrColorType::kRGBA_F16: return kRGBA_half_GrPixelConfig;
case GrColorType::kRGBA_F16_Clamped: return kRGBA_half_Clamped_GrPixelConfig;
@ -1483,7 +1475,6 @@ static constexpr const char* GrPixelConfigToStr(GrPixelConfig config) {
case kBGRA_8888_GrPixelConfig: return "BGRA8888";
case kSRGBA_8888_GrPixelConfig: return "SRGBA8888";
case kRGBA_1010102_GrPixelConfig: return "RGBA1010102";
case kRGBA_float_GrPixelConfig: return "RGBAFloat";
case kAlpha_half_GrPixelConfig: return "AlphaHalf";
case kAlpha_half_as_Lum_GrPixelConfig: return "AlphaHalf_asLum";
case kAlpha_half_as_Red_GrPixelConfig: return "AlphaHalf_asRed";

View File

@ -243,13 +243,6 @@ static bool fill_buffer_with_color(GrPixelConfig config, int width, int height,
sk_memset32((uint32_t *) dest, rgba1010102, width * height);
break;
}
case kRGBA_float_GrPixelConfig: {
SkColor4f* destColor = (SkColor4f*) dest;
for (int i = 0; i < width * height; ++i) {
destColor[i] = colorf;
}
break;
}
case kAlpha_half_as_Lum_GrPixelConfig: // fall through
case kAlpha_half_as_Red_GrPixelConfig: // fall through
case kAlpha_half_GrPixelConfig: {

View File

@ -256,7 +256,7 @@ GrPixelConfig SkColorType2GrPixelConfig(const SkColorType type) {
case kRGBA_F16_SkColorType:
return kRGBA_half_GrPixelConfig;
case kRGBA_F32_SkColorType:
return kRGBA_float_GrPixelConfig;
return kUnknown_GrPixelConfig;
case kR8G8_unorm_SkColorType:
return kRG_88_GrPixelConfig;
case kR16G16_unorm_SkColorType:

View File

@ -2473,16 +2473,6 @@ void GrGLCaps::initFormatTable(const GrGLContextInfo& ctxInfo, const GrGLInterfa
}
}
// Format: RGBA32F
{
FormatInfo& info = this->getFormatInfo(GrGLFormat::kRGBA32F);
info.fFormatType = FormatType::kFloat;
info.fInternalFormatForTexImageOrStorage =
texImageSupportsSizedInternalFormat ? GR_GL_RGBA32F : GR_GL_RGBA;
info.fInternalFormatForRenderbuffer = GR_GL_RGBA32F;
// We don't allow texturing or rendering to this format
}
// Format: SRGB8_ALPHA8
{
FormatInfo& info = this->getFormatInfo(GrGLFormat::kSRGB8_ALPHA8);
@ -4036,11 +4026,6 @@ static GrPixelConfig validate_sized_format(GrGLFormat format,
return kRGBA_half_Clamped_GrPixelConfig;
}
break;
case GrColorType::kRGBA_F32:
if (format == GrGLFormat::kRGBA32F) {
return kRGBA_float_GrPixelConfig;
}
break;
case GrColorType::kAlpha_16:
if (format == GrGLFormat::kR16) {
return kAlpha_16_GrPixelConfig;
@ -4063,6 +4048,7 @@ static GrPixelConfig validate_sized_format(GrGLFormat format,
break;
// These have no equivalent config:
case GrColorType::kRGBA_F32:
case GrColorType::kAlpha_8xxx:
case GrColorType::kAlpha_F32xxx:
case GrColorType::kGray_8xxx:
@ -4198,8 +4184,6 @@ std::vector<GrCaps::TestFormatColorTypeCombination> GrGLCaps::getTestingCombinat
GrBackendFormat::MakeGL(GR_GL_RGBA16F, GR_GL_TEXTURE_2D) },
{ GrColorType::kRGBA_F16_Clamped,
GrBackendFormat::MakeGL(GR_GL_RGBA16F, GR_GL_TEXTURE_2D) },
{ GrColorType::kRGBA_F32,
GrBackendFormat::MakeGL(GR_GL_RGBA32F, GR_GL_TEXTURE_2D) },
{ GrColorType::kAlpha_16,
GrBackendFormat::MakeGL(GR_GL_R16, GR_GL_TEXTURE_2D) },
{ GrColorType::kRG_1616,

View File

@ -3486,7 +3486,6 @@ static GrPixelConfig gl_format_to_pixel_config(GrGLFormat format) {
case GrGLFormat::kRGB10_A2: return kRGBA_1010102_GrPixelConfig;
case GrGLFormat::kRGB565: return kRGB_565_GrPixelConfig;
case GrGLFormat::kRGBA4: return kRGBA_4444_GrPixelConfig;
case GrGLFormat::kRGBA32F: return kRGBA_float_GrPixelConfig;
case GrGLFormat::kRGBA16F: return kRGBA_half_GrPixelConfig;
case GrGLFormat::kR16: return kAlpha_16_GrPixelConfig;
case GrGLFormat::kRG16: return kRG_1616_GrPixelConfig;

View File

@ -614,7 +614,6 @@ bool GrGLFormatIsCompressed(GrGLFormat format) {
case GrGLFormat::kRG8:
case GrGLFormat::kRGB10_A2:
case GrGLFormat::kRGBA4:
case GrGLFormat::kRGBA32F:
case GrGLFormat::kSRGB8_ALPHA8:
case GrGLFormat::kR16:
case GrGLFormat::kRG16:
@ -646,7 +645,6 @@ bool GrGLFormatToCompressionType(GrGLFormat format, SkImage::CompressionType* co
case GrGLFormat::kRG8:
case GrGLFormat::kRGB10_A2:
case GrGLFormat::kRGBA4:
case GrGLFormat::kRGBA32F:
case GrGLFormat::kSRGB8_ALPHA8:
case GrGLFormat::kR16:
case GrGLFormat::kRG16:
@ -688,9 +686,6 @@ size_t GrGLBytesPerFormat(GrGLFormat glFormat) {
case GrGLFormat::kRGBA16:
return 8;
case GrGLFormat::kRGBA32F:
return 16;
case GrGLFormat::kCOMPRESSED_RGB8_ETC2:
case GrGLFormat::kCOMPRESSED_ETC1_RGB8:
case GrGLFormat::kUnknown:

View File

@ -292,7 +292,6 @@ static constexpr GrGLFormat GrGLFormatFromGLEnum(GrGLenum glFormat) {
case GR_GL_RG8: return GrGLFormat::kRG8;
case GR_GL_RGB10_A2: return GrGLFormat::kRGB10_A2;
case GR_GL_RGBA4: return GrGLFormat::kRGBA4;
case GR_GL_RGBA32F: return GrGLFormat::kRGBA32F;
case GR_GL_SRGB8_ALPHA8: return GrGLFormat::kSRGB8_ALPHA8;
case GR_GL_COMPRESSED_RGB8_ETC2: return GrGLFormat::kCOMPRESSED_RGB8_ETC2;
case GR_GL_COMPRESSED_ETC1_RGB8: return GrGLFormat::kCOMPRESSED_ETC1_RGB8;
@ -321,7 +320,6 @@ static constexpr GrGLenum GrGLFormatToEnum(GrGLFormat format) {
case GrGLFormat::kRG8: return GR_GL_RG8;
case GrGLFormat::kRGB10_A2: return GR_GL_RGB10_A2;
case GrGLFormat::kRGBA4: return GR_GL_RGBA4;
case GrGLFormat::kRGBA32F: return GR_GL_RGBA32F;
case GrGLFormat::kSRGB8_ALPHA8: return GR_GL_SRGB8_ALPHA8;
case GrGLFormat::kCOMPRESSED_RGB8_ETC2: return GR_GL_COMPRESSED_RGB8_ETC2;
case GrGLFormat::kCOMPRESSED_ETC1_RGB8: return GR_GL_COMPRESSED_ETC1_RGB8;

View File

@ -24,7 +24,6 @@ std::vector<GrCaps::TestFormatColorTypeCombination> GrMockCaps::getTestingCombin
{ GrColorType::kAlpha_F16, GrBackendFormat::MakeMock(GrColorType::kAlpha_F16) },
{ GrColorType::kRGBA_F16, GrBackendFormat::MakeMock(GrColorType::kRGBA_F16) },
{ GrColorType::kRGBA_F16_Clamped,GrBackendFormat::MakeMock(GrColorType::kRGBA_F16_Clamped)},
{ GrColorType::kRGBA_F32, GrBackendFormat::MakeMock(GrColorType::kRGBA_F32) },
{ GrColorType::kAlpha_16, GrBackendFormat::MakeMock(GrColorType::kAlpha_16) },
{ GrColorType::kRG_1616, GrBackendFormat::MakeMock(GrColorType::kRG_1616) },
{ GrColorType::kRGBA_16161616, GrBackendFormat::MakeMock(GrColorType::kRGBA_16161616) },

View File

@ -145,9 +145,9 @@ private:
int fColorTypeInfoCount = 0;
};
#ifdef SK_BUILD_FOR_IOS
static constexpr size_t kNumMtlFormats = 18;
static constexpr size_t kNumMtlFormats = 17;
#else
static constexpr size_t kNumMtlFormats = 15;
static constexpr size_t kNumMtlFormats = 14;
#endif
static size_t GetFormatIndex(MTLPixelFormat);
FormatInfo fFormatTable[kNumMtlFormats];

View File

@ -427,7 +427,6 @@ static constexpr MTLPixelFormat kMtlFormats[] = {
#ifdef SK_BUILD_FOR_IOS
MTLPixelFormatABGR4Unorm,
#endif
MTLPixelFormatRGBA32Float,
MTLPixelFormatRGBA8Unorm_sRGB,
MTLPixelFormatR16Unorm,
MTLPixelFormatRG16Unorm,
@ -642,25 +641,6 @@ void GrMtlCaps::initFormatTable() {
}
}
// Format: RGBA32Float
{
info = &fFormatTable[GetFormatIndex(MTLPixelFormatRGBA32Float)];
if (this->isMac()) {
info->fFlags = FormatInfo::kAllFlags;
} else {
info->fFlags = 0;
}
info->fColorTypeInfoCount = 1;
info->fColorTypeInfos.reset(new ColorTypeInfo[info->fColorTypeInfoCount]());
int ctIdx = 0;
// Format: RGBA32Float, Surface: kRGBA_F32
if (info->fFlags) {
auto& ctInfo = info->fColorTypeInfos[ctIdx++];
ctInfo.fColorType = GrColorType::kRGBA_F32;
ctInfo.fFlags = ColorTypeInfo::kUploadData_Flag | ColorTypeInfo::kRenderable_Flag;
}
}
// Format: R16Float
{
info = &fFormatTable[GetFormatIndex(MTLPixelFormatR16Float)];
@ -803,7 +783,6 @@ void GrMtlCaps::initFormatTable() {
this->setColorType(GrColorType::kAlpha_F16, { MTLPixelFormatR16Float });
this->setColorType(GrColorType::kRGBA_F16, { MTLPixelFormatRGBA16Float });
this->setColorType(GrColorType::kRGBA_F16_Clamped, { MTLPixelFormatRGBA16Float });
this->setColorType(GrColorType::kRGBA_F32, { MTLPixelFormatRGBA32Float });
this->setColorType(GrColorType::kAlpha_16, { MTLPixelFormatR16Unorm });
this->setColorType(GrColorType::kRG_1616, { MTLPixelFormatRG16Unorm });
this->setColorType(GrColorType::kRGBA_16161616, { MTLPixelFormatRGBA16Unorm });
@ -904,11 +883,6 @@ static constexpr GrPixelConfig validate_sized_format(GrMTLPixelFormat grFormat,
return kRGBA_half_Clamped_GrPixelConfig;
}
break;
case GrColorType::kRGBA_F32:
if (MTLPixelFormatRGBA32Float == format) {
return kRGBA_float_GrPixelConfig;
}
break;
case GrColorType::kAlpha_16:
if (MTLPixelFormatR16Unorm == format) {
return kAlpha_16_GrPixelConfig;
@ -929,6 +903,7 @@ static constexpr GrPixelConfig validate_sized_format(GrMTLPixelFormat grFormat,
return kRG_half_GrPixelConfig;
}
break;
case GrColorType::kRGBA_F32:
case GrColorType::kAlpha_8xxx:
case GrColorType::kAlpha_F32xxx:
case GrColorType::kGray_8xxx:
@ -1078,7 +1053,6 @@ std::vector<GrCaps::TestFormatColorTypeCombination> GrMtlCaps::getTestingCombina
{ GrColorType::kAlpha_F16, GrBackendFormat::MakeMtl(MTLPixelFormatR16Float) },
{ GrColorType::kRGBA_F16, GrBackendFormat::MakeMtl(MTLPixelFormatRGBA16Float) },
{ GrColorType::kRGBA_F16_Clamped, GrBackendFormat::MakeMtl(MTLPixelFormatRGBA16Float) },
{ GrColorType::kRGBA_F32, GrBackendFormat::MakeMtl(MTLPixelFormatRGBA32Float) },
{ GrColorType::kAlpha_16, GrBackendFormat::MakeMtl(MTLPixelFormatR16Unorm) },
{ GrColorType::kRG_1616, GrBackendFormat::MakeMtl(MTLPixelFormatRG16Unorm) },
{ GrColorType::kRGBA_16161616, GrBackendFormat::MakeMtl(MTLPixelFormatRGBA16Unorm) },

View File

@ -701,7 +701,6 @@ static GrPixelConfig mtl_format_to_pixelconfig(MTLPixelFormat format) {
case MTLPixelFormatRGB10A2Unorm: return kRGBA_1010102_GrPixelConfig;
case MTLPixelFormatR16Float: return kAlpha_half_GrPixelConfig;
case MTLPixelFormatRGBA16Float: return kRGBA_half_GrPixelConfig;
case MTLPixelFormatRGBA32Float: return kRGBA_float_GrPixelConfig;
case MTLPixelFormatR16Unorm: return kAlpha_16_GrPixelConfig;
case MTLPixelFormatRG16Unorm: return kRG_1616_GrPixelConfig;
case MTLPixelFormatRGBA16Unorm: return kRGBA_16161616_GrPixelConfig;

View File

@ -79,9 +79,6 @@ bool GrPixelConfigToMTLFormat(GrPixelConfig config, MTLPixelFormat* format) {
return true;
case kGray_8_as_Lum_GrPixelConfig:
return false;
case kRGBA_float_GrPixelConfig:
*format = MTLPixelFormatRGBA32Float;
return true;
case kRGBA_half_GrPixelConfig:
*format = MTLPixelFormatRGBA16Float;
return true;
@ -314,9 +311,6 @@ size_t GrMtlBytesPerFormat(MTLPixelFormat format) {
case MTLPixelFormatRGBA16Unorm:
return 8;
case MTLPixelFormatRGBA32Float:
return 16;
#ifdef SK_BUILD_FOR_IOS
case MTLPixelFormatETC2_RGB8:
return 0;
@ -374,7 +368,6 @@ const char* GrMtlFormatToStr(GrMTLPixelFormat mtlFormat) {
#ifdef SK_BUILD_FOR_IOS
case MTLPixelFormatABGR4Unorm: return "ABGR4Unorm";
#endif
case MTLPixelFormatRGBA32Float: return "RGBA32Float";
case MTLPixelFormatRGBA8Unorm_sRGB: return "RGBA8Unorm_sRGB";
case MTLPixelFormatR16Unorm: return "R16Unorm";
case MTLPixelFormatRG16Unorm: return "RG16Unorm";

View File

@ -71,7 +71,6 @@ enum class FormatCompatibilityClass {
k24_3_1,
k32_4_1,
k64_8_1,
k128_16_1,
kETC2_RGB_8_16,
};
} // anonymous namespace
@ -104,8 +103,6 @@ static FormatCompatibilityClass format_compatibility_class(VkFormat format) {
case VK_FORMAT_R8G8B8_UNORM:
return FormatCompatibilityClass::k24_3_1;
case VK_FORMAT_R32G32B32A32_SFLOAT:
return FormatCompatibilityClass::k128_16_1;
case VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK:
return FormatCompatibilityClass::kETC2_RGB_8_16;
@ -632,7 +629,6 @@ static constexpr VkFormat kVkFormats[] = {
VK_FORMAT_A2B10G10R10_UNORM_PACK32,
VK_FORMAT_B4G4R4A4_UNORM_PACK16,
VK_FORMAT_R4G4B4A4_UNORM_PACK16,
VK_FORMAT_R32G32B32A32_SFLOAT,
VK_FORMAT_R8G8B8A8_SRGB,
VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK,
VK_FORMAT_R16_UNORM,
@ -927,24 +923,6 @@ void GrVkCaps::initFormatTable(const GrVkInterface* interface, VkPhysicalDevice
}
}
}
// Format: VK_FORMAT_R32G32B32A32_SFLOAT
{
constexpr VkFormat format = VK_FORMAT_R32G32B32A32_SFLOAT;
auto& info = this->getFormatInfo(format);
info.init(interface, physDev, properties, format);
if (SkToBool(info.fOptimalFlags & FormatInfo::kTexturable_Flag)) {
info.fColorTypeInfoCount = 1;
info.fColorTypeInfos.reset(new ColorTypeInfo[info.fColorTypeInfoCount]());
int ctIdx = 0;
// Format: VK_FORMAT_R32G32B32A32_SFLOAT, Surface: kRGBA_F32
{
constexpr GrColorType ct = GrColorType::kRGBA_F32;
auto& ctInfo = info.fColorTypeInfos[ctIdx++];
ctInfo.fColorType = ct;
ctInfo.fFlags = ColorTypeInfo::kUploadData_Flag | ColorTypeInfo::kRenderable_Flag;
}
}
}
// Format: VK_FORMAT_R8G8B8A8_SRGB
{
constexpr VkFormat format = VK_FORMAT_R8G8B8A8_SRGB;
@ -1105,7 +1083,6 @@ void GrVkCaps::initFormatTable(const GrVkInterface* interface, VkPhysicalDevice
this->setColorType(GrColorType::kAlpha_F16, { VK_FORMAT_R16_SFLOAT });
this->setColorType(GrColorType::kRGBA_F16, { VK_FORMAT_R16G16B16A16_SFLOAT });
this->setColorType(GrColorType::kRGBA_F16_Clamped, { VK_FORMAT_R16G16B16A16_SFLOAT });
this->setColorType(GrColorType::kRGBA_F32, { VK_FORMAT_R32G32B32A32_SFLOAT });
this->setColorType(GrColorType::kAlpha_16, { VK_FORMAT_R16_UNORM });
this->setColorType(GrColorType::kRG_1616, { VK_FORMAT_R16G16_UNORM });
this->setColorType(GrColorType::kRGBA_16161616, { VK_FORMAT_R16G16B16A16_UNORM });
@ -1535,11 +1512,6 @@ static GrPixelConfig validate_image_info(VkFormat format, GrColorType ct, bool h
return kRGBA_half_Clamped_GrPixelConfig;
}
break;
case GrColorType::kRGBA_F32:
if (VK_FORMAT_R32G32B32A32_SFLOAT == format) {
return kRGBA_float_GrPixelConfig;
}
break;
case GrColorType::kAlpha_16:
if (VK_FORMAT_R16_UNORM == format) {
return kAlpha_16_GrPixelConfig;
@ -1561,6 +1533,7 @@ static GrPixelConfig validate_image_info(VkFormat format, GrColorType ct, bool h
}
break;
// These have no equivalent:
case GrColorType::kRGBA_F32:
case GrColorType::kAlpha_8xxx:
case GrColorType::kAlpha_F32xxx:
case GrColorType::kGray_8xxx:
@ -1703,7 +1676,6 @@ std::vector<GrCaps::TestFormatColorTypeCombination> GrVkCaps::getTestingCombinat
{ GrColorType::kAlpha_F16, GrBackendFormat::MakeVk(VK_FORMAT_R16_SFLOAT) },
{ GrColorType::kRGBA_F16, GrBackendFormat::MakeVk(VK_FORMAT_R16G16B16A16_SFLOAT) },
{ GrColorType::kRGBA_F16_Clamped, GrBackendFormat::MakeVk(VK_FORMAT_R16G16B16A16_SFLOAT) },
{ GrColorType::kRGBA_F32, GrBackendFormat::MakeVk(VK_FORMAT_R32G32B32A32_SFLOAT) },
{ GrColorType::kAlpha_16, GrBackendFormat::MakeVk(VK_FORMAT_R16_UNORM) },
{ GrColorType::kRG_1616, GrBackendFormat::MakeVk(VK_FORMAT_R16G16_UNORM) },
{ GrColorType::kRGBA_16161616, GrBackendFormat::MakeVk(VK_FORMAT_R16G16B16A16_UNORM) },

View File

@ -267,7 +267,7 @@ private:
std::unique_ptr<ColorTypeInfo[]> fColorTypeInfos;
int fColorTypeInfoCount = 0;
};
static const size_t kNumVkFormats = 20;
static const size_t kNumVkFormats = 19;
FormatInfo fFormatTable[kNumVkFormats];
FormatInfo& getFormatInfo(VkFormat);

View File

@ -29,7 +29,6 @@ bool GrVkFormatColorTypePairIsValid(VkFormat format, GrColorType colorType) {
case VK_FORMAT_R4G4B4A4_UNORM_PACK16: return GrColorType::kABGR_4444 == colorType;
case VK_FORMAT_R8_UNORM: return GrColorType::kAlpha_8 == colorType ||
GrColorType::kGray_8 == colorType;
case VK_FORMAT_R32G32B32A32_SFLOAT: return GrColorType::kRGBA_F32 == colorType;
case VK_FORMAT_R16G16B16A16_SFLOAT: return GrColorType::kRGBA_F16 == colorType ||
GrColorType::kRGBA_F16_Clamped == colorType;
case VK_FORMAT_R16_SFLOAT: return GrColorType::kAlpha_F16 == colorType;
@ -60,7 +59,6 @@ bool GrVkFormatIsSupported(VkFormat format) {
case VK_FORMAT_R4G4B4A4_UNORM_PACK16:
case VK_FORMAT_R8_UNORM:
case VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK:
case VK_FORMAT_R32G32B32A32_SFLOAT:
case VK_FORMAT_R16G16B16A16_SFLOAT:
case VK_FORMAT_R16_SFLOAT:
case VK_FORMAT_R16_UNORM:
@ -207,9 +205,6 @@ size_t GrVkBytesPerFormat(VkFormat vkFormat) {
case VK_FORMAT_R16G16B16A16_UNORM:
return 8;
case VK_FORMAT_R32G32B32A32_SFLOAT:
return 16;
case VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK:
return 0;

View File

@ -897,8 +897,6 @@ DEF_GPUTEST_FOR_VULKAN_CONTEXT(VkBackendAllocationTest, reporter, ctxInfo) {
// of the provided color with the same value in such cases.
{ GrColorType::kGray_8, VK_FORMAT_R8_UNORM, kGrayCol },
{ GrColorType::kRGBA_F32, VK_FORMAT_R32G32B32A32_SFLOAT, SkColors::kRed },
{ GrColorType::kRGBA_F16_Clamped, VK_FORMAT_R16G16B16A16_SFLOAT, SkColors::kLtGray },
{ GrColorType::kRGBA_F16, VK_FORMAT_R16G16B16A16_SFLOAT, SkColors::kYellow },

View File

@ -59,8 +59,6 @@ DEF_GPUTEST_FOR_METAL_CONTEXT(MtlBackendAllocationTest, reporter, ctxInfo) {
{ GrColorType::kAlpha_8, MTLPixelFormatR8Unorm, kTransCol },
{ GrColorType::kGray_8, MTLPixelFormatR8Unorm, kGrayCol },
{ GrColorType::kRGBA_F32, MTLPixelFormatRGBA32Float, SkColors::kRed },
{ GrColorType::kRGBA_F16_Clamped, MTLPixelFormatRGBA16Float, SkColors::kLtGray },
{ GrColorType::kRGBA_F16, MTLPixelFormatRGBA16Float, SkColors::kYellow },