Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(466)

Issue 139013008: Implement support for rendering to 32-bit float textures on ES3 (Closed)

Created:
6 years, 11 months ago by oetuaho-nv
Modified:
6 years, 10 months ago
CC:
chromium-reviews, piman+watch_chromium.org
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

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 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=251329

Patch Set 1 #

Total comments: 10

Patch Set 2 : Address review comments #

Patch Set 3 : WIP: Put rendering to float textures behind CHROMIUM_color_buffer_float #

Patch Set 4 : Check that framebuffers really are supported and add tests #

Total comments: 6

Patch Set 5 : Address review feedback, split extension and add tests #

Total comments: 1

Patch Set 6 : Pass FeatureInfo to IsPossiblyComplete and minor tweaks #

Patch Set 7 : Fix extension names that are a substring of another name in FeatureInfo #

Total comments: 8

Patch Set 8 : Add workarounds for ANGLE and framebuffer completeness #

Patch Set 9 : Rebase #

Total comments: 7

Patch Set 10 : Restore compatibility with clients using unsized formats #

Total comments: 1

Patch Set 11 : Add link to ANGLE bug #

Patch Set 12 : Make TexSubImage validation agree with TexImage validation #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+678 lines, -151 lines) Patch
A gpu/GLES2/extensions/CHROMIUM/CHROMIUM_color_buffer_float_rgb.txt View 1 2 3 4 5 6 7 8 9 1 chunk +64 lines, -0 lines 0 comments Download
A gpu/GLES2/extensions/CHROMIUM/CHROMIUM_color_buffer_float_rgba.txt View 1 2 3 4 5 6 7 8 9 1 chunk +64 lines, -0 lines 0 comments Download
M gpu/GLES2/gl2extchromium.h View 1 2 3 4 1 chunk +14 lines, -0 lines 0 comments Download
M gpu/command_buffer/service/context_group_unittest.cc View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M gpu/command_buffer/service/feature_info.h View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M gpu/command_buffer/service/feature_info.cc View 1 2 3 4 5 6 7 8 9 5 chunks +79 lines, -11 lines 0 comments Download
M gpu/command_buffer/service/feature_info_unittest.cc View 1 2 3 4 5 6 2 chunks +17 lines, -0 lines 0 comments Download
M gpu/command_buffer/service/framebuffer_manager_unittest.cc View 1 2 3 4 5 6 7 8 9 24 chunks +110 lines, -43 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder.cc View 1 2 3 4 5 6 7 8 9 10 11 6 chunks +8 lines, -18 lines 2 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc View 1 2 3 4 5 6 7 8 1 chunk +72 lines, -0 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h View 1 2 3 4 5 6 7 8 9 1 chunk +6 lines, -0 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc View 1 2 3 4 5 6 7 8 9 3 chunks +36 lines, -11 lines 0 comments Download
M gpu/command_buffer/service/test_helper.h View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M gpu/command_buffer/service/test_helper.cc View 1 2 3 4 5 6 7 2 chunks +79 lines, -3 lines 0 comments Download
M gpu/command_buffer/service/texture_manager.h View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +8 lines, -3 lines 0 comments Download
M gpu/command_buffer/service/texture_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 6 chunks +42 lines, -36 lines 0 comments Download
M gpu/command_buffer/service/texture_manager_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +12 lines, -15 lines 0 comments Download
M ui/gl/gl_context.h View 1 2 3 4 5 6 7 8 9 2 chunks +6 lines, -3 lines 0 comments Download
M ui/gl/gl_context.cc View 1 2 3 4 5 6 7 8 9 2 chunks +9 lines, -1 line 0 comments Download
M ui/gl/gl_context_stub.h View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M ui/gl/gl_context_stub.cc View 1 2 3 4 5 6 7 8 9 1 chunk +4 lines, -0 lines 0 comments Download
M ui/gl/gl_gl_api_implementation.cc View 1 2 3 4 5 6 7 8 9 10 5 chunks +32 lines, -1 line 0 comments Download
M ui/gl/gl_version_info.h View 1 2 3 4 5 6 7 8 9 2 chunks +3 lines, -1 line 0 comments Download
M ui/gl/gl_version_info.cc View 1 2 3 4 5 6 7 8 9 3 chunks +6 lines, -2 lines 0 comments Download

