diff options
author | Brian Osman <brianosman@google.com> | 2017-01-10 18:47:27 +0000 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-01-10 18:47:38 +0000 |
commit | 4641d7d0550c6abcb6ffbda9941f6add268c017c (patch) | |
tree | 897d3c8533005cc5c67bbea1e56eedf075f6e98d | |
parent | 7662066112f23361086830229fcb93c294101c45 (diff) |
Revert "Add Gray8 pixel config"
This reverts commit f2956459f707de596dcb2c79a7ee1fa62d599c0d.
Reason for revert: GM and image failures on some bots (rendering red, not gray).
Original change's description:
> Add Gray8 pixel config
>
> This is still just linear (non-sRGB), but adding sRGB will
> be the next step. I've verified that this is really making
> R8 textures when uploading Gray8 bitmaps. Tests pass, and
> the all_bitmap_configs GM still renders correctly (unlike
> when we just mapped Gray8 to Alpha8).
>
> This adds another pixel config, which could grow our cache
> footprint, but the benefits of not using 4bpp for 1bpp data
> should outweigh that?
>
> BUG=skia:6110
>
> Change-Id: I4fc4c2479fc25f1d278e174a9bb5b542a0cb184c
> Reviewed-on: https://skia-review.googlesource.com/6817
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
>
TBR=bsalomon@google.com,robertphillips@google.com,brianosman@google.com,reviews@skia.org
BUG=skia:6110
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Change-Id: I95a4fc0450a569d5791f6bceb7fae61c7e5eba61
Reviewed-on: https://skia-review.googlesource.com/6838
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
-rw-r--r-- | include/gpu/GrColor.h | 32 | ||||
-rw-r--r-- | include/gpu/GrTypes.h | 3 | ||||
-rw-r--r-- | include/private/GrSwizzle.h | 1 | ||||
-rw-r--r-- | src/gpu/GrCaps.cpp | 32 | ||||
-rw-r--r-- | src/gpu/GrContext.cpp | 32 | ||||
-rw-r--r-- | src/gpu/GrShaderCaps.cpp | 3 | ||||
-rw-r--r-- | src/gpu/SkGr.cpp | 24 | ||||
-rw-r--r-- | src/gpu/gl/GrGLCaps.cpp | 33 | ||||
-rw-r--r-- | src/gpu/gl/GrGLDefines.h | 3 | ||||
-rw-r--r-- | src/gpu/gl/GrGLGpu.cpp | 1 | ||||
-rw-r--r-- | src/gpu/vk/GrVkUtil.cpp | 3 |
11 files changed, 66 insertions, 101 deletions
diff --git a/include/gpu/GrColor.h b/include/gpu/GrColor.h index 2bd43487e6..7277f0b21c 100644 --- a/include/gpu/GrColor.h +++ b/include/gpu/GrColor.h @@ -288,7 +288,6 @@ static inline uint32_t GrPixelConfigComponentMask(GrPixelConfig config) { static const uint32_t kFlags[] = { 0, // kUnknown_GrPixelConfig kA_GrColorComponentFlag, // kAlpha_8_GrPixelConfig - kRGB_GrColorComponentFlags, // kGray_8_GrPixelConfig kRGBA_GrColorComponentFlags, // kIndex_8_GrPixelConfig kRGB_GrColorComponentFlags, // kRGB_565_GrPixelConfig kRGBA_GrColorComponentFlags, // kRGBA_4444_GrPixelConfig @@ -309,22 +308,21 @@ static inline uint32_t GrPixelConfigComponentMask(GrPixelConfig config) { GR_STATIC_ASSERT(0 == kUnknown_GrPixelConfig); GR_STATIC_ASSERT(1 == kAlpha_8_GrPixelConfig); - GR_STATIC_ASSERT(2 == kGray_8_GrPixelConfig); - GR_STATIC_ASSERT(3 == kIndex_8_GrPixelConfig); - GR_STATIC_ASSERT(4 == kRGB_565_GrPixelConfig); - GR_STATIC_ASSERT(5 == kRGBA_4444_GrPixelConfig); - GR_STATIC_ASSERT(6 == kRGBA_8888_GrPixelConfig); - GR_STATIC_ASSERT(7 == kBGRA_8888_GrPixelConfig); - GR_STATIC_ASSERT(8 == kSRGBA_8888_GrPixelConfig); - GR_STATIC_ASSERT(9 == kSBGRA_8888_GrPixelConfig); - GR_STATIC_ASSERT(10 == kRGBA_8888_sint_GrPixelConfig); - GR_STATIC_ASSERT(11 == kETC1_GrPixelConfig); - GR_STATIC_ASSERT(12 == kLATC_GrPixelConfig); - GR_STATIC_ASSERT(13 == kR11_EAC_GrPixelConfig); - GR_STATIC_ASSERT(14 == kASTC_12x12_GrPixelConfig); - GR_STATIC_ASSERT(15 == kRGBA_float_GrPixelConfig); - GR_STATIC_ASSERT(16 == kAlpha_half_GrPixelConfig); - GR_STATIC_ASSERT(17 == kRGBA_half_GrPixelConfig); + GR_STATIC_ASSERT(2 == kIndex_8_GrPixelConfig); + GR_STATIC_ASSERT(3 == kRGB_565_GrPixelConfig); + GR_STATIC_ASSERT(4 == kRGBA_4444_GrPixelConfig); + GR_STATIC_ASSERT(5 == kRGBA_8888_GrPixelConfig); + GR_STATIC_ASSERT(6 == kBGRA_8888_GrPixelConfig); + GR_STATIC_ASSERT(7 == kSRGBA_8888_GrPixelConfig); + GR_STATIC_ASSERT(8 == kSBGRA_8888_GrPixelConfig); + GR_STATIC_ASSERT(9 == kRGBA_8888_sint_GrPixelConfig); + GR_STATIC_ASSERT(10 == kETC1_GrPixelConfig); + GR_STATIC_ASSERT(11 == kLATC_GrPixelConfig); + GR_STATIC_ASSERT(12 == kR11_EAC_GrPixelConfig); + GR_STATIC_ASSERT(13 == kASTC_12x12_GrPixelConfig); + GR_STATIC_ASSERT(14 == kRGBA_float_GrPixelConfig); + GR_STATIC_ASSERT(15 == kAlpha_half_GrPixelConfig); + GR_STATIC_ASSERT(16 == kRGBA_half_GrPixelConfig); GR_STATIC_ASSERT(SK_ARRAY_COUNT(kFlags) == kGrPixelConfigCnt); } diff --git a/include/gpu/GrTypes.h b/include/gpu/GrTypes.h index d780c32600..86e83f93e8 100644 --- a/include/gpu/GrTypes.h +++ b/include/gpu/GrTypes.h @@ -219,7 +219,6 @@ static inline int GrMaskFormatBytesPerPixel(GrMaskFormat format) { enum GrPixelConfig { kUnknown_GrPixelConfig, kAlpha_8_GrPixelConfig, - kGray_8_GrPixelConfig, kIndex_8_GrPixelConfig, kRGB_565_GrPixelConfig, /** @@ -380,7 +379,6 @@ static inline size_t GrBytesPerPixel(GrPixelConfig config) { SkASSERT(!GrPixelConfigIsCompressed(config)); switch (config) { case kAlpha_8_GrPixelConfig: - case kGray_8_GrPixelConfig: return 1; case kRGB_565_GrPixelConfig: case kRGBA_4444_GrPixelConfig: @@ -405,7 +403,6 @@ static inline bool GrPixelConfigIsOpaque(GrPixelConfig config) { switch (config) { case kETC1_GrPixelConfig: case kRGB_565_GrPixelConfig: - case kGray_8_GrPixelConfig: return true; default: return false; diff --git a/include/private/GrSwizzle.h b/include/private/GrSwizzle.h index 4acf7e44c7..5fa39dd987 100644 --- a/include/private/GrSwizzle.h +++ b/include/private/GrSwizzle.h @@ -93,7 +93,6 @@ public: static GrSwizzle RGBA() { return GrSwizzle("rgba"); } static GrSwizzle AAAA() { return GrSwizzle("aaaa"); } static GrSwizzle RRRR() { return GrSwizzle("rrrr"); } - static GrSwizzle RRRA() { return GrSwizzle("rrra"); } static GrSwizzle BGRA() { return GrSwizzle("bgra"); } static GrSwizzle CreateRandom(SkRandom* random) { diff --git a/src/gpu/GrCaps.cpp b/src/gpu/GrCaps.cpp index 2b18fac767..0cc33462eb 100644 --- a/src/gpu/GrCaps.cpp +++ b/src/gpu/GrCaps.cpp @@ -170,7 +170,6 @@ SkString GrCaps::dump() const { static const char* kConfigNames[] = { "Unknown", // kUnknown_GrPixelConfig "Alpha8", // kAlpha_8_GrPixelConfig, - "Gray8", // kGray_8_GrPixelConfig, "Index8", // kIndex_8_GrPixelConfig, "RGB565", // kRGB_565_GrPixelConfig, "RGBA444", // kRGBA_4444_GrPixelConfig, @@ -189,22 +188,21 @@ SkString GrCaps::dump() const { }; GR_STATIC_ASSERT(0 == kUnknown_GrPixelConfig); GR_STATIC_ASSERT(1 == kAlpha_8_GrPixelConfig); - GR_STATIC_ASSERT(2 == kGray_8_GrPixelConfig); - GR_STATIC_ASSERT(3 == kIndex_8_GrPixelConfig); - GR_STATIC_ASSERT(4 == kRGB_565_GrPixelConfig); - GR_STATIC_ASSERT(5 == kRGBA_4444_GrPixelConfig); - GR_STATIC_ASSERT(6 == kRGBA_8888_GrPixelConfig); - GR_STATIC_ASSERT(7 == kBGRA_8888_GrPixelConfig); - GR_STATIC_ASSERT(8 == kSRGBA_8888_GrPixelConfig); - GR_STATIC_ASSERT(9 == kSBGRA_8888_GrPixelConfig); - GR_STATIC_ASSERT(10 == kRGBA_8888_sint_GrPixelConfig); - GR_STATIC_ASSERT(11 == kETC1_GrPixelConfig); - GR_STATIC_ASSERT(12 == kLATC_GrPixelConfig); - GR_STATIC_ASSERT(13 == kR11_EAC_GrPixelConfig); - GR_STATIC_ASSERT(14 == kASTC_12x12_GrPixelConfig); - GR_STATIC_ASSERT(15 == kRGBA_float_GrPixelConfig); - GR_STATIC_ASSERT(16 == kAlpha_half_GrPixelConfig); - GR_STATIC_ASSERT(17 == kRGBA_half_GrPixelConfig); + GR_STATIC_ASSERT(2 == kIndex_8_GrPixelConfig); + GR_STATIC_ASSERT(3 == kRGB_565_GrPixelConfig); + GR_STATIC_ASSERT(4 == kRGBA_4444_GrPixelConfig); + GR_STATIC_ASSERT(5 == kRGBA_8888_GrPixelConfig); + GR_STATIC_ASSERT(6 == kBGRA_8888_GrPixelConfig); + GR_STATIC_ASSERT(7 == kSRGBA_8888_GrPixelConfig); + GR_STATIC_ASSERT(8 == kSBGRA_8888_GrPixelConfig); + GR_STATIC_ASSERT(9 == kRGBA_8888_sint_GrPixelConfig); + GR_STATIC_ASSERT(10 == kETC1_GrPixelConfig); + GR_STATIC_ASSERT(11 == kLATC_GrPixelConfig); + GR_STATIC_ASSERT(12 == kR11_EAC_GrPixelConfig); + GR_STATIC_ASSERT(13 == kASTC_12x12_GrPixelConfig); + GR_STATIC_ASSERT(14 == kRGBA_float_GrPixelConfig); + GR_STATIC_ASSERT(15 == kAlpha_half_GrPixelConfig); + GR_STATIC_ASSERT(16 == kRGBA_half_GrPixelConfig); GR_STATIC_ASSERT(SK_ARRAY_COUNT(kConfigNames) == kGrPixelConfigCnt); SkASSERT(!this->isConfigRenderable(kUnknown_GrPixelConfig, false)); diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp index fd8aba0ae7..30f596fe10 100644 --- a/src/gpu/GrContext.cpp +++ b/src/gpu/GrContext.cpp @@ -680,7 +680,6 @@ static inline GrPixelConfig GrPixelConfigFallback(GrPixelConfig config) { static const GrPixelConfig kFallback[] = { kUnknown_GrPixelConfig, // kUnknown_GrPixelConfig kRGBA_8888_GrPixelConfig, // kAlpha_8_GrPixelConfig - kUnknown_GrPixelConfig, // kGray_8_GrPixelConfig kUnknown_GrPixelConfig, // kIndex_8_GrPixelConfig kRGBA_8888_GrPixelConfig, // kRGB_565_GrPixelConfig kRGBA_8888_GrPixelConfig, // kRGBA_4444_GrPixelConfig @@ -701,22 +700,21 @@ static inline GrPixelConfig GrPixelConfigFallback(GrPixelConfig config) { GR_STATIC_ASSERT(0 == kUnknown_GrPixelConfig); GR_STATIC_ASSERT(1 == kAlpha_8_GrPixelConfig); - GR_STATIC_ASSERT(2 == kGray_8_GrPixelConfig); - GR_STATIC_ASSERT(3 == kIndex_8_GrPixelConfig); - GR_STATIC_ASSERT(4 == kRGB_565_GrPixelConfig); - GR_STATIC_ASSERT(5 == kRGBA_4444_GrPixelConfig); - GR_STATIC_ASSERT(6 == kRGBA_8888_GrPixelConfig); - GR_STATIC_ASSERT(7 == kBGRA_8888_GrPixelConfig); - GR_STATIC_ASSERT(8 == kSRGBA_8888_GrPixelConfig); - GR_STATIC_ASSERT(9 == kSBGRA_8888_GrPixelConfig); - GR_STATIC_ASSERT(10 == kRGBA_8888_sint_GrPixelConfig); - GR_STATIC_ASSERT(11 == kETC1_GrPixelConfig); - GR_STATIC_ASSERT(12 == kLATC_GrPixelConfig); - GR_STATIC_ASSERT(13 == kR11_EAC_GrPixelConfig); - GR_STATIC_ASSERT(14 == kASTC_12x12_GrPixelConfig); - GR_STATIC_ASSERT(15 == kRGBA_float_GrPixelConfig); - GR_STATIC_ASSERT(16 == kAlpha_half_GrPixelConfig); - GR_STATIC_ASSERT(17 == kRGBA_half_GrPixelConfig); + GR_STATIC_ASSERT(2 == kIndex_8_GrPixelConfig); + GR_STATIC_ASSERT(3 == kRGB_565_GrPixelConfig); + GR_STATIC_ASSERT(4 == kRGBA_4444_GrPixelConfig); + GR_STATIC_ASSERT(5 == kRGBA_8888_GrPixelConfig); + GR_STATIC_ASSERT(6 == kBGRA_8888_GrPixelConfig); + GR_STATIC_ASSERT(7 == kSRGBA_8888_GrPixelConfig); + GR_STATIC_ASSERT(8 == kSBGRA_8888_GrPixelConfig); + GR_STATIC_ASSERT(9 == kRGBA_8888_sint_GrPixelConfig); + GR_STATIC_ASSERT(10 == kETC1_GrPixelConfig); + GR_STATIC_ASSERT(11 == kLATC_GrPixelConfig); + GR_STATIC_ASSERT(12 == kR11_EAC_GrPixelConfig); + GR_STATIC_ASSERT(13 == kASTC_12x12_GrPixelConfig); + GR_STATIC_ASSERT(14 == kRGBA_float_GrPixelConfig); + GR_STATIC_ASSERT(15 == kAlpha_half_GrPixelConfig); + GR_STATIC_ASSERT(16 == kRGBA_half_GrPixelConfig); GR_STATIC_ASSERT(SK_ARRAY_COUNT(kFallback) == kGrPixelConfigCnt); } diff --git a/src/gpu/GrShaderCaps.cpp b/src/gpu/GrShaderCaps.cpp index 90df176051..3e6323f255 100644 --- a/src/gpu/GrShaderCaps.cpp +++ b/src/gpu/GrShaderCaps.cpp @@ -202,7 +202,6 @@ void GrShaderCaps::initSamplerPrecisionTable() { uint8_t* table = fSamplerPrecisions[visibility]; table[kUnknown_GrPixelConfig] = kDefault_GrSLPrecision; table[kAlpha_8_GrPixelConfig] = lowp; - table[kGray_8_GrPixelConfig] = lowp; table[kIndex_8_GrPixelConfig] = lowp; table[kRGB_565_GrPixelConfig] = lowp; table[kRGBA_4444_GrPixelConfig] = lowp; @@ -219,7 +218,7 @@ void GrShaderCaps::initSamplerPrecisionTable() { table[kAlpha_half_GrPixelConfig] = mediump; table[kRGBA_half_GrPixelConfig] = mediump; - GR_STATIC_ASSERT(18 == kGrPixelConfigCnt); + GR_STATIC_ASSERT(17 == kGrPixelConfigCnt); } } diff --git a/src/gpu/SkGr.cpp b/src/gpu/SkGr.cpp index 9d6072c551..4147855e13 100644 --- a/src/gpu/SkGr.cpp +++ b/src/gpu/SkGr.cpp @@ -253,6 +253,25 @@ GrTexture* GrUploadPixmapToTexture(GrContext* ctx, const SkPixmap& pixmap, SkBud pmap = &tmpPixmap; // must rebuild desc, since we've forced the info to be N32 desc = GrImageInfoToSurfaceDesc(pmap->info(), *caps); + } else if (kGray_8_SkColorType == pixmap.colorType()) { + // We don't have Gray8 support as a pixel config, so expand to 8888 + + // We should have converted sRGB Gray8 above (if we have sRGB support): + SkASSERT(!caps->srgbSupport() || !pixmap.info().colorSpace() || + !pixmap.info().colorSpace()->gammaCloseToSRGB()); + + SkImageInfo info = SkImageInfo::MakeN32(pixmap.width(), pixmap.height(), + kOpaque_SkAlphaType); + tmpBitmap.allocPixels(info); + if (!pixmap.readPixels(info, tmpBitmap.getPixels(), tmpBitmap.rowBytes())) { + return nullptr; + } + if (!tmpBitmap.peekPixels(&tmpPixmap)) { + return nullptr; + } + pmap = &tmpPixmap; + // must rebuild desc, since we've forced the info to be N32 + desc = GrImageInfoToSurfaceDesc(pmap->info(), *caps); } else if (kIndex_8_SkColorType == pixmap.colorType()) { if (caps->isConfigTexturable(kIndex_8_GrPixelConfig)) { size_t imageSize = GrCompressedFormatDataSize(kIndex_8_GrPixelConfig, @@ -463,7 +482,7 @@ GrPixelConfig SkImageInfo2GrPixelConfig(SkColorType ct, SkAlphaType, const SkCol case kIndex_8_SkColorType: return kIndex_8_GrPixelConfig; case kGray_8_SkColorType: - return kGray_8_GrPixelConfig; + return kAlpha_8_GrPixelConfig; // TODO: gray8 support on gpu case kRGBA_F16_SkColorType: return kRGBA_half_GrPixelConfig; } @@ -477,9 +496,6 @@ bool GrPixelConfigToColorType(GrPixelConfig config, SkColorType* ctOut) { case kAlpha_8_GrPixelConfig: ct = kAlpha_8_SkColorType; break; - case kGray_8_GrPixelConfig: - ct = kGray_8_SkColorType; - break; case kIndex_8_GrPixelConfig: ct = kIndex_8_SkColorType; break; diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp index bd9380cd20..d3adc28d4c 100644 --- a/src/gpu/gl/GrGLCaps.cpp +++ b/src/gpu/gl/GrGLCaps.cpp @@ -1756,39 +1756,6 @@ void GrGLCaps::initConfigTable(const GrContextOptions& contextOptions, fConfigTable[kAlpha_8_GrPixelConfig].fFlags |= ConfigInfo::kCanUseTexStorage_Flag; } - if (this->textureRedSupport()) { - fConfigTable[kGray_8_GrPixelConfig].fFormats.fBaseInternalFormat = GR_GL_RED; - fConfigTable[kGray_8_GrPixelConfig].fFormats.fSizedInternalFormat = GR_GL_R8; - fConfigTable[kGray_8_GrPixelConfig].fFormats.fExternalFormat[kOther_ExternalFormatUsage] = - GR_GL_RED; - fConfigTable[kGray_8_GrPixelConfig].fSwizzle = GrSwizzle::RRRA(); - if (texelBufferSupport) { - fConfigTable[kGray_8_GrPixelConfig].fFlags |= ConfigInfo::kCanUseWithTexelBuffer_Flag; - } - } else { - fConfigTable[kGray_8_GrPixelConfig].fFormats.fBaseInternalFormat = GR_GL_LUMINANCE; - fConfigTable[kGray_8_GrPixelConfig].fFormats.fSizedInternalFormat = GR_GL_LUMINANCE8; - fConfigTable[kGray_8_GrPixelConfig].fFormats.fExternalFormat[kOther_ExternalFormatUsage] = - GR_GL_LUMINANCE; - fConfigTable[kGray_8_GrPixelConfig].fSwizzle = GrSwizzle::RGBA(); - } - fConfigTable[kGray_8_GrPixelConfig].fFormats.fExternalType = GR_GL_UNSIGNED_BYTE; - fConfigTable[kGray_8_GrPixelConfig].fFormatType = kNormalizedFixedPoint_FormatType; - fConfigTable[kGray_8_GrPixelConfig].fFlags = ConfigInfo::kTextureable_Flag; -#if 0 // Leaving Gray8 as non-renderable, to keep things simple and match raster - if (this->textureRedSupport() || - (kDesktop_ARB_MSFBOType == this->msFBOType() && - ctxInfo.renderer() != kOSMesa_GrGLRenderer)) { - // desktop ARB extension/3.0+ supports LUMINANCE8 as renderable. - // However, osmesa fails if it used even when GL_ARB_framebuffer_object is present. - // Core profile removes LUMINANCE8 support, but we should have chosen R8 in that case. - fConfigTable[kGray_8_GrPixelConfig].fFlags |= allRenderFlags; - } -#endif - if (texStorageSupported) { - fConfigTable[kGray_8_GrPixelConfig].fFlags |= ConfigInfo::kCanUseTexStorage_Flag; - } - // Check for [half] floating point texture support // NOTE: We disallow floating point textures on ES devices if linear filtering modes are not // supported. This is for simplicity, but a more granular approach is possible. Coincidentally, diff --git a/src/gpu/gl/GrGLDefines.h b/src/gpu/gl/GrGLDefines.h index 05a594e0e6..18dee280f0 100644 --- a/src/gpu/gl/GrGLDefines.h +++ b/src/gpu/gl/GrGLDefines.h @@ -461,9 +461,6 @@ #define GR_GL_R32I 0x8235 #define GR_GL_R32UI 0x8236 -/* Luminance sized formats */ -#define GR_GL_LUMINANCE8 0x8040 - /* Alpha sized formats */ #define GR_GL_ALPHA8 0x803C #define GR_GL_ALPHA16 0x803E diff --git a/src/gpu/gl/GrGLGpu.cpp b/src/gpu/gl/GrGLGpu.cpp index 74e52583dd..577aca844f 100644 --- a/src/gpu/gl/GrGLGpu.cpp +++ b/src/gpu/gl/GrGLGpu.cpp @@ -927,7 +927,6 @@ static inline GrGLint config_alignment(GrPixelConfig config) { SkASSERT(!GrPixelConfigIsCompressed(config)); switch (config) { case kAlpha_8_GrPixelConfig: - case kGray_8_GrPixelConfig: return 1; case kRGB_565_GrPixelConfig: case kRGBA_4444_GrPixelConfig: diff --git a/src/gpu/vk/GrVkUtil.cpp b/src/gpu/vk/GrVkUtil.cpp index b92f03e7d8..3071fc8d83 100644 --- a/src/gpu/vk/GrVkUtil.cpp +++ b/src/gpu/vk/GrVkUtil.cpp @@ -48,9 +48,6 @@ bool GrPixelConfigToVkFormat(GrPixelConfig config, VkFormat* format) { case kAlpha_8_GrPixelConfig: *format = VK_FORMAT_R8_UNORM; return true; - case kGray_8_GrPixelConfig: - *format = VK_FORMAT_R8_UNORM; - return true; case kETC1_GrPixelConfig: // converting to ETC2 which is a superset of ETC1 *format = VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK; |