From 0ba164365875bba0150937c7e1a81cfa06d9f9b4 Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Sun, 22 Aug 2010 18:24:12 +0200 Subject: [PATCH] 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 diff --git a/src/gallium/targets/egl/Makefile b/src/gallium/targets/egl/Makefile index 636fceb91f4..2784fd0d100 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 00000000000..c35a0b09b99 --- /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) -- 2.30.2