From 7f36b2980bcd91e45a3f7ec91b6dcc2067ccc8b1 Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Tue, 17 Aug 2010 19:24:18 +0800 Subject: targets/egl: Link with DRI_LIB_DEPS. Use DRI_LIB_DEPS when linking GL/GLES state trackers. This fixes missing talloc symbol errors, and is hopefully more future proof. --- src/gallium/targets/egl/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/gallium/targets/egl/Makefile') diff --git a/src/gallium/targets/egl/Makefile b/src/gallium/targets/egl/Makefile index 1e4bb4d94c..1585e2dc20 100644 --- a/src/gallium/targets/egl/Makefile +++ b/src/gallium/targets/egl/Makefile @@ -119,17 +119,17 @@ endif # OpenGL state tracker GL_CPPFLAGS := -I$(TOP)/src/mesa $(API_DEFINES) -GL_SYS := -lpthread -lm -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) +GL_SYS := $(DRI_LIB_DEPS) -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) GL_LIBS := $(TOP)/src/mesa/libmesagallium.a # OpenGL ES 1.x state tracker GLESv1_CM_CPPFLAGS := -I$(TOP)/src/mesa -GLESv1_CM_SYS := -lpthread -lm -L$(TOP)/$(LIB_DIR) -l$(GLESv1_CM_LIB) +GLESv1_CM_SYS := $(DRI_LIB_DEPS) -L$(TOP)/$(LIB_DIR) -l$(GLESv1_CM_LIB) GLESv1_CM_LIBS := $(TOP)/src/mesa/libes1gallium.a # OpenGL ES 2.x state tracker GLESv2_CPPFLAGS := -I$(TOP)/src/mesa -GLESv2_SYS := -lpthread -lm -L$(TOP)/$(LIB_DIR) -l$(GLESv2_LIB) +GLESv2_SYS := $(DRI_LIB_DEPS) -L$(TOP)/$(LIB_DIR) -l$(GLESv2_LIB) GLESv2_LIBS := $(TOP)/src/mesa/libes2gallium.a # OpenVG state tracker -- cgit v1.2.3 From ce7016e8827ae64f6b7a92bbc4cdc51d3f8761cd Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Sun, 22 Aug 2010 18:24:10 +0200 Subject: targets/egl: rename pipe_radeon to pipe_r300 st/egl/x11/x11_screen.c requests a driver named r300 not radeon KNOWN ISSUE: breaks st/egl/kms/ st/egl/kms requests a pipe named "radeon" that will not be found now so why not leaving pipe_radeon there? that was possible as long we have only r300g. now there is also r600g for which st/egl/kms also requests a pipe named "radeon" (possible solution in later commit) --- src/gallium/targets/egl/Makefile | 14 +++++++------- src/gallium/targets/egl/pipe_r300.c | 27 +++++++++++++++++++++++++++ src/gallium/targets/egl/pipe_radeon.c | 27 --------------------------- 3 files changed, 34 insertions(+), 34 deletions(-) create mode 100644 src/gallium/targets/egl/pipe_r300.c delete mode 100644 src/gallium/targets/egl/pipe_radeon.c (limited to 'src/gallium/targets/egl/Makefile') diff --git a/src/gallium/targets/egl/Makefile b/src/gallium/targets/egl/Makefile index 1585e2dc20..636fceb91f 100644 --- a/src/gallium/targets/egl/Makefile +++ b/src/gallium/targets/egl/Makefile @@ -90,10 +90,10 @@ nouveau_LIBS := \ $(TOP)/src/gallium/drivers/nv50/libnv50.a \ $(TOP)/src/gallium/drivers/nouveau/libnouveau.a -# radeon pipe driver -radeon_CPPFLAGS := -radeon_SYS := -ldrm -ldrm_radeon -radeon_LIBS := \ +# r300 pipe driver +r300_CPPFLAGS := +r300_SYS := -ldrm -ldrm_radeon +r300_LIBS := \ $(TOP)/src/gallium/winsys/radeon/drm/libradeonwinsys.a \ $(TOP)/src/gallium/drivers/r300/libr300.a @@ -151,7 +151,7 @@ ifneq ($(findstring nouveau/drm,$(GALLIUM_WINSYS_DIRS)),) OUTPUTS += nouveau endif ifneq ($(findstring radeon/drm,$(GALLIUM_WINSYS_DIRS)),) -OUTPUTS += radeon +OUTPUTS += r300 endif ifneq ($(findstring svga/drm,$(GALLIUM_WINSYS_DIRS)),) OUTPUTS += vmwgfx @@ -188,8 +188,8 @@ $(OUTPUT_PATH)/$(PIPE_PREFIX)i965.so: pipe_i965.o $(i965_LIBS) $(OUTPUT_PATH)/$(PIPE_PREFIX)nouveau.so: pipe_nouveau.o $(nouveau_LIBS) $(call mklib,nouveau) -$(OUTPUT_PATH)/$(PIPE_PREFIX)radeon.so: pipe_radeon.o $(radeon_LIBS) - $(call mklib,radeon) +$(OUTPUT_PATH)/$(PIPE_PREFIX)r300.so: pipe_r300.o $(r300_LIBS) + $(call mklib,r300) $(OUTPUT_PATH)/$(PIPE_PREFIX)vmwgfx.so: pipe_vmwgfx.o $(vmwgfx_LIBS) $(call mklib,vmwgfx) diff --git a/src/gallium/targets/egl/pipe_r300.c b/src/gallium/targets/egl/pipe_r300.c new file mode 100644 index 0000000000..2fa495e8a2 --- /dev/null +++ b/src/gallium/targets/egl/pipe_r300.c @@ -0,0 +1,27 @@ + +#include "target-helpers/inline_debug_helper.h" +#include "state_tracker/drm_driver.h" +#include "radeon/drm/radeon_drm_public.h" +#include "r300/r300_public.h" + +static struct pipe_screen * +create_screen(int fd) +{ + struct r300_winsys_screen *sws; + struct pipe_screen *screen; + + sws = r300_drm_winsys_screen_create(fd); + if (!sws) + return NULL; + + screen = r300_screen_create(sws); + if (!screen) + return NULL; + + screen = debug_screen_wrap(screen); + + return screen; +} + +PUBLIC +DRM_DRIVER_DESCRIPTOR("r300", "r300", create_screen) diff --git a/src/gallium/targets/egl/pipe_radeon.c b/src/gallium/targets/egl/pipe_radeon.c deleted file mode 100644 index 35550bcb26..0000000000 --- a/src/gallium/targets/egl/pipe_radeon.c +++ /dev/null @@ -1,27 +0,0 @@ - -#include "target-helpers/inline_debug_helper.h" -#include "state_tracker/drm_driver.h" -#include "radeon/drm/radeon_drm_public.h" -#include "r300/r300_public.h" - -static struct pipe_screen * -create_screen(int fd) -{ - struct r300_winsys_screen *sws; - struct pipe_screen *screen; - - sws = r300_drm_winsys_screen_create(fd); - if (!sws) - return NULL; - - screen = r300_screen_create(sws); - if (!screen) - return NULL; - - screen = debug_screen_wrap(screen); - - return screen; -} - -PUBLIC -DRM_DRIVER_DESCRIPTOR("radeon", "radeon", create_screen) -- cgit v1.2.3 From 0ba164365875bba0150937c7e1a81cfa06d9f9b4 Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Sun, 22 Aug 2010 18:24:12 +0200 Subject: targets/egl: add pipe_r600 KNOWN ISSUE: eglShowScreenSurfaceMESA in st/egl/kms fails but st/egl/x11 works --- src/gallium/targets/egl/Makefile | 13 +++++++++++++ src/gallium/targets/egl/pipe_r600.c | 27 +++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 src/gallium/targets/egl/pipe_r600.c (limited to 'src/gallium/targets/egl/Makefile') diff --git a/src/gallium/targets/egl/Makefile b/src/gallium/targets/egl/Makefile index 636fceb91f..2784fd0d10 100644 --- a/src/gallium/targets/egl/Makefile +++ b/src/gallium/targets/egl/Makefile @@ -97,6 +97,13 @@ r300_LIBS := \ $(TOP)/src/gallium/winsys/radeon/drm/libradeonwinsys.a \ $(TOP)/src/gallium/drivers/r300/libr300.a +# r600 pipe driver +r600_CPPFLAGS := +r600_SYS := -ldrm -ldrm_radeon +r600_LIBS := \ + $(TOP)/src/gallium/winsys/r600/drm/libr600winsys.a \ + $(TOP)/src/gallium/drivers/r600/libr600.a + # vmwgfx pipe driver vmwgfx_CPPFLAGS := vmwgfx_SYS := @@ -153,6 +160,9 @@ endif ifneq ($(findstring radeon/drm,$(GALLIUM_WINSYS_DIRS)),) OUTPUTS += r300 endif +ifneq ($(findstring r600/drm,$(GALLIUM_WINSYS_DIRS)),) +OUTPUTS += r600 +endif ifneq ($(findstring svga/drm,$(GALLIUM_WINSYS_DIRS)),) OUTPUTS += vmwgfx endif @@ -191,6 +201,9 @@ $(OUTPUT_PATH)/$(PIPE_PREFIX)nouveau.so: pipe_nouveau.o $(nouveau_LIBS) $(OUTPUT_PATH)/$(PIPE_PREFIX)r300.so: pipe_r300.o $(r300_LIBS) $(call mklib,r300) +$(OUTPUT_PATH)/$(PIPE_PREFIX)r600.so: pipe_r600.o $(r600_LIBS) + $(call mklib,r600) + $(OUTPUT_PATH)/$(PIPE_PREFIX)vmwgfx.so: pipe_vmwgfx.o $(vmwgfx_LIBS) $(call mklib,vmwgfx) diff --git a/src/gallium/targets/egl/pipe_r600.c b/src/gallium/targets/egl/pipe_r600.c new file mode 100644 index 0000000000..c35a0b09b9 --- /dev/null +++ b/src/gallium/targets/egl/pipe_r600.c @@ -0,0 +1,27 @@ + +#include "state_tracker/drm_driver.h" +#include "target-helpers/inline_debug_helper.h" +#include "r600/drm/r600_drm_public.h" +#include "r600/r600_public.h" + +static struct pipe_screen * +create_screen(int fd) +{ + struct radeon *rw; + struct pipe_screen *screen; + + rw = r600_drm_winsys_create(fd); + if (!rw) + return NULL; + + screen = r600_screen_create(rw); + if (!screen) + return NULL; + + screen = debug_screen_wrap(screen); + + return screen; +} + +PUBLIC +DRM_DRIVER_DESCRIPTOR("r600", "r600", create_screen) -- cgit v1.2.3