summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/nv20
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2009-10-19 09:28:59 +1000
committerBen Skeggs <bskeggs@redhat.com>2009-10-19 09:49:02 +1000
commit35b98e2884bd7c76c43fa08d5bb0a8f1396d3298 (patch)
tree94bb8d699cb282bb31d268be6dbf8d0c0b7121b3 /src/gallium/drivers/nv20
parent869d3eea37ee060d62cd5b7f6031ef5a93e328a1 (diff)
nouveau: implement is_{texture,buffer}_referenced properly
Diffstat (limited to 'src/gallium/drivers/nv20')
-rw-r--r--src/gallium/drivers/nv20/nv20_context.c28
-rw-r--r--src/gallium/drivers/nv20/nv20_context.h1
2 files changed, 3 insertions, 26 deletions
diff --git a/src/gallium/drivers/nv20/nv20_context.c b/src/gallium/drivers/nv20/nv20_context.c
index b32d0d83ba..9a48739661 100644
--- a/src/gallium/drivers/nv20/nv20_context.c
+++ b/src/gallium/drivers/nv20/nv20_context.c
@@ -380,30 +380,6 @@ nv20_set_edgeflags(struct pipe_context *pipe, const unsigned *bitfield)
{
}
-
-static unsigned int
-nv20_is_texture_referenced( struct pipe_context *pipe,
- struct pipe_texture *texture,
- unsigned face, unsigned level)
-{
- /**
- * FIXME: Optimize.
- */
-
- return PIPE_REFERENCED_FOR_READ | PIPE_REFERENCED_FOR_WRITE;
-}
-
-static unsigned int
-nv20_is_buffer_referenced( struct pipe_context *pipe,
- struct pipe_buffer *buf)
-{
- /**
- * FIXME: Optimize.
- */
-
- return PIPE_REFERENCED_FOR_READ | PIPE_REFERENCED_FOR_WRITE;
-}
-
struct pipe_context *
nv20_create(struct pipe_screen *pscreen, unsigned pctx_id)
{
@@ -429,8 +405,8 @@ nv20_create(struct pipe_screen *pscreen, unsigned pctx_id)
nv20->pipe.clear = nv20_clear;
nv20->pipe.flush = nv20_flush;
- nv20->pipe.is_texture_referenced = nv20_is_texture_referenced;
- nv20->pipe.is_buffer_referenced = nv20_is_buffer_referenced;
+ nv20->pipe.is_texture_referenced = nouveau_is_texture_referenced;
+ nv20->pipe.is_buffer_referenced = nouveau_is_buffer_referenced;
nv20_init_surface_functions(nv20);
nv20_init_state_functions(nv20);
diff --git a/src/gallium/drivers/nv20/nv20_context.h b/src/gallium/drivers/nv20/nv20_context.h
index fc932f1f90..a4eaa95660 100644
--- a/src/gallium/drivers/nv20/nv20_context.h
+++ b/src/gallium/drivers/nv20/nv20_context.h
@@ -13,6 +13,7 @@
#include "nouveau/nouveau_winsys.h"
#include "nouveau/nouveau_gldefs.h"
+#include "nouveau/nouveau_context.h"
#define NOUVEAU_PUSH_CONTEXT(ctx) \
struct nv20_screen *ctx = nv20->screen