Commit 95446754 by Jeff Gilbert Committed by Commit Bot

Add support to CHROMIUM_color_buffer_rgba for creating RGBA32F renderbuffers on ES2.

This is desired for implementing WEBGL_color_buffer_float support on WebGL1 on ANGLE's ES2 driver, for Firefox. Bug: angleproject:3322 Change-Id: I599f86db62402333d3ef9235956c63e667f1513d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1541722Reviewed-by: 's avatarKenneth Russell <kbr@chromium.org> Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Commit-Queue: Kenneth Russell <kbr@chromium.org>
parent 345cb856
...@@ -687,7 +687,7 @@ static bool DetermineColorBufferFloatRGBASupport(const TextureCapsMap &textureCa ...@@ -687,7 +687,7 @@ static bool DetermineColorBufferFloatRGBASupport(const TextureCapsMap &textureCa
GL_RGBA32F, GL_RGBA32F,
}; };
return GetFormatSupport(textureCaps, requiredFormats, true, false, true, false); return GetFormatSupport(textureCaps, requiredFormats, true, false, true, true);
} }
// Check for GL_EXT_color_buffer_float // Check for GL_EXT_color_buffer_float
......
...@@ -280,6 +280,13 @@ static bool SizedHalfFloatRGBARenderbufferSupport(const Version &clientVersion, ...@@ -280,6 +280,13 @@ static bool SizedHalfFloatRGBARenderbufferSupport(const Version &clientVersion,
(extensions.colorBufferFloat || extensions.colorBufferHalfFloat); (extensions.colorBufferFloat || extensions.colorBufferHalfFloat);
} }
static bool SizedFloatRGBARenderbufferSupport(const Version &clientVersion,
const Extensions &extensions)
{
return (clientVersion >= Version(3, 0) || extensions.textureFloat) &&
(extensions.colorBufferFloat || extensions.colorBufferFloatRGBA);
}
// R32F, RG32F // R32F, RG32F
static bool SizedFloatRGSupport(const Version &clientVersion, const Extensions &extensions) static bool SizedFloatRGSupport(const Version &clientVersion, const Extensions &extensions)
{ {
...@@ -783,7 +790,7 @@ static InternalFormatInfoMap BuildInternalFormatInfoMap() ...@@ -783,7 +790,7 @@ static InternalFormatInfoMap BuildInternalFormatInfoMap()
AddRGBAFormat(&map, GL_R32F, true, 32, 0, 0, 0, 0, GL_RED, GL_FLOAT, GL_FLOAT, false, SizedFloatRGSupport, RequireExt<&Extensions::textureFloatLinear>, RequireExt<&Extensions::colorBufferFloat>, RequireExt<&Extensions::colorBufferFloat>); AddRGBAFormat(&map, GL_R32F, true, 32, 0, 0, 0, 0, GL_RED, GL_FLOAT, GL_FLOAT, false, SizedFloatRGSupport, RequireExt<&Extensions::textureFloatLinear>, RequireExt<&Extensions::colorBufferFloat>, RequireExt<&Extensions::colorBufferFloat>);
AddRGBAFormat(&map, GL_RG32F, true, 32, 32, 0, 0, 0, GL_RG, GL_FLOAT, GL_FLOAT, false, SizedFloatRGSupport, RequireExt<&Extensions::textureFloatLinear>, RequireExt<&Extensions::colorBufferFloat>, RequireExt<&Extensions::colorBufferFloat>); AddRGBAFormat(&map, GL_RG32F, true, 32, 32, 0, 0, 0, GL_RG, GL_FLOAT, GL_FLOAT, false, SizedFloatRGSupport, RequireExt<&Extensions::textureFloatLinear>, RequireExt<&Extensions::colorBufferFloat>, RequireExt<&Extensions::colorBufferFloat>);
AddRGBAFormat(&map, GL_RGB32F, true, 32, 32, 32, 0, 0, GL_RGB, GL_FLOAT, GL_FLOAT, false, SizedFloatRGBSupport, RequireExt<&Extensions::textureFloatLinear>, RequireExt<&Extensions::colorBufferFloatRGB>, NeverSupported ); AddRGBAFormat(&map, GL_RGB32F, true, 32, 32, 32, 0, 0, GL_RGB, GL_FLOAT, GL_FLOAT, false, SizedFloatRGBSupport, RequireExt<&Extensions::textureFloatLinear>, RequireExt<&Extensions::colorBufferFloatRGB>, NeverSupported );
AddRGBAFormat(&map, GL_RGBA32F, true, 32, 32, 32, 32, 0, GL_RGBA, GL_FLOAT, GL_FLOAT, false, SizedFloatRGBASupport, RequireExt<&Extensions::textureFloatLinear>, SizedFloatRGBATextureAttachmentSupport, RequireExt<&Extensions::colorBufferFloat>); AddRGBAFormat(&map, GL_RGBA32F, true, 32, 32, 32, 32, 0, GL_RGBA, GL_FLOAT, GL_FLOAT, false, SizedFloatRGBASupport, RequireExt<&Extensions::textureFloatLinear>, SizedFloatRGBATextureAttachmentSupport, SizedFloatRGBARenderbufferSupport);
// Depth stencil formats // Depth stencil formats
// | Internal format |sized| D |S | X | Format | Type | Component type | Texture supported | Filterable | Texture attachment | Renderbuffer | // | Internal format |sized| D |S | X | Format | Type | Component type | Texture supported | Filterable | Texture attachment | Renderbuffer |
......
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