diff options
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/state_trackers/wgl/SConscript | 3 | ||||
-rw-r--r-- | src/gallium/state_trackers/wgl/stw_device.c | 3 | ||||
-rw-r--r-- | src/gallium/targets/egl-static/SConscript | 16 | ||||
-rw-r--r-- | src/gallium/targets/libgl-gdi/SConscript | 6 | ||||
-rw-r--r-- | src/gallium/targets/libgl-xlib/SConscript | 6 |
5 files changed, 30 insertions, 4 deletions
diff --git a/src/gallium/state_trackers/wgl/SConscript b/src/gallium/state_trackers/wgl/SConscript index 1b7597de440..7cb953ba742 100644 --- a/src/gallium/state_trackers/wgl/SConscript +++ b/src/gallium/state_trackers/wgl/SConscript @@ -15,6 +15,9 @@ env.AppendUnique(CPPDEFINES = [ 'BUILD_GL32', # declare gl* as __declspec(dllexport) in Mesa headers 'WIN32_LEAN_AND_MEAN', # http://msdn2.microsoft.com/en-us/library/6dwk3a1z.aspx ]) +if not env['gles']: + # prevent _glapi_* from being declared __declspec(dllimport) + env.Append(CPPDEFINES = ['_GLAPI_NO_EXPORTS']) sources = [ 'stw_context.c', diff --git a/src/gallium/state_trackers/wgl/stw_device.c b/src/gallium/state_trackers/wgl/stw_device.c index c4822d4d8aa..4ece4e4979a 100644 --- a/src/gallium/state_trackers/wgl/stw_device.c +++ b/src/gallium/state_trackers/wgl/stw_device.c @@ -170,7 +170,10 @@ stw_cleanup(void) _glthread_DESTROY_MUTEX(OneTimeLock); + /* glapi is statically linked: we can call the local destroy function. */ +#ifdef _GLAPI_NO_EXPORTS _glapi_destroy_multithread(); +#endif #ifdef DEBUG debug_memory_end(stw_dev->memdbg_no); diff --git a/src/gallium/targets/egl-static/SConscript b/src/gallium/targets/egl-static/SConscript index 381ef4e862d..c978934a0c8 100644 --- a/src/gallium/targets/egl-static/SConscript +++ b/src/gallium/targets/egl-static/SConscript @@ -58,10 +58,18 @@ if env['platform'] == 'windows': env.Prepend(LIBS = [ ws_gdi, ]) -else: - # OpenGL - env.Append(CPPDEFINES = ['FEATURE_GL=1']) - env.Prepend(LIBS = ['GL', 'talloc', glsl, mesa]) + +# OpenGL ES and OpenGL +if env['gles']: + env.Append(CPPDEFINES = [ + 'FEATURE_GL=1', + 'FEATURE_ES1=1', + 'FEATURE_ES2=1' + ]) + env.Prepend(LIBPATH = [shared_glapi.dir]) + # manually add LIBPREFIX on windows + glapi_name = 'glapi' if env['platform'] != 'windows' else 'libglapi' + env.Prepend(LIBS = [glapi_name, talloc, glsl, mesa]) # OpenVG if True: diff --git a/src/gallium/targets/libgl-gdi/SConscript b/src/gallium/targets/libgl-gdi/SConscript index 6fa0851a1ab..c088d4c2ae6 100644 --- a/src/gallium/targets/libgl-gdi/SConscript +++ b/src/gallium/targets/libgl-gdi/SConscript @@ -37,6 +37,12 @@ drivers += [trace, rbug] env['no_import_lib'] = 1 +# when GLES is enabled, gl* and _glapi_* belong to bridge_glapi and +# shared_glapi respectively +if env['gles']: + env.Prepend(LIBPATH = [shared_glapi.dir]) + glapi = [bridge_glapi, 'libglapi'] + opengl32 = env.SharedLibrary( target ='opengl32', source = sources, diff --git a/src/gallium/targets/libgl-xlib/SConscript b/src/gallium/targets/libgl-xlib/SConscript index d932736be78..9bb0a56525e 100644 --- a/src/gallium/targets/libgl-xlib/SConscript +++ b/src/gallium/targets/libgl-xlib/SConscript @@ -16,6 +16,12 @@ env.Append(CPPDEFINES = ['USE_XSHM']) env.Prepend(LIBS = env['X11_LIBS']) +# when GLES is enabled, gl* and _glapi_* belong to bridge_glapi and +# shared_glapi respectively +if env['gles']: + env.Prepend(LIBPATH = [shared_glapi.dir]) + glapi = [bridge_glapi, 'glapi'] + env.Prepend(LIBS = [ st_xlib, ws_xlib, |