|
Take GL version and extensions correctly into account when binding functions
Platform libraries may return non-null function pointers from dlsym or
getProcAddress for unsupported GL functions. Previously the function
binding logic tried to address this with a separate extension function
binding step, but since some of the bindings were still done without
consulting the extension string, this failed to account for some
conflicts between core and extension functions such as
glDiscardFramebufferEXT vs. glInvalidateFramebuffer.
Fix this by binding all functions that have multiple versions only after
the context has been made current, and consulting the extension and
version strings. The logic for binding each function is now only in one
place in the generated code and easy to follow.
The patch still does not guarantee that the function pointers would be
set to null if the function is unsupported. It only attempts to guarantee
that an incorrect version of a function is not bound in case another
version is supported. The patch is conservative like this to avoid
requiring the exact specification of binding conditions in case a function
only has one name, and to make it less likely to expose bugs elsewhere.
GetGLCoreProcAddress and GetGLProcAddress are combined into one function,
which always first looks for the function pointer with dlsym and then
with GetProcAddress. The new conditions for binding make sure that this
does not result in errors.
The patched bindings do not query for incorrect OES or ARB extension
strings without the GL_ prefix. Including the incorrect extension strings
without the prefix is assumed to have been a mistake. This applies to
OES_get_program_binary, OES_vertex_array_object, ARB_get_program_binary,
ARB_vertex_array_object, and APPLE_vertex_array_object.
BUG= 322489
TEST=gpu_unittests, cc_unittests, WebGL conformance tests
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=245623
Total comments: 17
Total comments: 6
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+856 lines, -469 lines) |
Patch |
 |
|
cc/test/layer_tree_pixel_test.cc
|
View
|
1
2
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
|
cc/test/pixel_test.cc
|
View
|
1
2
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
|
content/browser/compositor/software_browser_compositor_output_surface_unittest.cc
|
View
|
1
2
3
4
5
6
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
|
content/browser/compositor/software_output_device_ozone_unittest.cc
|
View
|
1
2
3
4
5
6
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
|
content/common/gpu/gpu_channel_manager.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
|
content/common/gpu/media/rendering_helper.cc
|
View
|
|
6 chunks |
+9 lines, -41 lines |
0 comments
|
Download
|
 |
|
gpu/command_buffer/common/unittest_main.cc
|
View
|
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
 |
|
gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc
|
View
|
1
2
3
4
5
|
79 chunks |
+89 lines, -11 lines |
0 comments
|
Download
|
 |
|
gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h
|
View
|
|
4 chunks |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
|
gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc
|
View
|
1
2
3
4
5
|
6 chunks |
+12 lines, -1 line |
0 comments
|
Download
|
 |
M |
gpu/config/gpu_info_collector_unittest.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
gpu/tools/compositor_model_bench/compositor_model_bench.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
media/tools/player_x11/gl_video_renderer.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
ui/compositor/test/test_suite.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
ui/gl/generate_bindings.py
|
View
|
1
2
3
4
|
32 chunks |
+341 lines, -204 lines |
0 comments
|
Download
|
 |
M |
ui/gl/gl.gyp
|
View
|
|
2 chunks |
+4 lines, -0 lines |
0 comments
|
Download
|
 |
|
ui/gl/gl_bindings.h
|
View
|
1
2
|
5 chunks |
+11 lines, -17 lines |
0 comments
|
Download
|
 |
|
ui/gl/gl_context.h
|
View
|
|
4 chunks |
+13 lines, -4 lines |
0 comments
|
Download
|
 |
|
ui/gl/gl_context.cc
|
View
|
|
4 chunks |
+20 lines, -3 lines |
0 comments
|
Download
|
 |
|
ui/gl/gl_context_cgl.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
|
ui/gl/gl_context_egl.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
|
ui/gl/gl_context_glx.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
|
ui/gl/gl_context_nsview.mm
|
View
|
|
1 chunk |
+4 lines, -0 lines |
0 comments
|
Download
|
 |
|
ui/gl/gl_context_osmesa.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
|
ui/gl/gl_context_stub_with_extensions.h
|
View
|
1
|
1 chunk |
+37 lines, -0 lines |
0 comments
|
Download
|
 |
|
ui/gl/gl_context_stub_with_extensions.cc
|
View
|
|
1 chunk |
+30 lines, -0 lines |
0 comments
|
Download
|
 |
|
ui/gl/gl_context_wgl.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
|
ui/gl/gl_egl_api_implementation.h
|
View
|
1
2
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
|
ui/gl/gl_egl_api_implementation.cc
|
View
|
|
2 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
|
ui/gl/gl_gl_api_implementation.h
|
View
|
1
2
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
|
ui/gl/gl_gl_api_implementation.cc
|
View
|
1
2
3
4
5
|
3 chunks |
+6 lines, -10 lines |
0 comments
|
Download
|
 |
|
ui/gl/gl_glx_api_implementation.h
|
View
|
1
2
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
|
ui/gl/gl_glx_api_implementation.cc
|
View
|
|
2 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
|
ui/gl/gl_implementation.h
|
View
|
1
2
|
2 chunks |
+11 lines, -9 lines |
0 comments
|
Download
|
 |
|
ui/gl/gl_implementation.cc
|
View
|
1
2
|
4 chunks |
+2 lines, -31 lines |
0 comments
|
Download
|
 |
|
ui/gl/gl_implementation_android.cc
|
View
|
1
2
3
4
5
|
4 chunks |
+17 lines, -10 lines |
0 comments
|
Download
|
 |
|
ui/gl/gl_implementation_linux.h
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
|
ui/gl/gl_implementation_linux.cc
|
View
|
|
2 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
|
ui/gl/gl_implementation_mac.cc
|
View
|
|
5 chunks |
+17 lines, -10 lines |
0 comments
|
Download
|
 |
M |
ui/gl/gl_implementation_ozone.cc
|
View
|
|
6 chunks |
+19 lines, -12 lines |
0 comments
|
Download
|
 |
M |
ui/gl/gl_implementation_win.cc
|
View
|
1
2
3
4
|
7 chunks |
+63 lines, -18 lines |
0 comments
|
Download
|
 |
M |
ui/gl/gl_implementation_x11.cc
|
View
|
|
7 chunks |
+22 lines, -15 lines |
0 comments
|
Download
|
 |
M |
ui/gl/gl_osmesa_api_implementation.h
|
View
|
1
2
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
|
ui/gl/gl_osmesa_api_implementation.cc
|
View
|
|
2 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
M |
ui/gl/gl_surface.cc
|
View
|
1
2
3
4
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
ui/gl/gl_surface_wgl.cc
|
View
|
1
2
3
4
5
|
1 chunk |
+0 lines, -19 lines |
0 comments
|
Download
|
 |
M |
ui/gl/gl_surface_win.cc
|
View
|
1
2
3
4
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
A |
ui/gl/gl_version_info.h
|
View
|
|
1 chunk |
+34 lines, -0 lines |
0 comments
|
Download
|
 |
A |
ui/gl/gl_version_info.cc
|
View
|
|
1 chunk |
+38 lines, -0 lines |
0 comments
|
Download
|
 |
M |
ui/gl/gl_wgl_api_implementation.h
|
View
|
1
2
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
ui/gl/gl_wgl_api_implementation.cc
|
View
|
|
2 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
Total messages: 25 (0 generated)
|