Commit 9819e9ed by Alexis Hetu Committed by Commit Bot

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 <sugoi@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
parent eb06bc24
...@@ -262,7 +262,13 @@ static bool DetermineBGRA8TextureSupport(const TextureCapsMap &textureCaps) ...@@ -262,7 +262,13 @@ static bool DetermineBGRA8TextureSupport(const TextureCapsMap &textureCaps)
// Checks for GL_EXT_read_format_bgra support // Checks for GL_EXT_read_format_bgra support
static bool DetermineBGRAReadFormatSupport(const TextureCapsMap &textureCaps) 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 // Checks for GL_OES_color_buffer_half_float support
......
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