Reland "Add support for RGB config to Vulkan."
This reverts commit f18c297cfb74a48b748bc7909991f98dabb8d460.
Reason for revert: fix
Original change's description:
> Revert "Add support for RGB config to Vulkan."
>
> This reverts commit a8b20a1af7a529a8ecdb0cccc5012fa79fed2605.
>
> Reason for revert: breaking some bots
>
> Original change's description:
> > Add support for RGB config to Vulkan.
> >
> > This adds support for RGB, but from investigating, most desktops don't
> > support RGB at all, and on Android it is usually support as a linear
> > format and not necessarily an optimal one. So until we get better support
> > for linear formats this CL doesn't necessarily add more feature support to
> > our vulkan backend.
> >
> > Bug: skia:8349
> > Change-Id: I1066ddafa660a1ef1d90dbf3e127e067d6132d45
> > Reviewed-on: https://skia-review.googlesource.com/156600
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
> > Reviewed-by: Robert Phillips <robertphillips@google.com>
>
> TBR=egdaniel@google.com,robertphillips@google.com
>
> Change-Id: Ibb7b67c36a1dbcf0d670e0ff293003eac23b5ac4
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:8349
> Reviewed-on: https://skia-review.googlesource.com/156940
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>
TBR=egdaniel@google.com,robertphillips@google.com
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: skia:8349
Change-Id: Ica68753c0a113b742d1a9abc4a6ac49414c1fe84
Reviewed-on: https://skia-review.googlesource.com/157570
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
diff --git a/src/gpu/vk/GrVkCaps.cpp b/src/gpu/vk/GrVkCaps.cpp
index a1388a6..08a3e4d 100644
--- a/src/gpu/vk/GrVkCaps.cpp
+++ b/src/gpu/vk/GrVkCaps.cpp
@@ -712,8 +712,10 @@
}
break;
case kRGB_888x_SkColorType:
- // TODO: VK_FORMAT_R8G8B8_UNORM
- return false;
+ if (VK_FORMAT_R8G8B8_UNORM == format) {
+ *config = kRGB_888_GrPixelConfig;
+ }
+ break;
case kBGRA_8888_SkColorType:
if (VK_FORMAT_B8G8R8A8_UNORM == format) {
*config = kBGRA_8888_GrPixelConfig;