Commit ca04de85 by Courtney Goeltzenleuchter Committed by Commit Bot

Vulkan: blacklist VK_FORMAT_R8G8B8_UNORM

Chrome makes assumptions that depend on ANGLE implementing 24bit RGB as 32 RGBX. Since that was the behavior of ANGLE for a while, remove those formats from the VK format table to force that behavior again. Test: Chrome on Fuchsia Bug: angleproject:4282 Change-Id: I22a3f07b00d7870044ed6b3326dd528721b89af8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2085043Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Commit-Queue: Michael Spang <spang@chromium.org>
parent e682bc57
......@@ -6,7 +6,7 @@
"src/libANGLE/renderer/vulkan/gen_vk_format_table.py":
"d8a0f2278c09a49049a73930b9da3719",
"src/libANGLE/renderer/vulkan/vk_format_map.json":
"e203fb283bfb2f0c446d523f7b290af6",
"cc593afd850712a04600c9badf1544a6",
"src/libANGLE/renderer/vulkan/vk_format_table_autogen.cpp":
"a77060d7b772d1a94bdd32ce4b31399e"
"0b818cbddfa88311b853eb1c30eb137d"
}
\ No newline at end of file
......@@ -40,7 +40,6 @@
"R8G8_SINT": "VK_FORMAT_R8G8_SINT",
"R8G8_USCALED": "VK_FORMAT_R8G8_USCALED",
"R8G8_SSCALED": "VK_FORMAT_R8G8_SSCALED",
"R8G8B8_UNORM": "VK_FORMAT_R8G8B8_UNORM",
"R8G8B8_SNORM": "VK_FORMAT_R8G8B8_SNORM",
"R8G8B8_UINT": "VK_FORMAT_R8G8B8_UINT",
"R8G8B8_SINT": "VK_FORMAT_R8G8B8_SINT",
......
......@@ -2273,22 +2273,15 @@ void Format::initialize(RendererVk *renderer, const angle::Format &angleFormat)
break;
case angle::FormatID::R8G8B8_UNORM:
internalFormat = GL_RGB8;
{
static constexpr ImageFormatInitInfo kInfo[] = {
{angle::FormatID::R8G8B8_UNORM, VK_FORMAT_R8G8B8_UNORM, nullptr},
{angle::FormatID::R8G8B8A8_UNORM, VK_FORMAT_R8G8B8A8_UNORM,
Initialize4ComponentData<GLubyte, 0x00, 0x00, 0x00, 0xFF>}};
initImageFallback(renderer, kInfo, ArraySize(kInfo));
}
{
static constexpr BufferFormatInitInfo kInfo[] = {
{angle::FormatID::R8G8B8_UNORM, VK_FORMAT_R8G8B8_UNORM, false,
CopyNativeVertexData<GLubyte, 3, 3, 0>, false},
{angle::FormatID::R32G32B32_FLOAT, VK_FORMAT_R32G32B32_SFLOAT, false,
CopyTo32FVertexData<GLubyte, 3, 3, true>, true}};
initBufferFallback(renderer, kInfo, ArraySize(kInfo));
}
internalFormat = GL_RGB8;
actualImageFormatID = angle::FormatID::R8G8B8A8_UNORM;
vkImageFormat = VK_FORMAT_R8G8B8A8_UNORM;
imageInitializerFunction = Initialize4ComponentData<GLubyte, 0x00, 0x00, 0x00, 0xFF>;
actualBufferFormatID = angle::FormatID::R32G32B32_FLOAT;
vkBufferFormat = VK_FORMAT_R32G32B32_SFLOAT;
vkBufferFormatIsPacked = false;
vertexLoadFunction = CopyTo32FVertexData<GLubyte, 3, 3, true>;
vertexLoadRequiresConversion = true;
break;
case angle::FormatID::R8G8B8_UNORM_SRGB:
......
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