Remove RG32F color type and pixel config.
Change-Id: I7fd3a8f6c02217d011f353ef602718a537bb87b2 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/228116 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
This commit is contained in:
parent
019458d9ad
commit
009ad250fe
@ -29,7 +29,6 @@ enum class GrGLFormat {
|
||||
kRGB10_A2,
|
||||
kRGBA4,
|
||||
kRGBA32F,
|
||||
kRG32F,
|
||||
kSRGB8_ALPHA8,
|
||||
kCOMPRESSED_RGB8_ETC2,
|
||||
kCOMPRESSED_ETC1_RGB8,
|
||||
|
@ -53,7 +53,6 @@ enum GrPixelConfig {
|
||||
kSRGBA_8888_GrPixelConfig,
|
||||
kRGBA_1010102_GrPixelConfig,
|
||||
kRGBA_float_GrPixelConfig,
|
||||
kRG_float_GrPixelConfig,
|
||||
kAlpha_half_GrPixelConfig,
|
||||
kAlpha_half_as_Red_GrPixelConfig,
|
||||
kRGBA_half_GrPixelConfig,
|
||||
@ -844,7 +843,6 @@ static constexpr bool GrPixelConfigIsSRGB(GrPixelConfig config) {
|
||||
case kBGRA_8888_GrPixelConfig:
|
||||
case kRGBA_1010102_GrPixelConfig:
|
||||
case kRGBA_float_GrPixelConfig:
|
||||
case kRG_float_GrPixelConfig:
|
||||
case kAlpha_half_GrPixelConfig:
|
||||
case kAlpha_half_as_Red_GrPixelConfig:
|
||||
case kRGBA_half_GrPixelConfig:
|
||||
@ -896,8 +894,6 @@ static constexpr size_t GrBytesPerPixel(GrPixelConfig config) {
|
||||
return 8;
|
||||
case kRGBA_float_GrPixelConfig:
|
||||
return 16;
|
||||
case kRG_float_GrPixelConfig:
|
||||
return 8;
|
||||
case kUnknown_GrPixelConfig:
|
||||
case kRGB_ETC1_GrPixelConfig:
|
||||
return 0;
|
||||
@ -920,7 +916,6 @@ static constexpr bool GrPixelConfigIsOpaque(GrPixelConfig config) {
|
||||
case kGray_8_GrPixelConfig:
|
||||
case kGray_8_as_Lum_GrPixelConfig:
|
||||
case kGray_8_as_Red_GrPixelConfig:
|
||||
case kRG_float_GrPixelConfig:
|
||||
case kRGB_ETC1_GrPixelConfig:
|
||||
case kR_16_GrPixelConfig:
|
||||
case kRG_1616_GrPixelConfig:
|
||||
@ -968,7 +963,6 @@ static constexpr bool GrPixelConfigIsAlphaOnly(GrPixelConfig config) {
|
||||
case kSRGBA_8888_GrPixelConfig:
|
||||
case kRGBA_1010102_GrPixelConfig:
|
||||
case kRGBA_float_GrPixelConfig:
|
||||
case kRG_float_GrPixelConfig:
|
||||
case kRGBA_half_GrPixelConfig:
|
||||
case kRGBA_half_Clamped_GrPixelConfig:
|
||||
case kRGB_ETC1_GrPixelConfig:
|
||||
@ -1006,7 +1000,6 @@ static constexpr bool GrPixelConfigIsFloatingPoint(GrPixelConfig config) {
|
||||
case kRGBA_16161616_GrPixelConfig: // Experimental (for Y416)
|
||||
return false;
|
||||
case kRGBA_float_GrPixelConfig:
|
||||
case kRG_float_GrPixelConfig:
|
||||
case kAlpha_half_GrPixelConfig:
|
||||
case kAlpha_half_as_Red_GrPixelConfig:
|
||||
case kRGBA_half_GrPixelConfig:
|
||||
@ -1096,7 +1089,6 @@ static constexpr GrSLPrecision GrSLSamplerPrecision(GrPixelConfig config) {
|
||||
case kRGB_ETC1_GrPixelConfig:
|
||||
return kLow_GrSLPrecision;
|
||||
case kRGBA_float_GrPixelConfig:
|
||||
case kRG_float_GrPixelConfig:
|
||||
return kHigh_GrSLPrecision;
|
||||
case kAlpha_half_GrPixelConfig:
|
||||
case kAlpha_half_as_Red_GrPixelConfig:
|
||||
@ -1137,7 +1129,6 @@ enum class GrColorType {
|
||||
kAlpha_F16,
|
||||
kRGBA_F16,
|
||||
kRGBA_F16_Clamped,
|
||||
kRG_F32,
|
||||
kRGBA_F32,
|
||||
|
||||
kR_16, // Not in SkColorType
|
||||
@ -1169,7 +1160,6 @@ static constexpr SkColorType GrColorTypeToSkColorType(GrColorType ct) {
|
||||
case GrColorType::kAlpha_F16: return kUnknown_SkColorType;
|
||||
case GrColorType::kRGBA_F16: return kRGBA_F16_SkColorType;
|
||||
case GrColorType::kRGBA_F16_Clamped: return kRGBA_F16Norm_SkColorType;
|
||||
case GrColorType::kRG_F32: return kUnknown_SkColorType;
|
||||
case GrColorType::kRGBA_F32: return kRGBA_F32_SkColorType;
|
||||
case GrColorType::kR_16: return kUnknown_SkColorType;
|
||||
case GrColorType::kRG_1616: return kUnknown_SkColorType;
|
||||
@ -1216,8 +1206,6 @@ static constexpr uint32_t GrColorTypeComponentFlags(GrColorType ct) {
|
||||
case GrColorType::kAlpha_F16: return kAlpha_SkColorTypeComponentFlag;
|
||||
case GrColorType::kRGBA_F16: return kRGBA_SkColorTypeComponentFlags;
|
||||
case GrColorType::kRGBA_F16_Clamped: return kRGBA_SkColorTypeComponentFlags;
|
||||
case GrColorType::kRG_F32: return kRed_SkColorTypeComponentFlag |
|
||||
kGreen_SkColorTypeComponentFlag;
|
||||
case GrColorType::kRGBA_F32: return kRGBA_SkColorTypeComponentFlags;
|
||||
case GrColorType::kR_16: return kRed_SkColorTypeComponentFlag;
|
||||
case GrColorType::kRG_1616: return kRed_SkColorTypeComponentFlag |
|
||||
@ -1340,8 +1328,6 @@ static constexpr GrColorTypeDesc GrGetColorTypeDesc(GrColorType ct) {
|
||||
return GrColorTypeDesc::MakeRGBA(16, GrColorTypeEncoding::kFloat);
|
||||
case GrColorType::kRGBA_F16_Clamped:
|
||||
return GrColorTypeDesc::MakeRGBA(16, GrColorTypeEncoding::kFloat);
|
||||
case GrColorType::kRG_F32:
|
||||
return GrColorTypeDesc::MakeRG(32, GrColorTypeEncoding::kFloat);
|
||||
case GrColorType::kRGBA_F32:
|
||||
return GrColorTypeDesc::MakeRGBA(32, GrColorTypeEncoding::kFloat);
|
||||
case GrColorType::kR_16:
|
||||
@ -1400,7 +1386,6 @@ static constexpr int GrColorTypeBytesPerPixel(GrColorType ct) {
|
||||
case GrColorType::kAlpha_F16: return 2;
|
||||
case GrColorType::kRGBA_F16: return 8;
|
||||
case GrColorType::kRGBA_F16_Clamped: return 8;
|
||||
case GrColorType::kRG_F32: return 8;
|
||||
case GrColorType::kRGBA_F32: return 16;
|
||||
case GrColorType::kR_16: return 2;
|
||||
case GrColorType::kRG_1616: return 4;
|
||||
@ -1449,8 +1434,6 @@ static constexpr GrColorType GrPixelConfigToColorType(GrPixelConfig config) {
|
||||
return GrColorType::kRGBA_1010102;
|
||||
case kRGBA_float_GrPixelConfig:
|
||||
return GrColorType::kRGBA_F32;
|
||||
case kRG_float_GrPixelConfig:
|
||||
return GrColorType::kRG_F32;
|
||||
case kAlpha_half_GrPixelConfig:
|
||||
return GrColorType::kAlpha_F16;
|
||||
case kRGBA_half_GrPixelConfig:
|
||||
@ -1497,7 +1480,6 @@ static constexpr GrPixelConfig GrColorTypeToPixelConfig(GrColorType colorType) {
|
||||
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::kRG_F32: return kRG_float_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;
|
||||
|
@ -150,7 +150,6 @@ static const char* pixel_config_name(GrPixelConfig config) {
|
||||
case kSRGBA_8888_GrPixelConfig: return "SRGBA8888";
|
||||
case kRGBA_1010102_GrPixelConfig: return "RGBA1010102";
|
||||
case kRGBA_float_GrPixelConfig: return "RGBAFloat";
|
||||
case kRG_float_GrPixelConfig: return "RGFloat";
|
||||
case kAlpha_half_GrPixelConfig: return "AlphaHalf";
|
||||
case kAlpha_half_as_Red_GrPixelConfig: return "AlphaHalf_asRed";
|
||||
case kRGBA_half_GrPixelConfig: return "RGBAHalf";
|
||||
|
@ -235,14 +235,6 @@ static bool fill_buffer_with_color(GrPixelConfig config, int width, int height,
|
||||
}
|
||||
break;
|
||||
}
|
||||
case kRG_float_GrPixelConfig: {
|
||||
float* destFloat = (float*) dest;
|
||||
for (int i = 0; i < width * height; ++i, destFloat += 2) {
|
||||
destFloat[0] = colorf.fR;
|
||||
destFloat[1] = colorf.fG;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case kAlpha_half_as_Red_GrPixelConfig: // fall through
|
||||
case kAlpha_half_GrPixelConfig: {
|
||||
SkHalf alphaHalf = SkFloatToHalf(colorf.fA);
|
||||
@ -394,9 +386,6 @@ static GrSwizzle get_load_and_get_swizzle(GrColorType ct, SkRasterPipeline::Stoc
|
||||
case GrColorType::kRGBA_F16: *load = SkRasterPipeline::load_f16;
|
||||
*isNormalized = false;
|
||||
break;
|
||||
case GrColorType::kRG_F32: *load = SkRasterPipeline::load_rgf32;
|
||||
*isNormalized = false;
|
||||
break;
|
||||
case GrColorType::kRGBA_F32: *load = SkRasterPipeline::load_f32;
|
||||
*isNormalized = false;
|
||||
break;
|
||||
@ -447,9 +436,6 @@ static GrSwizzle get_dst_swizzle_and_store(GrColorType ct, SkRasterPipeline::Sto
|
||||
case GrColorType::kRGBA_F16: *store = SkRasterPipeline::store_f16;
|
||||
*isNormalized = false;
|
||||
break;
|
||||
case GrColorType::kRG_F32: *store = SkRasterPipeline::store_rgf32;
|
||||
*isNormalized = false;
|
||||
break;
|
||||
case GrColorType::kRGBA_F32: *store = SkRasterPipeline::store_f32;
|
||||
*isNormalized = false;
|
||||
break;
|
||||
|
@ -306,7 +306,6 @@ static inline int32_t dither_range_type_for_config(GrColorType dstColorType) {
|
||||
case GrColorType::kRGBA_1010102:
|
||||
case GrColorType::kAlpha_F16:
|
||||
case GrColorType::kRGBA_F32:
|
||||
case GrColorType::kRG_F32:
|
||||
case GrColorType::kRGBA_F16:
|
||||
case GrColorType::kRGBA_F16_Clamped:
|
||||
case GrColorType::kAlpha_8:
|
||||
|
@ -2444,13 +2444,10 @@ void GrGLCaps::initConfigTable(const GrContextOptions& contextOptions,
|
||||
fConfigTable[kGray_8_GrPixelConfig] = grayLumInfo;
|
||||
}
|
||||
|
||||
// We disable all texturing and rendering to F32 formats.
|
||||
for (auto fpconfig : {kRGBA_float_GrPixelConfig, kRG_float_GrPixelConfig}) {
|
||||
const GrGLenum format = kRGBA_float_GrPixelConfig == fpconfig ? GR_GL_RGBA : GR_GL_RG;
|
||||
fConfigTable[fpconfig].fFormats.fExternalFormat[kReadPixels_ExternalFormatUsage] = format;
|
||||
fConfigTable[fpconfig].fFormats.fExternalType = GR_GL_FLOAT;
|
||||
fConfigTable[fpconfig].fFormatType = kFloat_FormatType;
|
||||
}
|
||||
ConfigInfo& rgbaF32Info = fConfigTable[kRGBA_float_GrPixelConfig];
|
||||
rgbaF32Info.fFormats.fExternalFormat[kReadPixels_ExternalFormatUsage] = GR_GL_RGBA;
|
||||
rgbaF32Info.fFormats.fExternalType = GR_GL_FLOAT;
|
||||
rgbaF32Info.fFormatType = kFloat_FormatType;
|
||||
|
||||
GrGLenum redHalfExternalType;
|
||||
if (GR_IS_GR_GL(standard) ||
|
||||
@ -3438,7 +3435,6 @@ GrGLFormat GrGLCaps::pixelConfigToFormat(GrPixelConfig config) const {
|
||||
case kSRGBA_8888_GrPixelConfig:
|
||||
case kRGBA_1010102_GrPixelConfig:
|
||||
case kRGBA_float_GrPixelConfig:
|
||||
case kRG_float_GrPixelConfig:
|
||||
case kAlpha_half_GrPixelConfig:
|
||||
case kRGBA_half_GrPixelConfig:
|
||||
case kRGBA_half_Clamped_GrPixelConfig:
|
||||
@ -3534,11 +3530,6 @@ static GrPixelConfig validate_sized_format(GrGLenum format, GrColorType ct, GrGL
|
||||
return kRGBA_half_Clamped_GrPixelConfig;
|
||||
}
|
||||
break;
|
||||
case GrColorType::kRG_F32:
|
||||
if (GR_GL_RG32F == format) {
|
||||
return kRG_float_GrPixelConfig;
|
||||
}
|
||||
break;
|
||||
case GrColorType::kRGBA_F32:
|
||||
if (GR_GL_RGBA32F == format) {
|
||||
return kRGBA_float_GrPixelConfig;
|
||||
@ -3706,8 +3697,6 @@ static bool format_color_type_valid_pair(GrGLenum format, GrColorType colorType)
|
||||
return GR_GL_RGBA16F == format;
|
||||
case GrColorType::kRGBA_F16_Clamped:
|
||||
return GR_GL_RGBA16F == format;
|
||||
case GrColorType::kRG_F32:
|
||||
return GR_GL_RG32F == format;
|
||||
case GrColorType::kRGBA_F32:
|
||||
return GR_GL_RGBA32F == format;
|
||||
case GrColorType::kR_16:
|
||||
|
@ -878,7 +878,6 @@ static inline GrGLint config_alignment(GrPixelConfig config) {
|
||||
case kSRGBA_8888_GrPixelConfig:
|
||||
case kRGBA_1010102_GrPixelConfig:
|
||||
case kRGBA_float_GrPixelConfig:
|
||||
case kRG_float_GrPixelConfig:
|
||||
case kRG_1616_GrPixelConfig:
|
||||
return 4;
|
||||
case kRGB_ETC1_GrPixelConfig:
|
||||
@ -3736,7 +3735,6 @@ static GrPixelConfig gl_format_to_pixel_config(GrGLFormat format) {
|
||||
case GrGLFormat::kRGB565: return kRGB_565_GrPixelConfig;
|
||||
case GrGLFormat::kRGBA4: return kRGBA_4444_GrPixelConfig;
|
||||
case GrGLFormat::kRGBA32F: return kRGBA_float_GrPixelConfig;
|
||||
case GrGLFormat::kRG32F: return kRG_float_GrPixelConfig;
|
||||
case GrGLFormat::kRGBA16F: return kRGBA_half_GrPixelConfig;
|
||||
case GrGLFormat::kR16F: return kAlpha_half_GrPixelConfig;
|
||||
case GrGLFormat::kR16: return kR_16_GrPixelConfig;
|
||||
|
@ -613,7 +613,6 @@ bool GrGLFormatIsCompressed(GrGLFormat format) {
|
||||
case GrGLFormat::kRGB10_A2:
|
||||
case GrGLFormat::kRGBA4:
|
||||
case GrGLFormat::kRGBA32F:
|
||||
case GrGLFormat::kRG32F:
|
||||
case GrGLFormat::kSRGB8_ALPHA8:
|
||||
case GrGLFormat::kR16:
|
||||
case GrGLFormat::kRG16:
|
||||
@ -645,7 +644,6 @@ bool GrGLFormatToCompressionType(GrGLFormat format, SkImage::CompressionType* co
|
||||
case GrGLFormat::kRGB10_A2:
|
||||
case GrGLFormat::kRGBA4:
|
||||
case GrGLFormat::kRGBA32F:
|
||||
case GrGLFormat::kRG32F:
|
||||
case GrGLFormat::kSRGB8_ALPHA8:
|
||||
case GrGLFormat::kR16:
|
||||
case GrGLFormat::kRG16:
|
||||
@ -683,7 +681,6 @@ size_t GrGLBytesPerFormat(GrGLFormat glFormat) {
|
||||
return 4;
|
||||
|
||||
case GrGLFormat::kRGBA16F:
|
||||
case GrGLFormat::kRG32F:
|
||||
case GrGLFormat::kRGBA16:
|
||||
return 8;
|
||||
|
||||
|
@ -289,7 +289,6 @@ static constexpr GrGLFormat GrGLFormatFromGLEnum(GrGLenum glFormat) {
|
||||
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_RG32F: return GrGLFormat::kRG32F;
|
||||
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;
|
||||
|
@ -453,14 +453,6 @@ void GrMtlCaps::initConfigTable() {
|
||||
info->fFlags = 0;
|
||||
}
|
||||
|
||||
// RG_float uses RG32Float
|
||||
info = &fConfigTable[kRG_float_GrPixelConfig];
|
||||
if (this->isMac()) {
|
||||
info->fFlags = ConfigInfo::kAllFlags;
|
||||
} else {
|
||||
info->fFlags = ConfigInfo::kTextureable_Flag | ConfigInfo::kRenderable_Flag;
|
||||
}
|
||||
|
||||
// Alpha_half uses R16Float
|
||||
info = &fConfigTable[kAlpha_half_GrPixelConfig];
|
||||
info->fFlags = ConfigInfo::kAllFlags;
|
||||
@ -594,11 +586,6 @@ GrPixelConfig validate_sized_format(GrMTLPixelFormat grFormat, GrColorType ct) {
|
||||
return kRGBA_half_Clamped_GrPixelConfig;
|
||||
}
|
||||
break;
|
||||
case GrColorType::kRG_F32:
|
||||
if (MTLPixelFormatRG32Float == format) {
|
||||
return kRG_float_GrPixelConfig;
|
||||
}
|
||||
break;
|
||||
case GrColorType::kRGBA_F32:
|
||||
if (MTLPixelFormatRGBA32Float == format) {
|
||||
return kRGBA_float_GrPixelConfig;
|
||||
@ -780,8 +767,6 @@ static bool format_color_type_valid_pair(MTLPixelFormat format, GrColorType colo
|
||||
return MTLPixelFormatRGBA16Float == format;
|
||||
case GrColorType::kRGBA_F16_Clamped:
|
||||
return MTLPixelFormatRGBA16Float == format;
|
||||
case GrColorType::kRG_F32:
|
||||
return MTLPixelFormatRG32Float == format;
|
||||
case GrColorType::kRGBA_F32:
|
||||
return MTLPixelFormatRGBA32Float == format;
|
||||
case GrColorType::kR_16:
|
||||
|
@ -736,9 +736,6 @@ static bool mtl_format_to_pixel_config(MTLPixelFormat format, GrPixelConfig* con
|
||||
case MTLPixelFormatRGBA32Float:
|
||||
*config = kRGBA_float_GrPixelConfig;
|
||||
return true;
|
||||
case MTLPixelFormatRG32Float:
|
||||
*config = kRG_float_GrPixelConfig;
|
||||
return true;
|
||||
case MTLPixelFormatRGBA16Float:
|
||||
*config = kRGBA_half_GrPixelConfig;
|
||||
return true;
|
||||
|
@ -81,9 +81,6 @@ bool GrPixelConfigToMTLFormat(GrPixelConfig config, MTLPixelFormat* format) {
|
||||
case kRGBA_float_GrPixelConfig:
|
||||
*format = MTLPixelFormatRGBA32Float;
|
||||
return true;
|
||||
case kRG_float_GrPixelConfig:
|
||||
*format = MTLPixelFormatRG32Float;
|
||||
return true;
|
||||
case kRGBA_half_GrPixelConfig:
|
||||
*format = MTLPixelFormatRGBA16Float;
|
||||
return true;
|
||||
|
@ -104,7 +104,6 @@ static int get_compatible_format_class(GrPixelConfig config) {
|
||||
return 4;
|
||||
case kRGBA_half_GrPixelConfig:
|
||||
case kRGBA_half_Clamped_GrPixelConfig:
|
||||
case kRG_float_GrPixelConfig:
|
||||
return 5;
|
||||
case kRGBA_float_GrPixelConfig:
|
||||
return 6;
|
||||
@ -672,7 +671,6 @@ static constexpr VkFormat kVkFormats[] = {
|
||||
VK_FORMAT_B4G4R4A4_UNORM_PACK16,
|
||||
VK_FORMAT_R4G4B4A4_UNORM_PACK16,
|
||||
VK_FORMAT_R32G32B32A32_SFLOAT,
|
||||
VK_FORMAT_R32G32_SFLOAT,
|
||||
VK_FORMAT_R8G8B8A8_SRGB,
|
||||
VK_FORMAT_B8G8R8A8_SRGB,
|
||||
VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK,
|
||||
@ -1023,11 +1021,6 @@ static GrPixelConfig validate_image_info(VkFormat format, GrColorType ct, bool h
|
||||
return kRGBA_half_Clamped_GrPixelConfig;
|
||||
}
|
||||
break;
|
||||
case GrColorType::kRG_F32:
|
||||
if (VK_FORMAT_R32G32_SFLOAT == format) {
|
||||
return kRG_float_GrPixelConfig;
|
||||
}
|
||||
break;
|
||||
case GrColorType::kRGBA_F32:
|
||||
if (VK_FORMAT_R32G32B32A32_SFLOAT == format) {
|
||||
return kRGBA_float_GrPixelConfig;
|
||||
@ -1184,8 +1177,6 @@ static bool format_color_type_valid_pair(VkFormat vkFormat, GrColorType colorTyp
|
||||
return VK_FORMAT_R16G16B16A16_SFLOAT == vkFormat;
|
||||
case GrColorType::kRGBA_F16_Clamped:
|
||||
return VK_FORMAT_R16G16B16A16_SFLOAT == vkFormat;
|
||||
case GrColorType::kRG_F32:
|
||||
return VK_FORMAT_R32G32_SFLOAT == vkFormat;
|
||||
case GrColorType::kRGBA_F32:
|
||||
return VK_FORMAT_R32G32B32A32_SFLOAT == vkFormat;
|
||||
case GrColorType::kR_16:
|
||||
|
@ -232,7 +232,7 @@ private:
|
||||
|
||||
SkTDArray<int> fColorSampleCounts;
|
||||
};
|
||||
static const size_t kNumVkFormats = 20;
|
||||
static const size_t kNumVkFormats = 19;
|
||||
FormatInfo fFormatTable[kNumVkFormats];
|
||||
|
||||
const FormatInfo& getFormatInfo(VkFormat) const;
|
||||
|
@ -1877,9 +1877,6 @@ static bool vk_format_to_pixel_config(VkFormat format, GrPixelConfig* config) {
|
||||
case VK_FORMAT_R32G32B32A32_SFLOAT:
|
||||
*config = kRGBA_float_GrPixelConfig;
|
||||
return true;
|
||||
case VK_FORMAT_R32G32_SFLOAT:
|
||||
*config = kRG_float_GrPixelConfig;
|
||||
return true;
|
||||
case VK_FORMAT_R16G16B16A16_SFLOAT:
|
||||
*config = kRGBA_half_GrPixelConfig;
|
||||
return true;
|
||||
|
@ -65,9 +65,6 @@ bool GrPixelConfigToVkFormat(GrPixelConfig config, VkFormat* format) {
|
||||
case kRGBA_float_GrPixelConfig:
|
||||
*format = VK_FORMAT_R32G32B32A32_SFLOAT;
|
||||
return true;
|
||||
case kRG_float_GrPixelConfig:
|
||||
*format = VK_FORMAT_R32G32_SFLOAT;
|
||||
return true;
|
||||
case kRGBA_half_GrPixelConfig:
|
||||
case kRGBA_half_Clamped_GrPixelConfig:
|
||||
*format = VK_FORMAT_R16G16B16A16_SFLOAT;
|
||||
@ -132,8 +129,6 @@ bool GrVkFormatPixelConfigPairIsValid(VkFormat format, GrPixelConfig config) {
|
||||
return kRGB_ETC1_GrPixelConfig == config;
|
||||
case VK_FORMAT_R32G32B32A32_SFLOAT:
|
||||
return kRGBA_float_GrPixelConfig == config;
|
||||
case VK_FORMAT_R32G32_SFLOAT:
|
||||
return kRG_float_GrPixelConfig == config;
|
||||
case VK_FORMAT_R16G16B16A16_SFLOAT:
|
||||
return kRGBA_half_GrPixelConfig == config ||
|
||||
kRGBA_half_Clamped_GrPixelConfig == config;
|
||||
@ -170,7 +165,6 @@ bool GrVkFormatIsSupported(VkFormat format) {
|
||||
case VK_FORMAT_R8_UNORM:
|
||||
case VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK:
|
||||
case VK_FORMAT_R32G32B32A32_SFLOAT:
|
||||
case VK_FORMAT_R32G32_SFLOAT:
|
||||
case VK_FORMAT_R16G16B16A16_SFLOAT:
|
||||
case VK_FORMAT_R16_SFLOAT:
|
||||
case VK_FORMAT_R16_UNORM:
|
||||
@ -308,7 +302,6 @@ size_t GrVkBytesPerFormat(VkFormat vkFormat) {
|
||||
return 4;
|
||||
|
||||
case VK_FORMAT_R16G16B16A16_SFLOAT:
|
||||
case VK_FORMAT_R32G32_SFLOAT:
|
||||
return 8;
|
||||
|
||||
case VK_FORMAT_R32G32B32A32_SFLOAT:
|
||||
|
@ -554,8 +554,6 @@ DEF_GPUTEST_FOR_ALL_GL_CONTEXTS(GLBackendAllocationTest, reporter, ctxInfo) {
|
||||
kRGBA_half_GrPixelConfig, SkColors::kYellow },
|
||||
|
||||
// These backend formats don't have SkColorType equivalents
|
||||
{ kUnknown_SkColorType, GR_GL_RG32F,
|
||||
kRG_float_GrPixelConfig, { 0.7f, 0.7f, 0, 0 }},
|
||||
{ kUnknown_SkColorType, GR_GL_RG8,
|
||||
kRG_88_GrPixelConfig, { 0.5f, 0.5f, 0, 0 }},
|
||||
{ kUnknown_SkColorType, GR_GL_R16F,
|
||||
@ -721,7 +719,6 @@ DEF_GPUTEST_FOR_VULKAN_CONTEXT(VkBackendAllocationTest, reporter, ctxInfo) {
|
||||
{ kRGBA_F16_SkColorType, VK_FORMAT_R16G16B16A16_SFLOAT, SkColors::kYellow },
|
||||
|
||||
// These backend formats don't have SkColorType equivalents
|
||||
{ kUnknown_SkColorType, VK_FORMAT_R32G32_SFLOAT, { 0.7f, 0.7f, 0, 0 } },
|
||||
{ kUnknown_SkColorType, VK_FORMAT_R8G8_UNORM, { 0.5f, 0.5f, 0, 0 } },
|
||||
{ kUnknown_SkColorType, VK_FORMAT_R16_SFLOAT, { 1.0f, 0, 0, 0.5f } },
|
||||
{ kUnknown_SkColorType, VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK, SkColors::kRed },
|
||||
|
@ -77,8 +77,6 @@ DEF_GPUTEST_FOR_METAL_CONTEXT(MtlBackendAllocationTest, reporter, ctxInfo) {
|
||||
kRGBA_half_GrPixelConfig, SkColors::kYellow },
|
||||
|
||||
// These backend formats don't have SkColorType equivalents
|
||||
{ kUnknown_SkColorType, MTLPixelFormatRG32Float,
|
||||
kRG_float_GrPixelConfig, { 0.7f, 0.7f, 0, 0 }},
|
||||
{ kUnknown_SkColorType, MTLPixelFormatRG8Unorm,
|
||||
kRG_88_GrPixelConfig, { 0.5f, 0.5f, 0, 0 }},
|
||||
{ kUnknown_SkColorType, MTLPixelFormatR16Float,
|
||||
|
Loading…
Reference in New Issue
Block a user