Add Ganesh support for LUM16F (take 2)
When Chrome has a LUM16F texture they tell Skia it is R16F. Although this has been working for them so far it causes trouble with some upcoming changes.
Change-Id: I2473f70e4f725128f143c2dfb08adb79f3c7c166
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/228565
Reviewed-by: Brian Salomon <bsalomon@google.com>
diff --git a/src/sksl/SkSLGLSLCodeGenerator.cpp b/src/sksl/SkSLGLSLCodeGenerator.cpp
index 4ac8ed4..2f2989b 100644
--- a/src/sksl/SkSLGLSLCodeGenerator.cpp
+++ b/src/sksl/SkSLGLSLCodeGenerator.cpp
@@ -1143,18 +1143,19 @@
switch (modifiers.fLayout.fFormat) {
case Layout::Format::kUnspecified:
break;
- case Layout::Format::kRGBA32F: // fall through
+ case Layout::Format::kRGBA32F: // fall through
case Layout::Format::kR32F:
this->write("highp ");
break;
- case Layout::Format::kRGBA16F: // fall through
- case Layout::Format::kR16F: // fall through
+ case Layout::Format::kRGBA16F: // fall through
+ case Layout::Format::kR16F: // fall through
+ case Layout::Format::kLUMINANCE16F: // fall through
case Layout::Format::kRG16F:
this->write("mediump ");
break;
- case Layout::Format::kRGBA8: // fall through
- case Layout::Format::kR8: // fall through
- case Layout::Format::kRGBA8I: // fall through
+ case Layout::Format::kRGBA8: // fall through
+ case Layout::Format::kR8: // fall through
+ case Layout::Format::kRGBA8I: // fall through
case Layout::Format::kR8I:
this->write("lowp ");
break;