summaryrefslogtreecommitdiffstats
path: root/src/gallium/winsys/g3dvl/nouveau
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/winsys/g3dvl/nouveau')
-rw-r--r--src/gallium/winsys/g3dvl/nouveau/Makefile9
l---------src/gallium/winsys/g3dvl/nouveau/nouveau_bo.c2
l---------src/gallium/winsys/g3dvl/nouveau/nouveau_channel.c2
-rw-r--r--src/gallium/winsys/g3dvl/nouveau/nouveau_context.c37
l---------src/gallium/winsys/g3dvl/nouveau/nouveau_device.c2
l---------src/gallium/winsys/g3dvl/nouveau/nouveau_dma.c2
l---------src/gallium/winsys/g3dvl/nouveau/nouveau_dma.h2
l---------src/gallium/winsys/g3dvl/nouveau/nouveau_dri.h2
l---------src/gallium/winsys/g3dvl/nouveau/nouveau_drmif.h2
l---------src/gallium/winsys/g3dvl/nouveau/nouveau_fence.c2
l---------src/gallium/winsys/g3dvl/nouveau/nouveau_grobj.c2
l---------src/gallium/winsys/g3dvl/nouveau/nouveau_local.h2
l---------src/gallium/winsys/g3dvl/nouveau/nouveau_notifier.c2
l---------src/gallium/winsys/g3dvl/nouveau/nouveau_pushbuf.c2
l---------src/gallium/winsys/g3dvl/nouveau/nouveau_resource.c2
-rw-r--r--src/gallium/winsys/g3dvl/nouveau/nouveau_screen.c13
l---------src/gallium/winsys/g3dvl/nouveau/nouveau_winsys.c2
-rw-r--r--src/gallium/winsys/g3dvl/nouveau/nouveau_winsys_pipe.c13
l---------src/gallium/winsys/g3dvl/nouveau/nouveau_winsys_pipe.h2
l---------src/gallium/winsys/g3dvl/nouveau/nouveau_winsys_softpipe.c2
l---------src/gallium/winsys/g3dvl/nouveau/nv04_surface.c2
l---------src/gallium/winsys/g3dvl/nouveau/nv50_surface.c2
22 files changed, 53 insertions, 55 deletions
diff --git a/src/gallium/winsys/g3dvl/nouveau/Makefile b/src/gallium/winsys/g3dvl/nouveau/Makefile
index 7fa29d2f5fb..5d11bde322b 100644
--- a/src/gallium/winsys/g3dvl/nouveau/Makefile
+++ b/src/gallium/winsys/g3dvl/nouveau/Makefile
@@ -34,15 +34,16 @@ LIBS += -ldriclient -ldrm -lnv10 -lnv30 -lnv40 -lnv50 -ldraw -ltgsi -ltranslate
#############################################
-.PHONY = all clean
+.PHONY = all clean libdriclient
all: ${TARGET}
-${TARGET}: ${OBJECTS}
+${TARGET}: ${OBJECTS} libdriclient
+ $(CC) ${LDFLAGS} -shared -o $@ ${OBJECTS} ${LIBS}
+
+libdriclient:
cd ${DRIDIR}/src; ${MAKE}
- $(CC) ${LDFLAGS} -shared -o $@ $^ ${LIBS}
clean:
cd ${DRIDIR}/src; ${MAKE} clean
rm -rf ${OBJECTS} ${TARGET}
-
diff --git a/src/gallium/winsys/g3dvl/nouveau/nouveau_bo.c b/src/gallium/winsys/g3dvl/nouveau/nouveau_bo.c
index 73ac4a4171a..1005282dd4d 120000
--- a/src/gallium/winsys/g3dvl/nouveau/nouveau_bo.c
+++ b/src/gallium/winsys/g3dvl/nouveau/nouveau_bo.c
@@ -1 +1 @@
-../../dri/nouveau/nouveau_bo.c \ No newline at end of file
+../../drm/nouveau/nouveau_bo.c \ No newline at end of file
diff --git a/src/gallium/winsys/g3dvl/nouveau/nouveau_channel.c b/src/gallium/winsys/g3dvl/nouveau/nouveau_channel.c
index 6c9b2c48d84..5af82029508 120000
--- a/src/gallium/winsys/g3dvl/nouveau/nouveau_channel.c
+++ b/src/gallium/winsys/g3dvl/nouveau/nouveau_channel.c
@@ -1 +1 @@
-../../dri/nouveau/nouveau_channel.c \ No newline at end of file
+../../drm/nouveau/nouveau_channel.c \ No newline at end of file
diff --git a/src/gallium/winsys/g3dvl/nouveau/nouveau_context.c b/src/gallium/winsys/g3dvl/nouveau/nouveau_context.c
index 5e173c76728..06a61fcda3e 100644
--- a/src/gallium/winsys/g3dvl/nouveau/nouveau_context.c
+++ b/src/gallium/winsys/g3dvl/nouveau/nouveau_context.c
@@ -1,7 +1,7 @@
#include "pipe/p_defines.h"
#include "pipe/p_context.h"
#include "pipe/p_screen.h"
-#include "pipe/p_util.h"
+#include "util/u_memory.h"
#include "nouveau_context.h"
#include "nouveau_dri.h"
@@ -150,7 +150,7 @@ nouveau_context_create(dri_context_t *dri_context)
fb_bo = calloc(1, sizeof(struct nouveau_bo_priv));
fb_bo->drm.offset = nv_screen->front_offset;
fb_bo->drm.flags = NOUVEAU_MEM_FB;
- fb_bo->drm.size = nv_screen->front_pitch *
+ fb_bo->drm.size = nv_screen->front_pitch *
nv_screen->front_height;
fb_bo->refcount = 1;
fb_bo->base.flags = NOUVEAU_BO_PIN | NOUVEAU_BO_VRAM;
@@ -280,7 +280,7 @@ nouveau_context_bind(struct nouveau_context *nv, dri_drawable_t *dri_drawable)
{
assert(nv);
assert(dri_drawable);
-
+
if (nv->dri_drawable != dri_drawable)
{
nv->dri_drawable = dri_drawable;
@@ -294,9 +294,9 @@ int
nouveau_context_unbind(struct nouveau_context *nv)
{
assert(nv);
-
+
nv->dri_drawable = NULL;
-
+
return 0;
}
@@ -306,20 +306,20 @@ int bind_pipe_drawable(struct pipe_context *pipe, Drawable drawable)
{
struct nouveau_context *nv;
dri_drawable_t *dri_drawable;
-
+
nv = pipe->priv;
-
+
driCreateDrawable(nv->nv_screen->dri_screen, drawable, &dri_drawable);
-
+
nouveau_context_bind(nv, dri_drawable);
-
+
return 0;
}
int unbind_pipe_drawable(struct pipe_context *pipe)
{
nouveau_context_unbind(pipe->priv);
-
+
return 0;
}
@@ -329,15 +329,15 @@ struct pipe_context* create_pipe_context(Display *display, int screen)
dri_framebuffer_t dri_framebuf;
dri_context_t *dri_context;
struct nouveau_context *nv;
-
+
driCreateScreen(display, screen, &dri_screen, &dri_framebuf);
driCreateContext(dri_screen, XDefaultVisual(display, screen), &dri_context);
-
+
nouveau_screen_create(dri_screen, &dri_framebuf);
nouveau_context_create(dri_context);
-
+
nv = dri_context->private;
-
+
return nv->nvc->pctx[nv->pctx_id];
}
@@ -348,15 +348,15 @@ int destroy_pipe_context(struct pipe_context *pipe)
struct nouveau_context *nv;
dri_screen_t *dri_screen;
dri_context_t *dri_context;
-
+
assert(pipe);
-
+
screen = pipe->screen;
winsys = pipe->winsys;
nv = pipe->priv;
dri_context = nv->dri_context;
dri_screen = dri_context->dri_screen;
-
+
pipe->destroy(pipe);
screen->destroy(screen);
free(winsys);
@@ -365,7 +365,6 @@ int destroy_pipe_context(struct pipe_context *pipe)
nouveau_screen_destroy(dri_screen);
driDestroyContext(dri_context);
driDestroyScreen(dri_screen);
-
+
return 0;
}
-
diff --git a/src/gallium/winsys/g3dvl/nouveau/nouveau_device.c b/src/gallium/winsys/g3dvl/nouveau/nouveau_device.c
index 47d52dafa89..63f1fa040c7 120000
--- a/src/gallium/winsys/g3dvl/nouveau/nouveau_device.c
+++ b/src/gallium/winsys/g3dvl/nouveau/nouveau_device.c
@@ -1 +1 @@
-../../dri/nouveau/nouveau_device.c \ No newline at end of file
+../../drm/nouveau/nouveau_device.c \ No newline at end of file
diff --git a/src/gallium/winsys/g3dvl/nouveau/nouveau_dma.c b/src/gallium/winsys/g3dvl/nouveau/nouveau_dma.c
index 45078c964f4..cd0d32e5373 120000
--- a/src/gallium/winsys/g3dvl/nouveau/nouveau_dma.c
+++ b/src/gallium/winsys/g3dvl/nouveau/nouveau_dma.c
@@ -1 +1 @@
-../../dri/nouveau/nouveau_dma.c \ No newline at end of file
+../../drm/nouveau/nouveau_dma.c \ No newline at end of file
diff --git a/src/gallium/winsys/g3dvl/nouveau/nouveau_dma.h b/src/gallium/winsys/g3dvl/nouveau/nouveau_dma.h
index 6b9ec777417..e6c7d4bc965 120000
--- a/src/gallium/winsys/g3dvl/nouveau/nouveau_dma.h
+++ b/src/gallium/winsys/g3dvl/nouveau/nouveau_dma.h
@@ -1 +1 @@
-../../dri/nouveau/nouveau_dma.h \ No newline at end of file
+../../drm/nouveau/nouveau_dma.h \ No newline at end of file
diff --git a/src/gallium/winsys/g3dvl/nouveau/nouveau_dri.h b/src/gallium/winsys/g3dvl/nouveau/nouveau_dri.h
index 0e6c9fce355..c8f9dbdc3a8 120000
--- a/src/gallium/winsys/g3dvl/nouveau/nouveau_dri.h
+++ b/src/gallium/winsys/g3dvl/nouveau/nouveau_dri.h
@@ -1 +1 @@
-../../dri/nouveau/nouveau_dri.h \ No newline at end of file
+../../drm/nouveau/nouveau_dri.h \ No newline at end of file
diff --git a/src/gallium/winsys/g3dvl/nouveau/nouveau_drmif.h b/src/gallium/winsys/g3dvl/nouveau/nouveau_drmif.h
index 473b7d4812d..27082c9d34c 120000
--- a/src/gallium/winsys/g3dvl/nouveau/nouveau_drmif.h
+++ b/src/gallium/winsys/g3dvl/nouveau/nouveau_drmif.h
@@ -1 +1 @@
-../../dri/nouveau/nouveau_drmif.h \ No newline at end of file
+../../drm/nouveau/nouveau_drmif.h \ No newline at end of file
diff --git a/src/gallium/winsys/g3dvl/nouveau/nouveau_fence.c b/src/gallium/winsys/g3dvl/nouveau/nouveau_fence.c
index ef1f0c6afe1..51a50527e6d 120000
--- a/src/gallium/winsys/g3dvl/nouveau/nouveau_fence.c
+++ b/src/gallium/winsys/g3dvl/nouveau/nouveau_fence.c
@@ -1 +1 @@
-../../dri/nouveau/nouveau_fence.c \ No newline at end of file
+../../drm/nouveau/nouveau_fence.c \ No newline at end of file
diff --git a/src/gallium/winsys/g3dvl/nouveau/nouveau_grobj.c b/src/gallium/winsys/g3dvl/nouveau/nouveau_grobj.c
index 428186544c6..db17c72e6d7 120000
--- a/src/gallium/winsys/g3dvl/nouveau/nouveau_grobj.c
+++ b/src/gallium/winsys/g3dvl/nouveau/nouveau_grobj.c
@@ -1 +1 @@
-../../dri/nouveau/nouveau_grobj.c \ No newline at end of file
+../../drm/nouveau/nouveau_grobj.c \ No newline at end of file
diff --git a/src/gallium/winsys/g3dvl/nouveau/nouveau_local.h b/src/gallium/winsys/g3dvl/nouveau/nouveau_local.h
index 6b878aad224..4e9d3042cb5 120000
--- a/src/gallium/winsys/g3dvl/nouveau/nouveau_local.h
+++ b/src/gallium/winsys/g3dvl/nouveau/nouveau_local.h
@@ -1 +1 @@
-../../dri/nouveau/nouveau_local.h \ No newline at end of file
+../../drm/nouveau/nouveau_local.h \ No newline at end of file
diff --git a/src/gallium/winsys/g3dvl/nouveau/nouveau_notifier.c b/src/gallium/winsys/g3dvl/nouveau/nouveau_notifier.c
index 3024a612a7a..703bc3ce4ab 120000
--- a/src/gallium/winsys/g3dvl/nouveau/nouveau_notifier.c
+++ b/src/gallium/winsys/g3dvl/nouveau/nouveau_notifier.c
@@ -1 +1 @@
-../../dri/nouveau/nouveau_notifier.c \ No newline at end of file
+../../drm/nouveau/nouveau_notifier.c \ No newline at end of file
diff --git a/src/gallium/winsys/g3dvl/nouveau/nouveau_pushbuf.c b/src/gallium/winsys/g3dvl/nouveau/nouveau_pushbuf.c
index dae31d97998..4ac137cadad 120000
--- a/src/gallium/winsys/g3dvl/nouveau/nouveau_pushbuf.c
+++ b/src/gallium/winsys/g3dvl/nouveau/nouveau_pushbuf.c
@@ -1 +1 @@
-../../dri/nouveau/nouveau_pushbuf.c \ No newline at end of file
+../../drm/nouveau/nouveau_pushbuf.c \ No newline at end of file
diff --git a/src/gallium/winsys/g3dvl/nouveau/nouveau_resource.c b/src/gallium/winsys/g3dvl/nouveau/nouveau_resource.c
index e0d71e9d2bf..2241af328ff 120000
--- a/src/gallium/winsys/g3dvl/nouveau/nouveau_resource.c
+++ b/src/gallium/winsys/g3dvl/nouveau/nouveau_resource.c
@@ -1 +1 @@
-../../dri/nouveau/nouveau_resource.c \ No newline at end of file
+../../drm/nouveau/nouveau_resource.c \ No newline at end of file
diff --git a/src/gallium/winsys/g3dvl/nouveau/nouveau_screen.c b/src/gallium/winsys/g3dvl/nouveau/nouveau_screen.c
index daea3fff680..f80d00050c8 100644
--- a/src/gallium/winsys/g3dvl/nouveau/nouveau_screen.c
+++ b/src/gallium/winsys/g3dvl/nouveau/nouveau_screen.c
@@ -1,5 +1,5 @@
#include "pipe/p_context.h"
-#include "pipe/p_util.h"
+#include "util/u_memory.h"
#include "nouveau_context.h"
#include <nouveau_drm.h>
#include "nouveau_dri.h"
@@ -23,11 +23,11 @@ int nouveau_check_dri_drm_ddx(dri_version_t *dri, dri_version_t *drm, dri_versio
static const dri_version_t ddx_expected = {0, 0, NOUVEAU_DRM_HEADER_PATCHLEVEL};
static const dri_version_t dri_expected = {4, 0, 0};
static const dri_version_t drm_expected = {0, 0, NOUVEAU_DRM_HEADER_PATCHLEVEL};
-
+
assert(dri);
assert(drm);
assert(ddx);
-
+
if (dri->major != dri_expected.major || dri->minor < dri_expected.minor)
{
NOUVEAU_ERR("Unexpected DRI version.\n");
@@ -43,17 +43,17 @@ int nouveau_check_dri_drm_ddx(dri_version_t *dri, dri_version_t *drm, dri_versio
NOUVEAU_ERR("Unexpected DDX version.\n");
return 1;
}
-
+
return 0;
}
int
nouveau_screen_create(dri_screen_t *dri_screen, dri_framebuffer_t *dri_framebuf)
-{
+{
struct nouveau_dri *nv_dri = dri_framebuf->private;
struct nouveau_screen *nv_screen;
int ret;
-
+
if (nouveau_check_dri_drm_ddx(&dri_screen->dri, &dri_screen->drm, &dri_screen->ddx))
return 1;
@@ -89,4 +89,3 @@ nouveau_screen_destroy(dri_screen_t *dri_screen)
FREE(nv_screen);
}
-
diff --git a/src/gallium/winsys/g3dvl/nouveau/nouveau_winsys.c b/src/gallium/winsys/g3dvl/nouveau/nouveau_winsys.c
index 43de49b98bb..ce4052d5572 120000
--- a/src/gallium/winsys/g3dvl/nouveau/nouveau_winsys.c
+++ b/src/gallium/winsys/g3dvl/nouveau/nouveau_winsys.c
@@ -1 +1 @@
-../../dri/nouveau/nouveau_winsys.c \ No newline at end of file
+../../drm/nouveau/nouveau_winsys.c \ No newline at end of file
diff --git a/src/gallium/winsys/g3dvl/nouveau/nouveau_winsys_pipe.c b/src/gallium/winsys/g3dvl/nouveau/nouveau_winsys_pipe.c
index b835bd57606..4f6ac9cad0b 100644
--- a/src/gallium/winsys/g3dvl/nouveau/nouveau_winsys_pipe.c
+++ b/src/gallium/winsys/g3dvl/nouveau/nouveau_winsys_pipe.c
@@ -1,7 +1,7 @@
#include "pipe/p_winsys.h"
#include "pipe/p_defines.h"
-#include "pipe/p_util.h"
#include "pipe/p_inlines.h"
+#include "util/u_memory.h"
#include "nouveau_context.h"
#include "nouveau_local.h"
@@ -29,7 +29,7 @@ static struct pipe_surface *
nouveau_surface_alloc(struct pipe_winsys *ws)
{
struct pipe_surface *surf;
-
+
surf = CALLOC_STRUCT(pipe_surface);
if (!surf)
return NULL;
@@ -59,10 +59,10 @@ nouveau_surface_alloc_storage
)
{
const unsigned int ALIGNMENT = 256;
-
+
assert(pws);
assert(surface);
-
+
surface->width = width;
surface->height = height;
surface->format = format;
@@ -72,7 +72,7 @@ nouveau_surface_alloc_storage
surface->stride = round_up(surface->nblocksx * surface->block.size, ALIGNMENT);
surface->usage = flags;
surface->buffer = pws->buffer_create(pws, ALIGNMENT, PIPE_BUFFER_USAGE_PIXEL, surface->stride * surface->nblocksy);
-
+
return 0;
}
@@ -84,7 +84,7 @@ nouveau_surface_release(struct pipe_winsys *ws, struct pipe_surface **s)
*s = NULL;
if (--surf->refcount <= 0) {
if (surf->buffer)
- pipe_buffer_reference(ws, &surf->buffer, NULL);
+ winsys_buffer_reference(ws, &surf->buffer, NULL);
free(surf);
}
}
@@ -258,4 +258,3 @@ nouveau_create_pipe_winsys(struct nouveau_context *nv)
return &nvpws->pws;
}
-
diff --git a/src/gallium/winsys/g3dvl/nouveau/nouveau_winsys_pipe.h b/src/gallium/winsys/g3dvl/nouveau/nouveau_winsys_pipe.h
index 264716fef04..9d9460883e0 120000
--- a/src/gallium/winsys/g3dvl/nouveau/nouveau_winsys_pipe.h
+++ b/src/gallium/winsys/g3dvl/nouveau/nouveau_winsys_pipe.h
@@ -1 +1 @@
-../../dri/nouveau/nouveau_winsys_pipe.h \ No newline at end of file
+../../drm/nouveau/nouveau_winsys_pipe.h \ No newline at end of file
diff --git a/src/gallium/winsys/g3dvl/nouveau/nouveau_winsys_softpipe.c b/src/gallium/winsys/g3dvl/nouveau/nouveau_winsys_softpipe.c
index 83faccde969..ec613ecbf65 120000
--- a/src/gallium/winsys/g3dvl/nouveau/nouveau_winsys_softpipe.c
+++ b/src/gallium/winsys/g3dvl/nouveau/nouveau_winsys_softpipe.c
@@ -1 +1 @@
-../../dri/nouveau/nouveau_winsys_softpipe.c \ No newline at end of file
+../../drm/nouveau/nouveau_winsys_softpipe.c \ No newline at end of file
diff --git a/src/gallium/winsys/g3dvl/nouveau/nv04_surface.c b/src/gallium/winsys/g3dvl/nouveau/nv04_surface.c
index e05f0671d63..4455d8f9243 120000
--- a/src/gallium/winsys/g3dvl/nouveau/nv04_surface.c
+++ b/src/gallium/winsys/g3dvl/nouveau/nv04_surface.c
@@ -1 +1 @@
-../../dri/nouveau/nv04_surface.c \ No newline at end of file
+../../drm/nouveau/nv04_surface.c \ No newline at end of file
diff --git a/src/gallium/winsys/g3dvl/nouveau/nv50_surface.c b/src/gallium/winsys/g3dvl/nouveau/nv50_surface.c
index 3850748229d..19f102001e9 120000
--- a/src/gallium/winsys/g3dvl/nouveau/nv50_surface.c
+++ b/src/gallium/winsys/g3dvl/nouveau/nv50_surface.c
@@ -1 +1 @@
-../../dri/nouveau/nv50_surface.c \ No newline at end of file
+../../drm/nouveau/nv50_surface.c \ No newline at end of file