Add vulkan format image fallback for R16G16B16

This change adds a vulkan format image mapping fallback from R16G16B16
to R16G16B16A16, R32G32B32_FLOAT and R32G32B32A32_FLOAT for both
UNORM and SNORM variants.

This is done because in Chrome we want to use R16/RG16 formats which
are exposed to Skia over the EXT_texture_norm16. Currently,
EXT_texture_norm16 requires RGB16_EXT which if not present is not
supported even if R16_EXT and RG16_EXT are supported. This fallback
helps us support R16/RG16 as well over RGBA16.

It also updates validationES checks for GL_RGBA signed and unsigned
normalized checking if type is GL_SHORT or GL_UNSIGNED_SHORT.

It adds a method LoadToFloat that allows a type (GLushort or GLshort)
to be loaded into float format types. This is then used as part of
fallbacks for load_functions_data.json.

Bug: None
Change-Id: I5c6879cd2ed5dd6e3440877f4891f269d96d88a1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4294694
Reviewed-by: Vasiliy Telezhnikov <vasilyt@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
This commit is contained in:
Saifuddin Hitawala
2023-03-02 10:24:14 -05:00
committed by Angle LUCI CQ
parent fee173f920
commit 71f6d54c8d
22 changed files with 175 additions and 35 deletions

View File

@@ -1,6 +1,6 @@
{
"src/libANGLE/renderer/angle_format.py":
"0660cb3dfc7f5d29b099c94ed78f63a3",
"601bfb757e052c50ac8f4cb4e0b58eb5",
"src/libANGLE/renderer/angle_format_map.json":
"4c09d19204afa53cd9d137bb4edbabb1",
"src/libANGLE/renderer/metal/gen_mtl_format_table.py":
@@ -8,5 +8,5 @@
"src/libANGLE/renderer/metal/mtl_format_map.json":
"19bd12ef7042d85051b25ad059fa65dc",
"src/libANGLE/renderer/metal/mtl_format_table_autogen.mm":
"4601093952e01dc953d602023a9513ce"
"c347c73fdfca96e6dc4e59840b52dc29"
}