summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/nv20/nv20_screen.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/nv20/nv20_screen.c')
-rw-r--r--src/gallium/drivers/nv20/nv20_screen.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/drivers/nv20/nv20_screen.c b/src/gallium/drivers/nv20/nv20_screen.c
index f09b364b8d..c9171fa178 100644
--- a/src/gallium/drivers/nv20/nv20_screen.c
+++ b/src/gallium/drivers/nv20/nv20_screen.c
@@ -122,8 +122,9 @@ nv20_surface_map(struct pipe_screen *screen, struct pipe_surface *surface,
{
struct pipe_winsys *ws = screen->winsys;
void *map;
+ struct nv20_miptree *nv20mt = (struct nv20_miptree *)surface->texture;
- map = ws->buffer_map(ws, surface->buffer, flags);
+ map = ws->buffer_map(ws, nv20mt->buffer, flags);
if (!map)
return NULL;
@@ -134,8 +135,9 @@ static void
nv20_surface_unmap(struct pipe_screen *screen, struct pipe_surface *surface)
{
struct pipe_winsys *ws = screen->winsys;
+ struct nv20_miptree *nv20mt = (struct nv20_miptree *)surface->texture;
- ws->buffer_unmap(ws, surface->buffer);
+ ws->buffer_unmap(ws, nv20mt->buffer);
}
static void