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

Issue 871763002: Make GL bindings conditional (Closed)

Created:
5 years, 11 months ago by no sievers
Modified:
5 years, 10 months ago
CC:
chromium-reviews, piman+watch_chromium.org, ozone-reviews_chromium.org, kalyank
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make GL bindings conditional In addition to the extensions also parse GL/GLES version information from the headers (hence add a few fresh headers). Instead of brute-forcing binding in somewhat unclear order make all dynamic bindings very specifically conditional to the GL version or extension, given the precise name. If a function is not available, then leave function pointer set to NULL so it will generate a crash (report). (Previously it might have ended up as 0 or with whatever valid or not valid pointer GetProcAddr() returned - i.e. GetProcAddr returning something does not imply the functionality is there.) The version also includes whether it is GLES or not which means we won't look up functions on GLES anymore that are specific to desktop or vice versa. Update gpu_unittests so that they are very specific to what extensions they need (otherwise they might end up calling the _NotBound fallback). Also make WGL/GLX/EGL/MESA bindings all happen rightaway since they don't depend on a context. BUG=438742, 325668 Committed: https://crrev.com/e3b17fd533b81a9855a28d04894021479cd6d89d Cr-Commit-Position: refs/heads/master@{#313663}

Patch Set 1 #

Patch Set 2 : rebase #

Total comments: 5

Patch Set 3 : #

Total comments: 6

Patch Set 4 : address comments, try fix broken builds #

Total comments: 17

Patch Set 5 : address kbr's comments #

Patch Set 6 : rebase #

Patch Set 7 : windows #

Patch Set 8 : windows, try again #

Total comments: 1

Patch Set 9 : comment, and windows again #

Patch Set 10 : fix EGL and GLES2 #

Patch Set 11 : fix win egl + angle #

Patch Set 12 : rebase, just in case #

