diff options
Diffstat (limited to 'src/gallium/targets/egl')
-rw-r--r-- | src/gallium/targets/egl/Makefile | 33 | ||||
-rw-r--r-- | src/gallium/targets/egl/egl.c | 27 | ||||
-rw-r--r-- | src/gallium/targets/egl/pipe_r300.c (renamed from src/gallium/targets/egl/pipe_radeon.c) | 2 | ||||
-rw-r--r-- | src/gallium/targets/egl/pipe_r600.c | 27 |
4 files changed, 64 insertions, 25 deletions
diff --git a/src/gallium/targets/egl/Makefile b/src/gallium/targets/egl/Makefile index 1e4bb4d94c..2784fd0d10 100644 --- a/src/gallium/targets/egl/Makefile +++ b/src/gallium/targets/egl/Makefile @@ -90,13 +90,20 @@ 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 +# 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 := @@ -119,17 +126,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 @@ -151,7 +158,10 @@ ifneq ($(findstring nouveau/drm,$(GALLIUM_WINSYS_DIRS)),) OUTPUTS += nouveau endif ifneq ($(findstring radeon/drm,$(GALLIUM_WINSYS_DIRS)),) -OUTPUTS += radeon +OUTPUTS += r300 +endif +ifneq ($(findstring r600/drm,$(GALLIUM_WINSYS_DIRS)),) +OUTPUTS += r600 endif ifneq ($(findstring svga/drm,$(GALLIUM_WINSYS_DIRS)),) OUTPUTS += vmwgfx @@ -188,8 +198,11 @@ $(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)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/egl.c b/src/gallium/targets/egl/egl.c index d9d89485c3..a573b21217 100644 --- a/src/gallium/targets/egl/egl.c +++ b/src/gallium/targets/egl/egl.c @@ -155,24 +155,23 @@ load_pipe_module(struct pipe_module *pmod, const char *name) if (!pmod->name) return FALSE; + _eglLog(_EGL_DEBUG, "searching for pipe module %s", pmod->name); _eglSearchPathForEach(dlopen_pipe_module_cb, (void *) pmod); if (pmod->lib) { pmod->drmdd = (const struct drm_driver_descriptor *) util_dl_get_proc_address(pmod->lib, "driver_descriptor"); - if (pmod->drmdd) { - if (pmod->drmdd->driver_name) { - /* driver name mismatch */ - if (strcmp(pmod->drmdd->driver_name, pmod->name) != 0) - pmod->drmdd = NULL; - } - else { - /* swrast */ - pmod->swrast_create_screen = - (struct pipe_screen *(*)(struct sw_winsys *)) - util_dl_get_proc_address(pmod->lib, "swrast_create_screen"); - if (!pmod->swrast_create_screen) - pmod->drmdd = NULL; - } + + /* sanity check on the name */ + if (pmod->drmdd && strcmp(pmod->drmdd->name, pmod->name) != 0) + pmod->drmdd = NULL; + + /* swrast */ + if (pmod->drmdd && !pmod->drmdd->driver_name) { + pmod->swrast_create_screen = + (struct pipe_screen *(*)(struct sw_winsys *)) + util_dl_get_proc_address(pmod->lib, "swrast_create_screen"); + if (!pmod->swrast_create_screen) + pmod->drmdd = NULL; } if (!pmod->drmdd) { diff --git a/src/gallium/targets/egl/pipe_radeon.c b/src/gallium/targets/egl/pipe_r300.c index 35550bcb26..d84bb92539 100644 --- a/src/gallium/targets/egl/pipe_radeon.c +++ b/src/gallium/targets/egl/pipe_r300.c @@ -24,4 +24,4 @@ create_screen(int fd) } PUBLIC -DRM_DRIVER_DESCRIPTOR("radeon", "radeon", create_screen) +DRM_DRIVER_DESCRIPTOR("r300", "radeon", create_screen) diff --git a/src/gallium/targets/egl/pipe_r600.c b/src/gallium/targets/egl/pipe_r600.c new file mode 100644 index 0000000000..486a659258 --- /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", "radeon", create_screen) |