Add BC1_RGB8_UNORM support
This is working in the GL and Vulkan back ends. MacOS only supports the RGBA8 variants.
For mobile devices, probably only nVidia GPUs will support this.
Bug: skia:9680
Change-Id: I9d886b72232a031603e93e46059a97a8aa288b3c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/261093
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/gl/GrGLUtil.cpp b/src/gpu/gl/GrGLUtil.cpp
index 0b5755e..be86878 100644
--- a/src/gpu/gl/GrGLUtil.cpp
+++ b/src/gpu/gl/GrGLUtil.cpp
@@ -623,6 +623,7 @@
switch (format) {
case GrGLFormat::kCOMPRESSED_RGB8_ETC2:
case GrGLFormat::kCOMPRESSED_ETC1_RGB8:
+ case GrGLFormat::kCOMPRESSED_RGB8_BC1:
return true;
case GrGLFormat::kRGBA8:
@@ -654,6 +655,8 @@
case GrGLFormat::kCOMPRESSED_RGB8_ETC2:
case GrGLFormat::kCOMPRESSED_ETC1_RGB8:
return SkImage::CompressionType::kETC1;
+ case GrGLFormat::kCOMPRESSED_RGB8_BC1:
+ return SkImage::CompressionType::kBC1_RGB8_UNORM;
case GrGLFormat::kRGBA8:
case GrGLFormat::kR8: