summaryrefslogtreecommitdiff
path: root/src/gallium/winsys/drm/intel
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/winsys/drm/intel')
-rw-r--r--src/gallium/winsys/drm/intel/SConscript7
-rw-r--r--src/gallium/winsys/drm/intel/dri/Makefile2
-rw-r--r--src/gallium/winsys/drm/intel/dri/SConscript19
-rw-r--r--src/gallium/winsys/drm/intel/egl/Makefile1
-rw-r--r--src/gallium/winsys/drm/intel/gem/SConscript17
-rw-r--r--src/gallium/winsys/drm/intel/gem/intel_be_api.c26
-rw-r--r--src/gallium/winsys/drm/intel/gem/intel_be_api.h7
-rw-r--r--src/gallium/winsys/drm/intel/gem/intel_be_batchbuffer.c43
-rw-r--r--src/gallium/winsys/drm/intel/gem/intel_be_context.c4
-rw-r--r--src/gallium/winsys/drm/intel/gem/intel_be_device.c117
-rw-r--r--src/gallium/winsys/drm/intel/gem/intel_be_device.h25
-rw-r--r--src/gallium/winsys/drm/intel/xorg/Makefile45
12 files changed, 262 insertions, 51 deletions
diff --git a/src/gallium/winsys/drm/intel/SConscript b/src/gallium/winsys/drm/intel/SConscript
new file mode 100644
index 0000000000..50d7b75ed6
--- /dev/null
+++ b/src/gallium/winsys/drm/intel/SConscript
@@ -0,0 +1,7 @@
+Import('*')
+
+SConscript(['gem/SConscript',])
+
+if 'mesa' in env['statetrackers']:
+
+ SConscript(['dri/SConscript'])
diff --git a/src/gallium/winsys/drm/intel/dri/Makefile b/src/gallium/winsys/drm/intel/dri/Makefile
index ac0891a646..5e212b62a4 100644
--- a/src/gallium/winsys/drm/intel/dri/Makefile
+++ b/src/gallium/winsys/drm/intel/dri/Makefile
@@ -6,7 +6,9 @@ LIBNAME = i915_dri.so
PIPE_DRIVERS = \
$(TOP)/src/gallium/state_trackers/dri/libdridrm.a \
$(TOP)/src/gallium/winsys/drm/intel/gem/libinteldrm.a \
+ $(TOP)/src/gallium/drivers/trace/libtrace.a \
$(TOP)/src/gallium/drivers/softpipe/libsoftpipe.a \
+ $(TOP)/src/gallium/drivers/identity/libidentity.a \
$(TOP)/src/gallium/drivers/i915simple/libi915simple.a
diff --git a/src/gallium/winsys/drm/intel/dri/SConscript b/src/gallium/winsys/drm/intel/dri/SConscript
new file mode 100644
index 0000000000..6c00861f51
--- /dev/null
+++ b/src/gallium/winsys/drm/intel/dri/SConscript
@@ -0,0 +1,19 @@
+Import('*')
+
+env = drienv.Clone()
+
+env.ParseConfig('pkg-config --cflags --libs libdrm_intel')
+
+drivers = [
+ st_dri,
+ inteldrm,
+ softpipe,
+ i915simple,
+ trace,
+]
+
+env.SharedLibrary(
+ target ='i915_dri.so',
+ source = COMMON_GALLIUM_SOURCES,
+ LIBS = drivers + mesa + auxiliaries + env['LIBS'],
+)
diff --git a/src/gallium/winsys/drm/intel/egl/Makefile b/src/gallium/winsys/drm/intel/egl/Makefile
index c5217ad2d6..490baded66 100644
--- a/src/gallium/winsys/drm/intel/egl/Makefile
+++ b/src/gallium/winsys/drm/intel/egl/Makefile
@@ -8,6 +8,7 @@ PIPE_DRIVERS = \
$(TOP)/src/gallium/state_trackers/egl/libegldrm.a \
$(GALLIUMDIR)/winsys/drm/intel/gem/libinteldrm.a \
$(TOP)/src/gallium/drivers/softpipe/libsoftpipe.a \
+ $(TOP)/src/gallium/drivers/trace/libtrace.a \
$(TOP)/src/gallium/drivers/i915simple/libi915simple.a
DRIVER_SOURCES =
diff --git a/src/gallium/winsys/drm/intel/gem/SConscript b/src/gallium/winsys/drm/intel/gem/SConscript
new file mode 100644
index 0000000000..ea8a2e55f6
--- /dev/null
+++ b/src/gallium/winsys/drm/intel/gem/SConscript
@@ -0,0 +1,17 @@
+Import('*')
+
+env = drienv.Clone()
+
+inteldrm_sources = [
+ 'intel_be_api.c',
+ 'intel_be_batchbuffer.c',
+ 'intel_be_context.c',
+ 'intel_be_device.c',
+]
+
+inteldrm = env.ConvenienceLibrary(
+ target ='inteldrm',
+ source = inteldrm_sources,
+)
+
+Export('inteldrm')
diff --git a/src/gallium/winsys/drm/intel/gem/intel_be_api.c b/src/gallium/winsys/drm/intel/gem/intel_be_api.c
index f4ef7c2d88..dd5f814da3 100644
--- a/src/gallium/winsys/drm/intel/gem/intel_be_api.c
+++ b/src/gallium/winsys/drm/intel/gem/intel_be_api.c
@@ -1,15 +1,37 @@
#include "intel_be_api.h"
#include "i915simple/i915_winsys.h"
+#include "identity/id_drm.h"
+#include "trace/tr_drm.h"
-struct drm_api drm_api_hooks =
+static void destroy(struct drm_api *api)
+{
+
+}
+
+struct drm_api intel_be_drm_api =
{
/* intel_be_context.c */
.create_context = intel_be_create_context,
/* intel_be_device.c */
.create_screen = intel_be_create_screen,
- .buffer_from_texture = i915_get_texture_buffer,
+ .buffer_from_texture = intel_be_get_texture_buffer,
.buffer_from_handle = intel_be_buffer_from_handle,
.handle_from_buffer = intel_be_handle_from_buffer,
.global_handle_from_buffer = intel_be_global_handle_from_buffer,
+ .destroy = destroy,
};
+
+struct drm_api *
+drm_api_create()
+{
+#ifdef DEBUG
+#if 0
+ return identity_drm_create(&intel_be_drm_api);
+#else
+ return trace_drm_create(&intel_be_drm_api);
+#endif
+#else
+ return &intel_be_drm_api;
+#endif
+}
diff --git a/src/gallium/winsys/drm/intel/gem/intel_be_api.h b/src/gallium/winsys/drm/intel/gem/intel_be_api.h
index 1c622f3b97..f286b62eb8 100644
--- a/src/gallium/winsys/drm/intel/gem/intel_be_api.h
+++ b/src/gallium/winsys/drm/intel/gem/intel_be_api.h
@@ -8,8 +8,11 @@
#include "intel_be_device.h"
-struct pipe_screen *intel_be_create_screen(int drmFD,
+extern struct drm_api intel_be_drm_api;
+
+struct pipe_screen *intel_be_create_screen(struct drm_api *api, int drmFD,
struct drm_create_screen_arg *arg);
-struct pipe_context *intel_be_create_context(struct pipe_screen *screen);
+struct pipe_context *intel_be_create_context(struct drm_api *api,
+ struct pipe_screen *screen);
#endif
diff --git a/src/gallium/winsys/drm/intel/gem/intel_be_batchbuffer.c b/src/gallium/winsys/drm/intel/gem/intel_be_batchbuffer.c
index d5e63c3bae..c4a79586e6 100644
--- a/src/gallium/winsys/drm/intel/gem/intel_be_batchbuffer.c
+++ b/src/gallium/winsys/drm/intel/gem/intel_be_batchbuffer.c
@@ -21,12 +21,10 @@ intel_be_batchbuffer_alloc(struct intel_be_context *intel)
batch->base.size = 0;
batch->base.actual_size = intel->device->max_batch_size;
batch->base.relocs = 0;
- batch->base.max_relocs = 500;/*INTEL_DEFAULT_RELOCS;*/
+ batch->base.max_relocs = 100;/*INTEL_DEFAULT_RELOCS;*/
- batch->base.map = malloc(batch->base.actual_size);
- memset(batch->base.map, 0, batch->base.actual_size);
-
- batch->base.ptr = batch->base.map;
+ batch->intel = intel;
+ batch->device = intel->device;
intel_be_batchbuffer_reset(batch);
@@ -41,16 +39,17 @@ intel_be_batchbuffer_reset(struct intel_be_batchbuffer *batch)
if (batch->bo)
drm_intel_bo_unreference(batch->bo);
+ batch->bo = drm_intel_bo_alloc(dev->pools.gem,
+ "gallium3d_batch_buffer",
+ batch->base.actual_size,
+ 4096);
+ drm_intel_bo_map(batch->bo, TRUE);
+ batch->base.map = batch->bo->virtual;
memset(batch->base.map, 0, batch->base.actual_size);
batch->base.ptr = batch->base.map;
batch->base.size = batch->base.actual_size - BATCH_RESERVED;
-
batch->base.relocs = 0;
-
- batch->bo = drm_intel_bo_alloc(dev->pools.gem,
- "gallium3d_batch_buffer",
- batch->base.actual_size, 0);
}
int
@@ -88,6 +87,7 @@ intel_be_batchbuffer_flush(struct intel_be_batchbuffer *batch,
struct i915_batchbuffer *i915 = &batch->base;
unsigned used = 0;
int ret = 0;
+ int i;
assert(i915_batchbuffer_space(i915) >= 0);
@@ -105,11 +105,29 @@ intel_be_batchbuffer_flush(struct intel_be_batchbuffer *batch,
used = batch->base.ptr - batch->base.map;
- drm_intel_bo_subdata(batch->bo, 0, used, batch->base.map);
- ret = drm_intel_bo_exec(batch->bo, used, NULL, 0, 0);
+ drm_intel_bo_unmap(batch->bo);
+ /* Do the sending to HW */
+ ret = drm_intel_bo_exec(batch->bo, used, NULL, 0, 0);
assert(ret == 0);
+ if (batch->device->dump_cmd) {
+ unsigned *ptr;
+ drm_intel_bo_map(batch->bo, FALSE);
+ ptr = (unsigned*)batch->bo->virtual;
+
+ debug_printf("%s:\n", __func__);
+ for (i = 0; i < used / 4; i++, ptr++) {
+ debug_printf("\t%08x: %08x\n", i*4, *ptr);
+ }
+
+ drm_intel_bo_unmap(batch->bo);
+ } else {
+ /* TODO figgure out why the gpu hangs if we don't run sync */
+ drm_intel_bo_map(batch->bo, FALSE);
+ drm_intel_bo_unmap(batch->bo);
+ }
+
intel_be_batchbuffer_reset(batch);
if (fence) {
@@ -134,6 +152,5 @@ intel_be_batchbuffer_free(struct intel_be_batchbuffer *batch)
if (batch->bo)
drm_intel_bo_unreference(batch->bo);
- free(batch->base.map);
free(batch);
}
diff --git a/src/gallium/winsys/drm/intel/gem/intel_be_context.c b/src/gallium/winsys/drm/intel/gem/intel_be_context.c
index fe0b138fbe..629987c6f9 100644
--- a/src/gallium/winsys/drm/intel/gem/intel_be_context.c
+++ b/src/gallium/winsys/drm/intel/gem/intel_be_context.c
@@ -36,7 +36,7 @@ intel_be_batch_reloc(struct i915_winsys *sws,
}
if (access_flags & I915_BUFFER_ACCESS_READ) {
- read |= I915_GEM_DOMAIN_VERTEX;
+ read |= I915_GEM_DOMAIN_SAMPLER;
}
ret = intel_be_offset_relocation(intel->batch,
@@ -97,7 +97,7 @@ intel_be_init_context(struct intel_be_context *intel, struct intel_be_device *de
}
struct pipe_context *
-intel_be_create_context(struct pipe_screen *screen)
+intel_be_create_context(struct drm_api *api, struct pipe_screen *screen)
{
struct intel_be_context *intel;
struct pipe_context *pipe;
diff --git a/src/gallium/winsys/drm/intel/gem/intel_be_device.c b/src/gallium/winsys/drm/intel/gem/intel_be_device.c
index 907ac86637..5312865a03 100644
--- a/src/gallium/winsys/drm/intel/gem/intel_be_device.c
+++ b/src/gallium/winsys/drm/intel/gem/intel_be_device.c
@@ -7,6 +7,7 @@
#include "pipe/p_inlines.h"
#include "util/u_memory.h"
#include "util/u_debug.h"
+#include "util/u_math.h"
#include "intel_be_fence.h"
@@ -16,6 +17,8 @@
#include "intel_be_api.h"
#include <stdio.h>
+#define I915_TILING_X 1
+
/*
* Buffer
*/
@@ -25,9 +28,10 @@ intel_be_buffer_map(struct pipe_winsys *winsys,
struct pipe_buffer *buf,
unsigned flags)
{
+ struct intel_be_buffer *buffer = intel_be_buffer(buf);
drm_intel_bo *bo = intel_bo(buf);
int write = 0;
- int ret;
+ int ret = 0;
if (flags & PIPE_BUFFER_USAGE_DONTBLOCK) {
/* Remove this when drm_intel_bo_map supports DONTBLOCK
@@ -38,19 +42,37 @@ intel_be_buffer_map(struct pipe_winsys *winsys,
if (flags & PIPE_BUFFER_USAGE_CPU_WRITE)
write = 1;
- ret = drm_intel_bo_map(bo, write);
+ if (buffer->map_count)
+ goto out;
+
+ if (buffer->map_gtt)
+ ret = drm_intel_gem_bo_map_gtt(bo);
+ else
+ ret = drm_intel_bo_map(bo, write);
+ buffer->ptr = bo->virtual;
+
+out:
if (ret)
return NULL;
- return bo->virtual;
+ buffer->map_count++;
+ return buffer->ptr;
}
static void
intel_be_buffer_unmap(struct pipe_winsys *winsys,
struct pipe_buffer *buf)
{
- drm_intel_bo_unmap(intel_bo(buf));
+ struct intel_be_buffer *buffer = intel_be_buffer(buf);
+
+ if (--buffer->map_count)
+ return;
+
+ if (buffer->map_gtt)
+ drm_intel_gem_bo_unmap_gtt(intel_bo(buf));
+ else
+ drm_intel_bo_unmap(intel_bo(buf));
}
static void
@@ -80,8 +102,13 @@ intel_be_buffer_create(struct pipe_winsys *winsys,
buffer->base.size = size;
buffer->flinked = FALSE;
buffer->flink = 0;
+ buffer->map_gtt = FALSE;
- if (usage & (PIPE_BUFFER_USAGE_VERTEX | PIPE_BUFFER_USAGE_CONSTANT)) {
+ if (usage & I915_BUFFER_USAGE_SCANOUT) {
+ /* Scanout buffer */
+ name = "gallium3d_scanout";
+ pool = dev->pools.gem;
+ } else if (usage & (PIPE_BUFFER_USAGE_VERTEX | PIPE_BUFFER_USAGE_CONSTANT)) {
/* Local buffer */
name = "gallium3d_local";
pool = dev->pools.gem;
@@ -96,6 +123,12 @@ intel_be_buffer_create(struct pipe_winsys *winsys,
}
buffer->bo = drm_intel_bo_alloc(pool, name, size, alignment);
+ if (usage & I915_BUFFER_USAGE_SCANOUT) {
+ unsigned tiling = I915_TILING_X;
+ unsigned stride = 2048 * 4; /* TODO do something smarter here */
+ drm_intel_bo_set_tiling(buffer->bo, &tiling, stride);
+ buffer->map_gtt = TRUE;
+ }
if (!buffer->bo)
goto err;
@@ -142,8 +175,61 @@ err:
return NULL;
}
+static struct pipe_buffer *
+intel_be_surface_buffer_create(struct pipe_winsys *winsys,
+ unsigned width, unsigned height,
+ enum pipe_format format,
+ unsigned usage,
+ unsigned tex_usage,
+ unsigned *stride)
+{
+ struct pipe_format_block block;
+ unsigned buf_usage = 0;
+ unsigned buf_stride = 0;
+ unsigned buf_size = 0;
+
+ pf_get_block(format, &block);
+ buf_stride = pf_get_stride(&block, width);
+ buf_stride = align(buf_stride, 64);
+
+ if (tex_usage & PIPE_TEXTURE_USAGE_PRIMARY) {
+ /* TODO more checks */
+ assert(buf_stride <= 2048*4);
+ assert(height % 8 == 0);
+ buf_stride = 2048 * 4;
+ buf_usage |= I915_BUFFER_USAGE_SCANOUT;
+ }
+
+ buf_size = buf_stride * height;
+ *stride = buf_stride;
+
+ return intel_be_buffer_create(winsys,
+ 0,
+ buf_usage,
+ buf_size);
+}
+
+boolean
+intel_be_get_texture_buffer(struct drm_api *api,
+ struct pipe_texture *texture,
+ struct pipe_buffer **buffer,
+ unsigned *stride)
+{
+ struct intel_be_device *dev;
+
+ if (!texture)
+ return FALSE;
+
+ dev = intel_be_device(texture->screen->winsys);
+ if (dev->softpipe)
+ return softpipe_get_texture_buffer(texture, buffer, stride);
+ else
+ return i915_get_texture_buffer(texture, buffer, stride);
+}
+
struct pipe_buffer *
-intel_be_buffer_from_handle(struct pipe_screen *screen,
+intel_be_buffer_from_handle(struct drm_api *api,
+ struct pipe_screen *screen,
const char* name, unsigned handle)
{
struct intel_be_device *dev = intel_be_device(screen->winsys);
@@ -174,7 +260,8 @@ err:
}
boolean
-intel_be_handle_from_buffer(struct pipe_screen *screen,
+intel_be_handle_from_buffer(struct drm_api *api,
+ struct pipe_screen *screen,
struct pipe_buffer *buffer,
unsigned *handle)
{
@@ -186,7 +273,8 @@ intel_be_handle_from_buffer(struct pipe_screen *screen,
}
boolean
-intel_be_global_handle_from_buffer(struct pipe_screen *screen,
+intel_be_global_handle_from_buffer(struct drm_api *api,
+ struct pipe_screen *screen,
struct pipe_buffer *buffer,
unsigned *handle)
{
@@ -204,6 +292,7 @@ intel_be_global_handle_from_buffer(struct pipe_screen *screen,
*handle = buf->flink;
return TRUE;
}
+
/*
* Fence
*/
@@ -275,8 +364,8 @@ intel_be_init_device(struct intel_be_device *dev, int fd, unsigned id)
dev->base.buffer_unmap = intel_be_buffer_unmap;
dev->base.buffer_destroy = intel_be_buffer_destroy;
- /* Not used anymore */
- dev->base.surface_buffer_create = NULL;
+ /* Used by softpipe */
+ dev->base.surface_buffer_create = intel_be_surface_buffer_create;
dev->base.fence_reference = intel_be_fence_refunref;
dev->base.fence_signalled = intel_be_fence_signalled;
@@ -287,6 +376,7 @@ intel_be_init_device(struct intel_be_device *dev, int fd, unsigned id)
dev->pools.gem = drm_intel_bufmgr_gem_init(dev->fd, dev->max_batch_size);
dev->softpipe = debug_get_bool_option("INTEL_SOFTPIPE", FALSE);
+ dev->dump_cmd = debug_get_bool_option("INTEL_DUMP_CMD", FALSE);
return true;
}
@@ -296,6 +386,7 @@ intel_be_get_device_id(unsigned int *device_id)
{
char path[512];
FILE *file;
+ void *shutup_gcc;
/*
* FIXME: Fix this up to use a drm ioctl or whatever.
@@ -307,13 +398,14 @@ intel_be_get_device_id(unsigned int *device_id)
return;
}
- fgets(path, sizeof(path), file);
+ shutup_gcc = fgets(path, sizeof(path), file);
sscanf(path, "%x", device_id);
fclose(file);
}
struct pipe_screen *
-intel_be_create_screen(int drmFD, struct drm_create_screen_arg *arg)
+intel_be_create_screen(struct drm_api *api, int drmFD,
+ struct drm_create_screen_arg *arg)
{
struct intel_be_device *dev;
struct pipe_screen *screen;
@@ -339,7 +431,6 @@ intel_be_create_screen(int drmFD, struct drm_create_screen_arg *arg)
if (dev->softpipe) {
screen = softpipe_create_screen(&dev->base);
- drm_api_hooks.buffer_from_texture = softpipe_get_texture_buffer;
} else
screen = i915_create_screen(&dev->base, deviceID);
diff --git a/src/gallium/winsys/drm/intel/gem/intel_be_device.h b/src/gallium/winsys/drm/intel/gem/intel_be_device.h
index b32637ece2..c397048f8c 100644
--- a/src/gallium/winsys/drm/intel/gem/intel_be_device.h
+++ b/src/gallium/winsys/drm/intel/gem/intel_be_device.h
@@ -8,6 +8,8 @@
#include "drm.h"
#include "intel_bufmgr.h"
+struct drm_api;
+
/*
* Device
*/
@@ -17,6 +19,7 @@ struct intel_be_device
struct pipe_winsys base;
boolean softpipe;
+ boolean dump_cmd;
int fd; /**< Drm file discriptor */
@@ -45,18 +48,32 @@ intel_be_init_device(struct intel_be_device *device, int fd, unsigned id);
struct intel_be_buffer {
struct pipe_buffer base;
+ void *ptr;
+ unsigned map_count;
+ boolean map_gtt;
+
drm_intel_bo *bo;
boolean flinked;
unsigned flink;
};
+/*
+ * Wrapper for driver get_texture_buffer functions.
+ */
+boolean
+intel_be_get_texture_buffer(struct drm_api *api,
+ struct pipe_texture *texture,
+ struct pipe_buffer **buffer,
+ unsigned *stride);
+
/**
* Create a be buffer from a drm bo handle.
*
* Takes a reference.
*/
struct pipe_buffer *
-intel_be_buffer_from_handle(struct pipe_screen *screen,
+intel_be_buffer_from_handle(struct drm_api *api,
+ struct pipe_screen *screen,
const char* name, unsigned handle);
/**
@@ -65,7 +82,8 @@ intel_be_buffer_from_handle(struct pipe_screen *screen,
* If buffer is destroyed handle may become invalid.
*/
boolean
-intel_be_handle_from_buffer(struct pipe_screen *screen,
+intel_be_handle_from_buffer(struct drm_api *api,
+ struct pipe_screen *screen,
struct pipe_buffer *buffer,
unsigned *handle);
@@ -75,7 +93,8 @@ intel_be_handle_from_buffer(struct pipe_screen *screen,
* If buffer is destroyed handle may become invalid.
*/
boolean
-intel_be_global_handle_from_buffer(struct pipe_screen *screen,
+intel_be_global_handle_from_buffer(struct drm_api *api,
+ struct pipe_screen *screen,
struct pipe_buffer *buffer,
unsigned *handle);
diff --git a/src/gallium/winsys/drm/intel/xorg/Makefile b/src/gallium/winsys/drm/intel/xorg/Makefile
index b1b6b9362b..9e56853b02 100644
--- a/src/gallium/winsys/drm/intel/xorg/Makefile
+++ b/src/gallium/winsys/drm/intel/xorg/Makefile
@@ -1,36 +1,39 @@
TARGET = modesetting_drv.so
CFILES = $(wildcard ./*.c)
OBJECTS = $(patsubst ./%.c,./%.o,$(CFILES))
-GALLIUMDIR = ../../../..
TOP = ../../../../../..
-include ${TOP}/configs/current
+include $(TOP)/configs/current
-CFLAGS = -DHAVE_CONFIG_H \
- -g -Wall -Wimplicit-function-declaration -fPIC \
- $(shell pkg-config --cflags pixman-1 xorg-server libdrm xproto) \
- -I../gem \
- -I${GALLIUMDIR}/include \
- -I${GALLIUMDIR}/drivers \
- -I${GALLIUMDIR}/auxiliary \
- -I${TOP}/src/mesa \
- -I$(TOP)/include \
- -I$(TOP)/src/egl/main
+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
LIBS = \
- $(GALLIUMDIR)/state_trackers/xorg/libxorgtracker.a \
- $(GALLIUMDIR)/winsys/drm/intel/gem/libinteldrm.a \
+ $(TOP)/src/gallium/state_trackers/xorg/libxorgtracker.a \
+ $(TOP)/src/gallium/winsys/drm/intel/gem/libinteldrm.a \
$(TOP)/src/gallium/drivers/i915simple/libi915simple.a \
+ $(TOP)/src/gallium/drivers/trace/libtrace.a \
$(TOP)/src/gallium/drivers/softpipe/libsoftpipe.a \
$(GALLIUM_AUXILIARIES)
+DRIVER_DEFINES = \
+ -DHAVE_CONFIG_H
+
+
#############################################
all default: $(TARGET)
-$(TARGET): $(OBJECTS) Makefile $(GALLIUMDIR)/state_trackers/xorg/libxorgtracker.a $(LIBS)
+$(TARGET): $(OBJECTS) Makefile $(TOP)/src/gallium/state_trackers/xorg/libxorgtracker.a $(LIBS)
$(TOP)/bin/mklib -noprefix -o $@ \
$(OBJECTS) $(LIBS) $(shell pkg-config --libs libdrm) -ldrm_intel
@@ -39,6 +42,16 @@ clean:
install:
$(INSTALL) -d $(DESTDIR)/$(XORG_DRIVER_INSTALL_DIR)
- $(INSTALL) -m 755 $(TARGET) $(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