Unified diffs Side-by-side diffs Delta from patch set Stats (+15755 lines, -1467 lines) Patch
M gpu/command_buffer/service/feature_info_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download
M gpu/command_buffer/service/framebuffer_manager_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +4 lines, -2 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 10 chunks +0 lines, -10 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder_unittest_async_pixel.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +0 lines, -2 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder_unittest_attribs.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +0 lines, -1 line 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc View 1 2 3 4 5 6 7 8 9 10 11 7 chunks +35 lines, -14 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder_unittest_context_state.cc View 1 2 3 4 5 6 7 8 9 10 11 10 chunks +0 lines, -10 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder_unittest_drawing.cc View 1 2 3 4 5 6 7 8 9 10 11 9 chunks +0 lines, -9 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder_unittest_framebuffers.cc View 1 2 3 4 5 6 7 8 9 10 11 14 chunks +0 lines, -14 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder_unittest_programs.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +0 lines, -1 line 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder_unittest_textures.cc View 1 2 3 4 5 6 7 8 9 10 11 22 chunks +0 lines, -22 lines 0 comments Download
M gpu/command_buffer/service/gpu_service_test.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download
M gpu/command_buffer/service/gpu_tracer_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +11 lines, -1 line 0 comments Download
M gpu/command_buffer/service/memory_program_cache_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download
M gpu/command_buffer/service/query_manager_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download
M gpu/command_buffer/service/vertex_array_manager_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download
M third_party/khronos/README.chromium View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +4 lines, -2 lines 0 comments Download
A third_party/khronos/noninclude/GL/glext.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +11790 lines, -0 lines 0 comments Download
A third_party/khronos/noninclude/GL/glxext.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1001 lines, -0 lines 0 comments Download
A third_party/khronos/noninclude/GL/wglext.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +840 lines, -0 lines 0 comments Download
M ui/gl/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download
M ui/gl/generate_bindings.py View 1 2 3 4 5 6 7 8 9 10 11 52 chunks +380 lines, -316 lines 0 comments Download
M ui/gl/gl.gyp View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download
M ui/gl/gl_bindings.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +14 lines, -4 lines 0 comments Download
A ui/gl/gl_bindings.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +68 lines, -0 lines 0 comments Download
M ui/gl/gl_bindings_autogen_egl.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -0 lines 0 comments Download
M ui/gl/gl_bindings_autogen_egl.cc View 1 2 3 4 5 6 7 8 9 10 11 6 chunks +97 lines, -32 lines 0 comments Download
M ui/gl/gl_bindings_autogen_gl.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +2 lines, -10 lines 0 comments Download
M ui/gl/gl_bindings_autogen_gl.cc View 1 2 3 4 5 6 7 8 9 10 11 15 chunks +1307 lines, -857 lines 0 comments Download
M ui/gl/gl_bindings_autogen_glx.cc View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +84 lines, -29 lines 0 comments Download
M ui/gl/gl_bindings_autogen_mock.h View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +2 lines, -3 lines 0 comments Download
M ui/gl/gl_bindings_autogen_mock.cc View 1 2 3 4 5 6 7 8 9 10 11 6 chunks +10 lines, -16 lines 0 comments Download
M ui/gl/gl_bindings_autogen_osmesa.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -7 lines 0 comments Download
M ui/gl/gl_bindings_autogen_wgl.cc View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +59 lines, -21 lines 0 comments Download
M ui/gl/gl_egl_api_implementation.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +0 lines, -1 line 0 comments Download
M ui/gl/gl_egl_api_implementation.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -5 lines 0 comments Download
M ui/gl/gl_gl_api_implementation.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download
M ui/gl/gl_glx_api_implementation.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +0 lines, -1 line 0 comments Download
M ui/gl/gl_glx_api_implementation.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +0 lines, -4 lines 0 comments Download
M ui/gl/gl_implementation_android.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +0 lines, -5 lines 0 comments Download
M ui/gl/gl_implementation_mac.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +0 lines, -3 lines 0 comments Download
M ui/gl/gl_implementation_ozone.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +0 lines, -4 lines 0 comments Download
M ui/gl/gl_implementation_win.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +0 lines, -7 lines 0 comments Download
M ui/gl/gl_implementation_x11.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -8 lines 0 comments Download
M ui/gl/gl_osmesa_api_implementation.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +0 lines, -1 line 0 comments Download
M ui/gl/gl_osmesa_api_implementation.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +0 lines, -4 lines 0 comments Download
M ui/gl/gl_surface_egl.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download
M ui/gl/gl_version_info.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +12 lines, -10 lines 0 comments Download
M ui/gl/gl_version_info.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +20 lines, -20 lines 0 comments Download
M ui/gl/gl_wgl_api_implementation.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +0 lines, -1 line 0 comments Download
M ui/gl/gl_wgl_api_implementation.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +0 lines, -4 lines 0 comments Download

Messages

