From 61ef697afc0ad509dcabdecfc424f27b5966969c Mon Sep 17 00:00:00 2001 From: Alexander von Gluck IV Date: Tue, 31 Dec 2013 15:39:49 -0600 Subject: [PATCH] haiku libGL: Move from gallium target to src/hgl * The Haiku renderers need to link to libGL to function properly in all usage contexts. As mesa drivers build before gallium targets, we couldn't properly link the mesa swrast driver to the gallium libGL target for Haiku. * This is likely better as it mimics how glx is laid out ensuring the Haiku libGL is better understood. * All renderers properly link in libGL now. Acked-by: Brian Paul --- src/SConscript | 5 +++++ src/gallium/SConscript | 1 - src/gallium/targets/haiku-softpipe/SConscript | 2 ++ src/{gallium/targets/libgl-haiku => hgl}/GLDispatcher.cpp | 0 src/{gallium/targets/libgl-haiku => hgl}/GLDispatcher.h | 0 src/{gallium/targets/libgl-haiku => hgl}/GLRenderer.cpp | 0 .../targets/libgl-haiku => hgl}/GLRendererRoster.cpp | 0 src/{gallium/targets/libgl-haiku => hgl}/GLRendererRoster.h | 0 src/{gallium/targets/libgl-haiku => hgl}/GLView.cpp | 0 src/{gallium/targets/libgl-haiku => hgl}/SConscript | 1 + src/mesa/drivers/haiku/swrast/SConscript | 2 ++ 11 files changed, 10 insertions(+), 1 deletion(-) rename src/{gallium/targets/libgl-haiku => hgl}/GLDispatcher.cpp (100%) rename src/{gallium/targets/libgl-haiku => hgl}/GLDispatcher.h (100%) rename src/{gallium/targets/libgl-haiku => hgl}/GLRenderer.cpp (100%) rename src/{gallium/targets/libgl-haiku => hgl}/GLRendererRoster.cpp (100%) rename src/{gallium/targets/libgl-haiku => hgl}/GLRendererRoster.h (100%) rename src/{gallium/targets/libgl-haiku => hgl}/GLView.cpp (100%) rename src/{gallium/targets/libgl-haiku => hgl}/SConscript (97%) diff --git a/src/SConscript b/src/SConscript index 146591866c1..a24aceaea1b 100644 --- a/src/SConscript +++ b/src/SConscript @@ -18,6 +18,11 @@ if env['hostonly']: # enable OpenGL ES support. SConscript('mapi/glapi/gen/SConscript') SConscript('mapi/glapi/SConscript') + +# Haiku C++ libGL dispatch (renderers depend on libgl) +if env['platform'] in ['haiku']: + SConscript('hgl/SConscript') + SConscript('mesa/SConscript') SConscript('mapi/vgapi/SConscript') diff --git a/src/gallium/SConscript b/src/gallium/SConscript index 6e27be2c062..32bbdbe5686 100644 --- a/src/gallium/SConscript +++ b/src/gallium/SConscript @@ -119,7 +119,6 @@ if not env['embedded']: if env['platform'] == 'haiku': SConscript([ 'targets/haiku-softpipe/SConscript', - 'targets/libgl-haiku/SConscript', ]) if env['dri']: diff --git a/src/gallium/targets/haiku-softpipe/SConscript b/src/gallium/targets/haiku-softpipe/SConscript index 16ce7cd9e13..0381d0550eb 100644 --- a/src/gallium/targets/haiku-softpipe/SConscript +++ b/src/gallium/targets/haiku-softpipe/SConscript @@ -17,6 +17,8 @@ if True: ]) env.Prepend(LIBS = [softpipe]) +env.Prepend(LIBS = [libgl]) + env.Append(CPPPATH = [ '#/src/mapi', '#/src/mesa', diff --git a/src/gallium/targets/libgl-haiku/GLDispatcher.cpp b/src/hgl/GLDispatcher.cpp similarity index 100% rename from src/gallium/targets/libgl-haiku/GLDispatcher.cpp rename to src/hgl/GLDispatcher.cpp diff --git a/src/gallium/targets/libgl-haiku/GLDispatcher.h b/src/hgl/GLDispatcher.h similarity index 100% rename from src/gallium/targets/libgl-haiku/GLDispatcher.h rename to src/hgl/GLDispatcher.h diff --git a/src/gallium/targets/libgl-haiku/GLRenderer.cpp b/src/hgl/GLRenderer.cpp similarity index 100% rename from src/gallium/targets/libgl-haiku/GLRenderer.cpp rename to src/hgl/GLRenderer.cpp diff --git a/src/gallium/targets/libgl-haiku/GLRendererRoster.cpp b/src/hgl/GLRendererRoster.cpp similarity index 100% rename from src/gallium/targets/libgl-haiku/GLRendererRoster.cpp rename to src/hgl/GLRendererRoster.cpp diff --git a/src/gallium/targets/libgl-haiku/GLRendererRoster.h b/src/hgl/GLRendererRoster.h similarity index 100% rename from src/gallium/targets/libgl-haiku/GLRendererRoster.h rename to src/hgl/GLRendererRoster.h diff --git a/src/gallium/targets/libgl-haiku/GLView.cpp b/src/hgl/GLView.cpp similarity index 100% rename from src/gallium/targets/libgl-haiku/GLView.cpp rename to src/hgl/GLView.cpp diff --git a/src/gallium/targets/libgl-haiku/SConscript b/src/hgl/SConscript similarity index 97% rename from src/gallium/targets/libgl-haiku/SConscript rename to src/hgl/SConscript index 43d15c50e32..70db1494df8 100644 --- a/src/gallium/targets/libgl-haiku/SConscript +++ b/src/hgl/SConscript @@ -33,3 +33,4 @@ libgl = env.SharedLibrary( ) env.Alias('libgl-haiku', libgl) +Export('libgl') diff --git a/src/mesa/drivers/haiku/swrast/SConscript b/src/mesa/drivers/haiku/swrast/SConscript index ca0423e4ad8..aef730098c1 100644 --- a/src/mesa/drivers/haiku/swrast/SConscript +++ b/src/mesa/drivers/haiku/swrast/SConscript @@ -16,6 +16,8 @@ env.Prepend(LIBS = [ mesa, ]) +env.Prepend(LIBS = [libgl]) + sources = [ 'SoftwareRast.cpp' ] -- 2.30.2