forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement support for rendering to 32-bit float textures on ES3
On ES2 with OES_texture_float/OES_texture_half_float support, it is only possible to render to 16-bit half float textures using EXT_color_buffer_half_float. There's no support for rendering to 32-bit float textures in ES2 extensions. On ES3, rendering to some 32-bit float texture formats is exposed with EXT_color_buffer_float, but one must use the sized internal formats specified in ES3 core to do that. To expose this, a new command buffer extension is added which enables clients to directly use the sized internal format GL_RGBA32F. A similar extension is also added to expose GL_RGB32F on desktop GL platforms for the sake of consistency. These extensions are available whenever rendering to float textures is available. To support the current version of ANGLE, format conversions back to unsized internal formats are added to ui/gl. Tests are added to cover this functionality. The new tests also add coverage for the handling of 32-bit float formats on ES2 and on desktop GL that existed before this patch. BUG=329605 TEST=gpu_unittests, WebGL conformance tests Review URL: https://codereview.chromium.org/139013008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@251329 0039d316-1c4b-4281-b951-d872f2087c98
- Loading branch information
oetuaho@nvidia.com
committed
Feb 14, 2014
1 parent
768b8dc
commit 17a9611
Showing
24 changed files
with
678 additions
and
151 deletions.
There are no files selected for viewing
64 changes: 64 additions & 0 deletions
64
gpu/GLES2/extensions/CHROMIUM/CHROMIUM_color_buffer_float_rgb.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
Name | ||
|
||
CHROMIUM_color_buffer_float_rgb | ||
|
||
Name Strings | ||
|
||
GL_CHROMIUM_color_buffer_float_rgb | ||
|
||
Version | ||
|
||
Last Modifed Date: February 7, 2014 | ||
|
||
Dependencies | ||
|
||
This extension is written against the OpenGL ES 2.0 specification. | ||
|
||
OpenGL ES 2.0 is required. | ||
|
||
OES_texture_float is required. | ||
|
||
Overview | ||
|
||
This extension implements a subset of ARB_color_buffer_float on top of | ||
OpenGL ES 2.0. | ||
|
||
This extension enables rendering to floating point RGB textures. When | ||
this extension is enabled: | ||
|
||
* The 32-bit floating point type GL_RGB32F becomes available as a | ||
color-renderable internal format. Textures created with type = FLOAT, | ||
and internal format GL_RGB32F, can be attached to framebuffer object | ||
color attachments for rendering. | ||
|
||
* GL_RGB / GL_RGB32F becomes an allowable format / internalformat parameter | ||
pair for TexImage2D. The restriction in section 3.7.1 of the OpenGL ES | ||
2.0 spec that the internalformat parameter and format parameter of | ||
TexImage2D must match is lifted for this case. | ||
|
||
Floating point RGB textures may still be created also with the unsized | ||
GL_RGB internal format, but whether such textures are renderable is not | ||
guaranteed. | ||
|
||
New Tokens | ||
|
||
Accepted by the <internalformat> parameter of TexImage2D: | ||
|
||
GL_RGB32F 0x8815 | ||
|
||
New Procedures and Functions | ||
|
||
None. | ||
|
||
Errors | ||
|
||
None. | ||
|
||
New State | ||
|
||
None. | ||
|
||
Revision History | ||
|
||
2/7/2014 Documented the extension | ||
|
64 changes: 64 additions & 0 deletions
64
gpu/GLES2/extensions/CHROMIUM/CHROMIUM_color_buffer_float_rgba.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
Name | ||
|
||
CHROMIUM_color_buffer_float_rgba | ||
|
||
Name Strings | ||
|
||
GL_CHROMIUM_color_buffer_float_rgba | ||
|
||
Version | ||
|
||
Last Modifed Date: February 7, 2014 | ||
|
||
Dependencies | ||
|
||
This extension is written against the OpenGL ES 2.0 specification. | ||
|
||
OpenGL ES 2.0 is required. | ||
|
||
OES_texture_float is required. | ||
|
||
Overview | ||
|
||
This extension implements a subset of EXT_color_buffer_float on top of | ||
OpenGL ES 2.0. | ||
|
||
This extension enables rendering to floating point RGBA textures. When | ||
this extension is enabled: | ||
|
||
* The 32-bit floating point type GL_RGBA32F becomes available as a | ||
color-renderable internal format. Textures created with type = FLOAT, | ||
and internal format GL_RGBA32F, can be attached to framebuffer object | ||
color attachments for rendering. | ||
|
||
* GL_RGBA / GL_RGBA32F becomes an allowable format / internalformat | ||
parameter pair for TexImage2D. The restriction in section 3.7.1 of the | ||
OpenGL ES 2.0 spec that the internalformat parameter and format parameter | ||
of TexImage2D must match is lifted for this case. | ||
|
||
Floating point RGBA textures may still be created also with the unsized | ||
GL_RGBA internal format, but whether such textures are renderable is not | ||
guaranteed. | ||
|
||
New Tokens | ||
|
||
Accepted by the <internalformat> parameter of TexImage2D: | ||
|
||
GL_RGBA32F 0x8814 | ||
|
||
New Procedures and Functions | ||
|
||
None. | ||
|
||
Errors | ||
|
||
None. | ||
|
||
New State | ||
|
||
None. | ||
|
||
Revision History | ||
|
||
2/7/2014 Documented the extension | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.