Messages

Total messages: 43 (0 generated)
oetuaho-nv
Most relevant WebGL conformance test: https://www.khronos.org/registry/webgl/sdk/tests/conformance/extensions/oes-texture-float.html I've tested this on Tegra K1, where the conformance ...
6 years, 11 months ago (2014-01-20 17:49:39 UTC) #1
no sievers
https://codereview.chromium.org/139013008/diff/1/ui/gl/gl_gl_api_implementation.cc File ui/gl/gl_gl_api_implementation.cc (right): https://codereview.chromium.org/139013008/diff/1/ui/gl/gl_gl_api_implementation.cc#newcode49 ui/gl/gl_gl_api_implementation.cc:49: // Use sized internal formats from core ES3 to ...
6 years, 11 months ago (2014-01-21 22:21:12 UTC) #2
piman
https://codereview.chromium.org/139013008/diff/1/ui/gl/gl_gl_api_implementation.cc File ui/gl/gl_gl_api_implementation.cc (right): https://codereview.chromium.org/139013008/diff/1/ui/gl/gl_gl_api_implementation.cc#newcode48 ui/gl/gl_gl_api_implementation.cc:48: if (gfx::g_version_info->is_es3) { I think we want to limit ...
6 years, 11 months ago (2014-01-21 22:37:12 UTC) #3
no sievers
Actually, I'm getting a bit more confused now since your patch seems to mostly handle ...
6 years, 11 months ago (2014-01-21 22:59:11 UTC) #4
oetuaho-nv
On 2014/01/21 22:59:11, sievers wrote: > Actually, I'm getting a bit more confused now since ...
6 years, 11 months ago (2014-01-22 09:45:43 UTC) #5
oetuaho-nv
https://codereview.chromium.org/139013008/diff/1/ui/gl/gl_gl_api_implementation.cc File ui/gl/gl_gl_api_implementation.cc (right): https://codereview.chromium.org/139013008/diff/1/ui/gl/gl_gl_api_implementation.cc#newcode48 ui/gl/gl_gl_api_implementation.cc:48: if (gfx::g_version_info->is_es3) { On 2014/01/21 22:37:12, piman wrote: > ...
6 years, 11 months ago (2014-01-22 09:46:53 UTC) #6
piman
On Wed, Jan 22, 2014 at 1:46 AM, <oetuaho@nvidia.com> wrote: > > https://codereview.chromium.org/139013008/diff/1/ui/gl/gl_ > gl_api_implementation.cc ...
6 years, 11 months ago (2014-01-22 21:17:57 UTC) #7
oetuaho-nv
On 2014/01/22 21:17:57, piman wrote: > On Wed, Jan 22, 2014 at 1:46 AM, <mailto:oetuaho@nvidia.com> ...
6 years, 11 months ago (2014-01-23 13:19:58 UTC) #8
piman
On Thu, Jan 23, 2014 at 5:19 AM, <oetuaho@nvidia.com> wrote: > On 2014/01/22 21:17:57, piman ...
6 years, 11 months ago (2014-01-23 21:59:09 UTC) #9
oetuaho-nv
On 2014/01/23 21:59:09, piman wrote: > On Thu, Jan 23, 2014 at 5:19 AM, <mailto:oetuaho@nvidia.com> ...
6 years, 10 months ago (2014-01-28 15:27:09 UTC) #10
oetuaho-nv
Haven't heard back from you for a while, should I proceed with the new implementation ...
6 years, 10 months ago (2014-02-03 17:13:34 UTC) #11
piman
On Tue, Jan 28, 2014 at 7:27 AM, <oetuaho@nvidia.com> wrote: > On 2014/01/23 21:59:09, piman ...
6 years, 10 months ago (2014-02-04 00:52:03 UTC) #12
oetuaho-nv
On 2014/02/04 00:52:03, piman wrote: > > Correct, the goal of Pepper is to be ...
6 years, 10 months ago (2014-02-04 16:11:04 UTC) #13
piman
On Tue, Feb 4, 2014 at 8:11 AM, <oetuaho@nvidia.com> wrote: > On 2014/02/04 00:52:03, piman ...
6 years, 10 months ago (2014-02-04 19:49:06 UTC) #14
Ken Russell (switch to Gerrit)
Sorry I'm so late replying to this CL. Apologies if I'm re-hashing anything. - It ...
6 years, 10 months ago (2014-02-05 01:58:06 UTC) #15
oetuaho-nv
Uploaded a work-in-progress version of the service side of the new approach now. The Blink ...
6 years, 10 months ago (2014-02-05 16:26:19 UTC) #16
oetuaho-nv
The new patch set contains fixes and fills in missing functionality from the previous one. ...
6 years, 10 months ago (2014-02-06 15:52:16 UTC) #17
piman
https://codereview.chromium.org/139013008/diff/280001/gpu/command_buffer/service/feature_info.cc File gpu/command_buffer/service/feature_info.cc (right): https://codereview.chromium.org/139013008/diff/280001/gpu/command_buffer/service/feature_info.cc#newcode497 gpu/command_buffer/service/feature_info.cc:497: GL_RGB32F_ARB == GL_RGB32F && GL_RGB32F_EXT == GL_RGB32F); nit: you ...
6 years, 10 months ago (2014-02-07 00:43:09 UTC) #18
piman
On 2014/02/06 15:52:16, oetuaho-nv wrote: > The new patch set contains fixes and fills in ...
6 years, 10 months ago (2014-02-07 00:43:48 UTC) #19
oetuaho-nv
https://codereview.chromium.org/139013008/diff/280001/gpu/command_buffer/service/feature_info.cc File gpu/command_buffer/service/feature_info.cc (right): https://codereview.chromium.org/139013008/diff/280001/gpu/command_buffer/service/feature_info.cc#newcode497 gpu/command_buffer/service/feature_info.cc:497: GL_RGB32F_ARB == GL_RGB32F && GL_RGB32F_EXT == GL_RGB32F); On 2014/02/07 ...
6 years, 10 months ago (2014-02-07 09:26:58 UTC) #20
oetuaho-nv
The latest patch set fixes the things pointed out in the last review and adds ...
6 years, 10 months ago (2014-02-07 15:04:50 UTC) #21
piman
LGTM, 1 nit. https://codereview.chromium.org/139013008/diff/370001/gpu/command_buffer/service/framebuffer_manager.h File gpu/command_buffer/service/framebuffer_manager.h (right): https://codereview.chromium.org/139013008/diff/370001/gpu/command_buffer/service/framebuffer_manager.h#newcode121 gpu/command_buffer/service/framebuffer_manager.h:121: bool allow_float_rgb_color_attachment) const; nit: Would it ...
6 years, 10 months ago (2014-02-07 19:03:24 UTC) #22
oetuaho-nv
I added passing const FeatureInfo* to IsPossiblyComplete instead of two booleans. Blink change is now ...
6 years, 10 months ago (2014-02-10 15:12:54 UTC) #23
oetuaho-nv
And the issue in FeatureInfo is now fixed. There were some substantial changes to the ...
6 years, 10 months ago (2014-02-10 16:46:08 UTC) #24
piman
LGTM+1 nit https://codereview.chromium.org/139013008/diff/780001/gpu/command_buffer/service/feature_info.cc File gpu/command_buffer/service/feature_info.cc (right): https://codereview.chromium.org/139013008/diff/780001/gpu/command_buffer/service/feature_info.cc#newcode782 gpu/command_buffer/service/feature_info.cc:782: pos + str.length() < extensions_.length() && nit: ...
6 years, 10 months ago (2014-02-10 23:09:02 UTC) #25
Ken Russell (switch to Gerrit)
https://codereview.chromium.org/139013008/diff/780001/gpu/command_buffer/service/feature_info.cc File gpu/command_buffer/service/feature_info.cc (right): https://codereview.chromium.org/139013008/diff/780001/gpu/command_buffer/service/feature_info.cc#newcode523 gpu/command_buffer/service/feature_info.cc:523: GL_FLOAT, NULL); Do you need to also set the ...
6 years, 10 months ago (2014-02-11 00:37:23 UTC) #26
piman
On Mon, Feb 10, 2014 at 4:37 PM, <kbr@chromium.org> wrote: > > https://codereview.chromium.org/139013008/diff/780001/gpu/ > command_buffer/service/feature_info.cc ...
6 years, 10 months ago (2014-02-11 00:46:12 UTC) #27
Ken Russell (switch to Gerrit)
On 2014/02/11 00:46:12, piman wrote: > > If ANGLE supports float through a different path ...
6 years, 10 months ago (2014-02-11 02:19:48 UTC) #28
oetuaho-nv
Half-float rendering should not be affected by the patch in any way. It only concerns ...
6 years, 10 months ago (2014-02-11 12:42:16 UTC) #29
piman
https://codereview.chromium.org/139013008/diff/1070001/gpu/command_buffer/service/framebuffer_manager.cc File gpu/command_buffer/service/framebuffer_manager.cc (right): https://codereview.chromium.org/139013008/diff/1070001/gpu/command_buffer/service/framebuffer_manager.cc#newcode242 gpu/command_buffer/service/framebuffer_manager.cc:242: // by CHROMIUM_color_buffer_float_rgb(a). I don't think this is right. ...
6 years, 10 months ago (2014-02-11 21:28:37 UTC) #30
Ken Russell (switch to Gerrit)
Olli, thank you for pushing this through and very sorry again for how long it ...
6 years, 10 months ago (2014-02-12 00:11:00 UTC) #31
piman
On Tue, Feb 11, 2014 at 4:11 PM, <kbr@chromium.org> wrote: > Olli, thank you for ...
6 years, 10 months ago (2014-02-12 00:13:46 UTC) #32
Ken Russell (switch to Gerrit)
On 2014/02/12 00:13:46, piman wrote: > On Tue, Feb 11, 2014 at 4:11 PM, <mailto:kbr@chromium.org> ...
6 years, 10 months ago (2014-02-12 01:48:21 UTC) #33
piman
On Tue, Feb 11, 2014 at 5:48 PM, <kbr@chromium.org> wrote: > On 2014/02/12 00:13:46, piman ...
6 years, 10 months ago (2014-02-12 02:53:20 UTC) #34
oetuaho-nv
On 2014/02/12 02:53:20, piman wrote: > On Tue, Feb 11, 2014 at 5:48 PM, <mailto:kbr@chromium.org> ...
6 years, 10 months ago (2014-02-12 10:51:16 UTC) #35
oetuaho-nv
https://codereview.chromium.org/139013008/diff/1070001/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h File gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h (right): https://codereview.chromium.org/139013008/diff/1070001/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h#newcode248 gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h:248: GLenum target, GLint level, GLenum call_internal_format, On 2014/02/12 00:11:01, ...
6 years, 10 months ago (2014-02-12 10:51:43 UTC) #36
piman
https://codereview.chromium.org/139013008/diff/1350001/ui/gl/gl_gl_api_implementation.cc File ui/gl/gl_gl_api_implementation.cc (right): https://codereview.chromium.org/139013008/diff/1350001/ui/gl/gl_gl_api_implementation.cc#newcode51 ui/gl/gl_gl_api_implementation.cc:51: // ANGLE exposing GLES2 API doesn't support those. nit: ...
6 years, 10 months ago (2014-02-12 21:04:07 UTC) #37
oetuaho-nv
Added a link to the ANGLE bug. There was also still a fairly significant bug ...
6 years, 10 months ago (2014-02-13 14:03:57 UTC) #38
piman
lgtm
6 years, 10 months ago (2014-02-14 05:22:43 UTC) #39
oetuaho-nv
The CQ bit was checked by oetuaho@nvidia.com
6 years, 10 months ago (2014-02-14 08:21:32 UTC) #40
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/oetuaho@nvidia.com/139013008/1690001
6 years, 10 months ago (2014-02-14 08:22:17 UTC) #41
commit-bot: I haz the power
Change committed as 251329
6 years, 10 months ago (2014-02-14 15:20:59 UTC) #42
Ken Russell (switch to Gerrit)
6 years, 10 months ago (2014-02-15 01:37:42 UTC) #43
Message was sent while issue was closed.
Sorry for the delay again, but LGTM too, for what it's worth.

Thank you for making this contribution, and in particular for being so careful
with it.

Powered by Google App Engine
This is Rietveld 408576698