Total messages: 22 (3 generated)
no sievers
ptal
5 years, 11 months ago (2015-01-23 01:08:02 UTC) #3
piman
https://codereview.chromium.org/871763002/diff/30001/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc File gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc (right): https://codereview.chromium.org/871763002/diff/30001/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc#newcode432 gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc:432: if (version->IsAtLeastGL(3, 3) || version->IsAtLeastGLES(3, 3)) { IsAtLeastGLES(3, 0) ...
5 years, 11 months ago (2015-01-23 01:38:16 UTC) #4
no sievers
https://codereview.chromium.org/871763002/diff/30001/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc File gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc (right): https://codereview.chromium.org/871763002/diff/30001/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc#newcode438 gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc:438: if (version->IsAtLeastGL(4, 4) || version->IsAtLeastGLES(3, 3)) { On 2015/01/23 ...
5 years, 11 months ago (2015-01-23 01:41:01 UTC) #5
no sievers
On 2015/01/23 01:38:16, piman (Very slow to review) wrote: > https://codereview.chromium.org/871763002/diff/30001/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc > File gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc (right): ...
5 years, 11 months ago (2015-01-23 01:42:47 UTC) #6
Zhenyao Mo
This is really awesome. Mostly looks good to me with a few questions. https://codereview.chromium.org/871763002/diff/20001/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc File ...
5 years, 11 months ago (2015-01-23 01:48:20 UTC) #7
no sievers
updated https://codereview.chromium.org/871763002/diff/20001/ui/gl/gl_bindings_autogen_gl.cc File ui/gl/gl_bindings_autogen_gl.cc (right): https://codereview.chromium.org/871763002/diff/20001/ui/gl/gl_bindings_autogen_gl.cc#newcode750 ui/gl/gl_bindings_autogen_gl.cc:750: glBeginTransformFeedbackNotBound); On 2015/01/23 01:48:20, Zhenyao Mo wrote: > ...
5 years, 11 months ago (2015-01-24 01:50:46 UTC) #8
no sievers
https://codereview.chromium.org/871763002/diff/20001/ui/gl/gl_bindings_autogen_gl.cc File ui/gl/gl_bindings_autogen_gl.cc (right): https://codereview.chromium.org/871763002/diff/20001/ui/gl/gl_bindings_autogen_gl.cc#newcode750 ui/gl/gl_bindings_autogen_gl.cc:750: glBeginTransformFeedbackNotBound); On 2015/01/24 01:50:46, sievers wrote: > On 2015/01/23 ...
5 years, 11 months ago (2015-01-24 01:52:38 UTC) #9
Ken Russell (switch to Gerrit)
First, this is really awesome. It makes the bindings much more correct and their behavior ...
5 years, 11 months ago (2015-01-24 05:08:05 UTC) #10
no sievers
Addressed kbr's comments. Unbound functions are also set to null now. https://codereview.chromium.org/871763002/diff/40001/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc File gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc (right): ...
5 years, 11 months ago (2015-01-26 21:13:03 UTC) #11
Zhenyao Mo
LGTM This is really great refractoring!
5 years, 11 months ago (2015-01-26 21:24:06 UTC) #12
Ken Russell (switch to Gerrit)
Excellent. Thanks for the update. LGTM again. One minor comment. https://codereview.chromium.org/871763002/diff/80001/third_party/khronos/README.chromium File third_party/khronos/README.chromium (right): https://codereview.chromium.org/871763002/diff/80001/third_party/khronos/README.chromium#newcode25 ...
5 years, 11 months ago (2015-01-26 23:10:16 UTC) #13
no sievers
On 2015/01/26 23:10:16, Ken Russell wrote: > Excellent. Thanks for the update. LGTM again. One ...
5 years, 11 months ago (2015-01-26 23:29:28 UTC) #14
piman
LGTM. I support binding NULL, to avoid unnecessary bloat, and get crashes.
5 years, 11 months ago (2015-01-27 21:38:02 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/871763002/120001
5 years, 10 months ago (2015-01-29 02:37:02 UTC) #17
commit-bot: I haz the power
Committed patchset #12 (id:120001)
5 years, 10 months ago (2015-01-29 04:01:27 UTC) #18
commit-bot: I haz the power
Patchset 12 (id:??) landed as https://crrev.com/e3b17fd533b81a9855a28d04894021479cd6d89d Cr-Commit-Position: refs/heads/master@{#313663}
5 years, 10 months ago (2015-01-29 04:02:26 UTC) #19
Daniel Kurtz
On 2015/01/29 04:02:26, I haz the power (commit-bot) wrote: > Patchset 12 (id:??) landed as ...
5 years, 10 months ago (2015-02-03 16:07:52 UTC) #20
Daniel Kurtz
On 2015/02/03 16:07:52, Daniel Kurtz wrote: > On 2015/01/29 04:02:26, I haz the power (commit-bot) ...
5 years, 10 months ago (2015-02-03 16:10:14 UTC) #21
Daniel Kurtz
5 years, 10 months ago (2015-02-03 16:13:38 UTC) #22
Message was sent while issue was closed.
A revert of this CL (patchset #12 id:120001) has been created in
https://codereview.chromium.org/893213002/ by djkurtz@chromium.org.

The reason for reverting is: Suspected of breaking WebGL on ARM (Mali) Chrome
OS.

BUG=454816.

Powered by Google App Engine
This is Rietveld 408576698