summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nv04/nv04_screen.c
diff options
context:
space:
mode:
authorZack Rusin <[email protected]>2009-02-02 23:47:16 -0500
committerZack Rusin <[email protected]>2009-02-02 23:47:16 -0500
commit5069bfed29bcee2c89c36c74c6d65d388eb7792e (patch)
tree2aef5035140ca24eef97b5d328e0c29d0460f3a8 /src/gallium/drivers/nv04/nv04_screen.c
parentdf73c964d85d2f44d8c62558b5752b2f4443763f (diff)
gallium: remove pipe_buffer from surfaces
this change disassociates, at least from the driver perspective, the surface from buffer. surfaces are technically now views on the textures so make it so by hiding the buffer in the internals of textures.
Diffstat (limited to 'src/gallium/drivers/nv04/nv04_screen.c')
-rw-r--r--src/gallium/drivers/nv04/nv04_screen.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/gallium/drivers/nv04/nv04_screen.c b/src/gallium/drivers/nv04/nv04_screen.c
index 2ae67840770..e5e3d4772aa 100644
--- a/src/gallium/drivers/nv04/nv04_screen.c
+++ b/src/gallium/drivers/nv04/nv04_screen.c
@@ -1,4 +1,5 @@
#include "pipe/p_screen.h"
+#include "pipe/p_inlines.h"
#include "util/u_simple_screen.h"
#include "nv04_context.h"
@@ -122,10 +123,10 @@ static void *
nv04_surface_map(struct pipe_screen *screen, struct pipe_surface *surface,
unsigned flags )
{
- struct pipe_winsys *ws = screen->winsys;
void *map;
+ struct nv04_miptree *nv04mt = (struct nv04_miptree *)surface->texture;
- map = ws->buffer_map(ws, surface->buffer, flags);
+ map = pipe_buffer_map(screen, nv04mt->buffer, flags);
if (!map)
return NULL;
@@ -135,9 +136,9 @@ nv04_surface_map(struct pipe_screen *screen, struct pipe_surface *surface,
static void
nv04_surface_unmap(struct pipe_screen *screen, struct pipe_surface *surface)
{
- struct pipe_winsys *ws = screen->winsys;
+ struct nv04_miptree *nv04mt = (struct nv04_miptree *)surface->texture;
- ws->buffer_unmap(ws, surface->buffer);
+ pipe_buffer_unmap(screen, nv04mt->buffer);
}
static void