Index: src/gpu/vk/GrVkUtil.cpp |
diff --git a/src/gpu/vk/GrVkUtil.cpp b/src/gpu/vk/GrVkUtil.cpp |
index 760b20b4580e7f75de814d032b59cd954077aae5..ffbad25fd9a29753a5b05dc7975a20a816cbc70c 100644 |
--- a/src/gpu/vk/GrVkUtil.cpp |
+++ b/src/gpu/vk/GrVkUtil.cpp |
@@ -30,7 +30,9 @@ bool GrPixelConfigToVkFormat(GrPixelConfig config, VkFormat* format) { |
*format = VK_FORMAT_R5G6B5_UNORM_PACK16; |
break; |
case kRGBA_4444_GrPixelConfig: |
- *format = VK_FORMAT_R4G4B4A4_UNORM_PACK16; |
+ // R4G4B4A4 is not required to be supported so we actually |
+ // store the data is if it was B4G4R4A4 and swizzle in shaders |
+ *format = VK_FORMAT_B4G4R4A4_UNORM_PACK16; |
break; |
case kIndex_8_GrPixelConfig: |
// No current vulkan support for this config |
@@ -88,7 +90,9 @@ bool GrVkFormatToPixelConfig(VkFormat format, GrPixelConfig* config) { |
case VK_FORMAT_R5G6B5_UNORM_PACK16: |
*config = kRGB_565_GrPixelConfig; |
break; |
- case VK_FORMAT_R4G4B4A4_UNORM_PACK16: |
+ case VK_FORMAT_B4G4R4A4_UNORM_PACK16: |
+ // R4G4B4A4 is not required to be supported so we actually |
+ // store RGBA_4444 data as B4G4R4A4. |
*config = kRGBA_4444_GrPixelConfig; |
break; |
case VK_FORMAT_R8_UNORM: |