Commit e2838f16 authored by Sergey Ulanov's avatar Sergey Ulanov Committed by Commit Bot

[Fuchsia] Enable R8 and R8G8 buffer formats

Sysmem now supports R8 and R8G8 image formats, so it can be used to R8
and R8G8 GpuMemoryBuffers

Bug: 1141538
Change-Id: I790c6886d67f49c09f2e2c4a93db7a27450aa30f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2491995
Commit-Queue: Sergey Ulanov <sergeyu@chromium.org>
Commit-Queue: Kevin Marshall <kmarshall@chromium.org>
Auto-Submit: Sergey Ulanov <sergeyu@chromium.org>
Reviewed-by: default avatarKevin Marshall <kmarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#820012}
parent ad03192d
......@@ -28,6 +28,12 @@ VkFormat VkFormatForBufferFormat(gfx::BufferFormat buffer_format) {
case gfx::BufferFormat::YUV_420_BIPLANAR:
return VK_FORMAT_G8_B8R8_2PLANE_420_UNORM;
case gfx::BufferFormat::R_8:
return VK_FORMAT_R8_UNORM;
case gfx::BufferFormat::RG_88:
return VK_FORMAT_R8G8_UNORM;
case gfx::BufferFormat::BGRA_8888:
case gfx::BufferFormat::BGRX_8888:
return VK_FORMAT_B8G8R8A8_UNORM;
......@@ -49,6 +55,8 @@ bool SysmemBufferCollection::IsNativePixmapConfigSupported(
gfx::BufferFormat format,
gfx::BufferUsage usage) {
bool format_supported = format == gfx::BufferFormat::YUV_420_BIPLANAR ||
format == gfx::BufferFormat::R_8 ||
format == gfx::BufferFormat::RG_88 ||
format == gfx::BufferFormat::RGBA_8888 ||
format == gfx::BufferFormat::RGBX_8888 ||
format == gfx::BufferFormat::BGRA_8888 ||
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment