GL_EXT_read_format_bgra support

Implemented DetermineBGRAReadFormatSupport in order to allow enabling
readFormat when possible with the Vulkan backend.

While reading the spec, I realized that ANGLE only seems to care
about BGRA8888 and not the new types mentioned in the extension.
Logged a new issue (http://anglebug.com/4302) to track this.

Bug: angleproject:4294
Change-Id: I071ed89574de9b4088df2301c317d3769cb31ce6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2003237
Commit-Queue: Alexis Hétu <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
This commit is contained in:
Alexis Hetu authored and Commit Bot committed 2020-01-17 05:43:19 +00:00
1 parent eb06bc2439
commit 9819e9ed7b
1 file changed
+7 -1
+7 -1
View File
@@ -262,7 +262,13 @@ static bool DetermineBGRA8TextureSupport(const TextureCapsMap &textureCaps)
// Checks for GL_EXT_read_format_bgra support
static bool DetermineBGRAReadFormatSupport(const TextureCapsMap &textureCaps)
{
return false;
constexpr GLenum requiredFormats[] = {
GL_BGRA8_EXT,
// TODO(http://anglebug.com/4302): GL_EXT_read_format_bgra specifies 2 more types, which are
// currently ignored. The equivalent formats would be: GL_BGRA4_ANGLEX, GL_BGR5_A1_ANGLEX
};
return GetFormatSupport(textureCaps, requiredFormats, true, false, true, true, false);
}
// Checks for GL_OES_color_buffer_half_float support