summaryrefslogtreecommitdiff
path: root/src/gallium/winsys/drm/i965
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/winsys/drm/i965')
-rw-r--r--src/gallium/winsys/drm/i965/egl/Makefile27
-rw-r--r--src/gallium/winsys/drm/i965/egl/dummy.c1
-rw-r--r--src/gallium/winsys/drm/i965/gem/i965_drm_api.c7
-rw-r--r--src/gallium/winsys/drm/i965/gem/i965_drm_buffer.c1
-rw-r--r--src/gallium/winsys/drm/i965/xlib/xlib_i965.c19
-rw-r--r--src/gallium/winsys/drm/i965/xorg/Makefile59
6 files changed, 37 insertions, 77 deletions
diff --git a/src/gallium/winsys/drm/i965/egl/Makefile b/src/gallium/winsys/drm/i965/egl/Makefile
index a1b32eb2a7..1c13258200 100644
--- a/src/gallium/winsys/drm/i965/egl/Makefile
+++ b/src/gallium/winsys/drm/i965/egl/Makefile
@@ -1,29 +1,14 @@
TOP = ../../../../../..
-GALLIUMDIR = ../../../..
include $(TOP)/configs/current
-LIBNAME = EGL_i965.so
+EGL_DRIVER_NAME = i965
+EGL_DRIVER_SOURCES = dummy.c
+EGL_DRIVER_LIBS = -ldrm_intel
-PIPE_DRIVERS = \
- $(TOP)/src/gallium/state_trackers/egl/libegldrm.a \
- $(GALLIUMDIR)/winsys/drm/i965/gem/libi965drm.a \
+EGL_DRIVER_PIPES = \
+ $(TOP)/src/gallium/winsys/drm/i965/gem/libi965drm.a \
$(TOP)/src/gallium/drivers/softpipe/libsoftpipe.a \
$(TOP)/src/gallium/drivers/trace/libtrace.a \
$(TOP)/src/gallium/drivers/i965/libi965.a
-DRIVER_SOURCES =
-
-C_SOURCES = \
- $(COMMON_GALLIUM_SOURCES) \
- $(DRIVER_SOURCES)
-
-DRIVER_EXTRAS = -ldrm_intel
-
-ASM_SOURCES =
-
-DRIVER_DEFINES = -I../gem $(shell pkg-config libdrm --atleast-version=2.3.1 \
- && echo "-DDRM_VBLANK_FLIP=DRM_VBLANK_FLIP")
-
-include ../../Makefile.template
-
-symlinks:
+include ../../Makefile.egl
diff --git a/src/gallium/winsys/drm/i965/egl/dummy.c b/src/gallium/winsys/drm/i965/egl/dummy.c
new file mode 100644
index 0000000000..4a1bc28b0b
--- /dev/null
+++ b/src/gallium/winsys/drm/i965/egl/dummy.c
@@ -0,0 +1 @@
+/* mklib expects at least one object file */
diff --git a/src/gallium/winsys/drm/i965/gem/i965_drm_api.c b/src/gallium/winsys/drm/i965/gem/i965_drm_api.c
index fc9678d2b6..a061eef0be 100644
--- a/src/gallium/winsys/drm/i965/gem/i965_drm_api.c
+++ b/src/gallium/winsys/drm/i965/gem/i965_drm_api.c
@@ -212,11 +212,6 @@ i965_libdrm_create_screen(struct drm_api *api, int drmFD,
return brw_create_screen(&idws->base, deviceID);
}
-static struct pipe_context *
-i965_libdrm_create_context(struct drm_api *api, struct pipe_screen *screen)
-{
- return brw_create_context(screen);
-}
static void
destroy(struct drm_api *api)
@@ -228,7 +223,7 @@ destroy(struct drm_api *api)
struct drm_api i965_libdrm_api =
{
- .create_context = i965_libdrm_create_context,
+ .name = "i965",
.create_screen = i965_libdrm_create_screen,
.texture_from_shared_handle = i965_libdrm_texture_from_shared_handle,
.shared_handle_from_texture = i965_libdrm_shared_handle_from_texture,
diff --git a/src/gallium/winsys/drm/i965/gem/i965_drm_buffer.c b/src/gallium/winsys/drm/i965/gem/i965_drm_buffer.c
index a4a72b372d..07be1df87f 100644
--- a/src/gallium/winsys/drm/i965/gem/i965_drm_buffer.c
+++ b/src/gallium/winsys/drm/i965/gem/i965_drm_buffer.c
@@ -1,6 +1,7 @@
#include "i965_drm_winsys.h"
#include "util/u_memory.h"
+#include "util/u_inlines.h"
#include "i915_drm.h"
#include "intel_bufmgr.h"
diff --git a/src/gallium/winsys/drm/i965/xlib/xlib_i965.c b/src/gallium/winsys/drm/i965/xlib/xlib_i965.c
index d2b9a1ab31..74501eeb16 100644
--- a/src/gallium/winsys/drm/i965/xlib/xlib_i965.c
+++ b/src/gallium/winsys/drm/i965/xlib/xlib_i965.c
@@ -469,31 +469,12 @@ fail:
}
-static struct pipe_context *
-xlib_create_i965_context( struct pipe_screen *screen,
- void *context_private )
-{
- struct pipe_context *pipe;
-
- pipe = brw_create_context(screen);
- if (pipe == NULL)
- goto fail;
-
- pipe->priv = context_private;
- return pipe;
-
-fail:
- /* Free stuff here */
- return NULL;
-}
-
struct xm_driver xlib_i965_driver =
{
.create_pipe_screen = xlib_create_i965_screen,
- .create_pipe_context = xlib_create_i965_context,
.display_surface = xlib_i965_display_surface
};
diff --git a/src/gallium/winsys/drm/i965/xorg/Makefile b/src/gallium/winsys/drm/i965/xorg/Makefile
index d91d0006ef..c25726b0bb 100644
--- a/src/gallium/winsys/drm/i965/xorg/Makefile
+++ b/src/gallium/winsys/drm/i965/xorg/Makefile
@@ -1,19 +1,25 @@
-TARGET = modesetting_drv.so
-CFILES = $(wildcard ./*.c)
-OBJECTS = $(patsubst ./%.c,./%.o,$(CFILES))
TOP = ../../../../../..
-include $(TOP)/configs/current
-INCLUDES = \
- $(shell pkg-config --cflags-only-I pixman-1 xorg-server libdrm xproto) \
- -I../gem \
- -I$(TOP)/src/gallium/include \
- -I$(TOP)/src/gallium/drivers \
- -I$(TOP)/src/gallium/auxiliary \
- -I$(TOP)/src/mesa \
- -I$(TOP)/include \
- -I$(TOP)/src/egl/main
+GALLIUMDIR = $(TOP)/src/gallium
+
+TARGET = i965g_drv.so
+
+CFILES = $(wildcard ./*.c)
+
+include ${TOP}/configs/current
+
+OBJECTS = $(patsubst ./%.c,./%.o,$(CFILES))
+
+CFLAGS = -DHAVE_CONFIG_H \
+ -g -Wall -Wimplicit-function-declaration -fPIC \
+ $(shell pkg-config --cflags pixman-1 xorg-server libdrm xproto) \
+ -I${GALLIUMDIR}/include \
+ -I${GALLIUMDIR}/drivers \
+ -I${GALLIUMDIR}/auxiliary \
+ -I${TOP}/src/mesa \
+ -I$(TOP)/include \
+ -I$(TOP)/src/egl/main
LIBS = \
$(TOP)/src/gallium/state_trackers/xorg/libxorgtracker.a \
@@ -23,20 +29,21 @@ LIBS = \
$(TOP)/src/gallium/drivers/softpipe/libsoftpipe.a \
$(GALLIUM_AUXILIARIES)
-DRIVER_DEFINES = \
- -DHAVE_CONFIG_H
-
-
+TARGET_STAGING = $(TOP)/$(LIB_DIR)/gallium/$(TARGET)
#############################################
+all default: $(TARGET) $(TARGET_STAGING)
-
-all default: $(TARGET)
-
-$(TARGET): $(OBJECTS) Makefile $(TOP)/src/gallium/state_trackers/xorg/libxorgtracker.a $(LIBS)
+$(TARGET): $(OBJECTS) Makefile $(GALLIUMDIR)/state_trackers/xorg/libxorgtracker.a $(LIBS)
$(TOP)/bin/mklib -noprefix -o $@ \
$(OBJECTS) $(LIBS) $(shell pkg-config --libs libdrm) -ldrm_intel
+$(TOP)/$(LIB_DIR)/gallium:
+ mkdir -p $@
+
+$(TARGET_STAGING): $(TARGET) $(TOP)/$(LIB_DIR)/gallium
+ $(INSTALL) $(TARGET) $(TOP)/$(LIB_DIR)/gallium
+
clean:
rm -rf $(OBJECTS) $(TARGET)
@@ -44,14 +51,4 @@ install:
$(INSTALL) -d $(DESTDIR)/$(XORG_DRIVER_INSTALL_DIR)
$(MINSTALL) -m 755 $(TARGET) $(DESTDIR)/$(XORG_DRIVER_INSTALL_DIR)
-
-##############################################
-
-
-.c.o:
- $(CC) -c $(CFLAGS) $(INCLUDES) $(DRIVER_DEFINES) $< -o $@
-
-
-##############################################
-
.PHONY = all clean install