|
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.
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
Total comments: 11
Total comments: 15
Total comments: 27
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+877 lines, -481 lines) |
Patch |
 |
M |
cc/test/layer_tree_pixel_test.cc
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
cc/test/pixel_test.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
content/browser/aura/software_browser_compositor_output_surface_unittest.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
content/browser/aura/software_output_device_ozone_unittest.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
content/common/gpu/gpu_channel_manager.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
content/common/gpu/media/rendering_helper.cc
|
View
|
1
2
3
4
5
6
|
6 chunks |
+9 lines, -41 lines |
0 comments
|
Download
|
 |
M |
gpu/command_buffer/common/unittest_main.cc
|
View
|
1
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc
|
View
|
1
2
3
4
5
6
|
74 chunks |
+84 lines, -11 lines |
0 comments
|
Download
|
 |
M |
gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h
|
View
|
1
2
3
4
5
6
|
4 chunks |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc
|
View
|
1
2
3
4
5
6
|
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
5
6
7
|
32 chunks |
+343 lines, -201 lines |
0 comments
|
Download
|
 |
M |
ui/gl/gl.gyp
|
View
|
1
2
3
4
5
6
|
2 chunks |
+4 lines, -0 lines |
0 comments
|
Download
|
 |
M |
ui/gl/gl_bindings.h
|
View
|
1
2
3
4
5
6
|
5 chunks |
+11 lines, -17 lines |
0 comments
|
Download
|
 |
M |
ui/gl/gl_context.h
|
View
|
1
2
|
4 chunks |
+13 lines, -4 lines |
0 comments
|
Download
|
 |
M |
ui/gl/gl_context.cc
|
View
|
1
2
|
4 chunks |
+20 lines, -3 lines |
0 comments
|
Download
|
 |
M |
ui/gl/gl_context_cgl.cc
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
ui/gl/gl_context_egl.cc
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
ui/gl/gl_context_glx.cc
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
ui/gl/gl_context_nsview.mm
|
View
|
1
2
3
4
5
6
|
1 chunk |
+4 lines, -0 lines |
0 comments
|
Download
|
 |
M |
ui/gl/gl_context_osmesa.cc
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
A |
ui/gl/gl_context_stub_with_extensions.h
|
View
|
1
2
3
4
5
6
|
1 chunk |
+37 lines, -0 lines |
0 comments
|
Download
|
 |
A |
ui/gl/gl_context_stub_with_extensions.cc
|
View
|
1
2
3
4
5
6
|
1 chunk |
+30 lines, -0 lines |
0 comments
|
Download
|
 |
M |
ui/gl/gl_context_wgl.cc
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
ui/gl/gl_egl_api_implementation.h
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
ui/gl/gl_egl_api_implementation.cc
|
View
|
|
2 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
M |
ui/gl/gl_gl_api_implementation.h
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
ui/gl/gl_gl_api_implementation.cc
|
View
|
1
2
3
4
5
6
|
3 chunks |
+6 lines, -10 lines |
0 comments
|
Download
|
 |
M |
ui/gl/gl_glx_api_implementation.h
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
ui/gl/gl_glx_api_implementation.cc
|
View
|
|
2 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
M |
ui/gl/gl_implementation.h
|
View
|
1
2
3
4
5
6
|
2 chunks |
+11 lines, -9 lines |
0 comments
|
Download
|
 |
M |
ui/gl/gl_implementation.cc
|
View
|
|
4 chunks |
+2 lines, -31 lines |
0 comments
|
Download
|
 |
M |
ui/gl/gl_implementation_android.cc
|
View
|
1
2
3
4
5
6
|
4 chunks |
+17 lines, -10 lines |
0 comments
|
Download
|
 |
M |
ui/gl/gl_implementation_linux.h
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
ui/gl/gl_implementation_linux.cc
|
View
|
|
2 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
ui/gl/gl_implementation_mac.cc
|
View
|
1
2
3
4
5
6
|
5 chunks |
+17 lines, -10 lines |
0 comments
|
Download
|
 |
M |
ui/gl/gl_implementation_ozone.cc
|
View
|
1
2
3
4
5
6
|
6 chunks |
+19 lines, -12 lines |
0 comments
|
Download
|
 |
M |
ui/gl/gl_implementation_win.cc
|
View
|
1
2
3
4
5
6
7
|
7 chunks |
+51 lines, -18 lines |
0 comments
|
Download
|
 |
M |
ui/gl/gl_implementation_x11.cc
|
View
|
1
2
3
4
5
6
|
7 chunks |
+22 lines, -15 lines |
0 comments
|
Download
|
 |
M |
ui/gl/gl_osmesa_api_implementation.h
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
ui/gl/gl_osmesa_api_implementation.cc
|
View
|
|
2 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
M |
ui/gl/gl_surface.h
|
View
|
1
2
3
4
5
6
7
|
2 chunks |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
M |
ui/gl/gl_surface.cc
|
View
|
1
2
3
4
5
6
7
|
2 chunks |
+5 lines, -3 lines |
0 comments
|
Download
|
 |
M |
ui/gl/gl_surface_egl.cc
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+5 lines, -0 lines |
0 comments
|
Download
|
 |
M |
ui/gl/gl_surface_mac.cc
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+4 lines, -0 lines |
0 comments
|
Download
|
 |
M |
ui/gl/gl_surface_wgl.cc
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+0 lines, -19 lines |
0 comments
|
Download
|
 |
M |
ui/gl/gl_surface_win.cc
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+19 lines, -15 lines |
0 comments
|
Download
|
 |
M |
ui/gl/gl_surface_x11.cc
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+4 lines, -0 lines |
0 comments
|
Download
|
 |
A |
ui/gl/gl_version_info.h
|
View
|
1
2
3
4
5
6
|
1 chunk |
+34 lines, -0 lines |
0 comments
|
Download
|
 |
A |
ui/gl/gl_version_info.cc
|
View
|
1
2
3
4
5
6
|
1 chunk |
+38 lines, -0 lines |
0 comments
|
Download
|
 |
M |
ui/gl/gl_wgl_api_implementation.h
|
View
|
|
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: 30 (0 generated)
|