Add support for RG float textures
Adds kRG_float_GrPixelConfig.
Also removes default labels from switches on GrPixelConfig, in order
to help guide future enumerals to handle them properly.
BUG=skia:
Change-Id: Ie80b9413b4002b666df3ef1a7a8ea4c9c29ce43b
Reviewed-on: https://skia-review.googlesource.com/8226
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
diff --git a/src/gpu/vk/GrVkUtil.cpp b/src/gpu/vk/GrVkUtil.cpp
index da73e5a..ad477e3 100644
--- a/src/gpu/vk/GrVkUtil.cpp
+++ b/src/gpu/vk/GrVkUtil.cpp
@@ -64,6 +64,9 @@
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:
*format = VK_FORMAT_R16G16B16A16_SFLOAT;
return true;
@@ -120,6 +123,9 @@
case VK_FORMAT_R32G32B32A32_SFLOAT:
*config = kRGBA_float_GrPixelConfig;
break;
+ case VK_FORMAT_R32G32_SFLOAT:
+ *config = kRG_float_GrPixelConfig;
+ break;
case VK_FORMAT_R16G16B16A16_SFLOAT:
*config = kRGBA_half_GrPixelConfig;
break;