summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nv10
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/nv10')
-rw-r--r--src/gallium/drivers/nv10/nv10_miptree.c1
-rw-r--r--src/gallium/drivers/nv10/nv10_screen.c6
-rw-r--r--src/gallium/drivers/nv10/nv10_state_emit.c7
3 files changed, 9 insertions, 5 deletions
diff --git a/src/gallium/drivers/nv10/nv10_miptree.c b/src/gallium/drivers/nv10/nv10_miptree.c
index f8c021261bc..909278213ee 100644
--- a/src/gallium/drivers/nv10/nv10_miptree.c
+++ b/src/gallium/drivers/nv10/nv10_miptree.c
@@ -114,7 +114,6 @@ nv10_miptree_surface_get(struct pipe_screen *screen, struct pipe_texture *pt,
if (!ps)
return NULL;
pipe_texture_reference(&ps->texture, pt);
- pipe_buffer_reference(screen, &ps->buffer, nv10mt->buffer);
ps->format = pt->format;
ps->width = pt->width[level];
ps->height = pt->height[level];
diff --git a/src/gallium/drivers/nv10/nv10_screen.c b/src/gallium/drivers/nv10/nv10_screen.c
index 12516fd71e7..2f945a193cc 100644
--- a/src/gallium/drivers/nv10/nv10_screen.c
+++ b/src/gallium/drivers/nv10/nv10_screen.c
@@ -122,8 +122,9 @@ nv10_surface_map(struct pipe_screen *screen, struct pipe_surface *surface,
{
struct pipe_winsys *ws = screen->winsys;
void *map;
+ struct nv10_miptree *nv10mt = (struct nv10_miptree *)surface->texture;
- map = ws->buffer_map(ws, surface->buffer, flags);
+ map = ws->buffer_map(ws, nv10mt->buffer, flags);
if (!map)
return NULL;
@@ -134,8 +135,9 @@ static void
nv10_surface_unmap(struct pipe_screen *screen, struct pipe_surface *surface)
{
struct pipe_winsys *ws = screen->winsys;
+ struct nv10_miptree *nv10mt = (struct nv10_miptree *)surface->texture;
- ws->buffer_unmap(ws, surface->buffer);
+ ws->buffer_unmap(ws, nv10mt->buffer);
}
static void
diff --git a/src/gallium/drivers/nv10/nv10_state_emit.c b/src/gallium/drivers/nv10/nv10_state_emit.c
index 46c7e1d7536..5dec618b933 100644
--- a/src/gallium/drivers/nv10/nv10_state_emit.c
+++ b/src/gallium/drivers/nv10/nv10_state_emit.c
@@ -106,6 +106,7 @@ static void nv10_state_emit_framebuffer(struct nv10_context* nv10)
struct pipe_surface *rt, *zeta = NULL;
uint32_t rt_format, w, h;
int colour_format = 0, zeta_format = 0;
+ struct nv10_miptree *nv10mt = 0;
w = fb->cbufs[0]->width;
h = fb->cbufs[0]->height;
@@ -147,11 +148,13 @@ static void nv10_state_emit_framebuffer(struct nv10_context* nv10)
OUT_RING (rt->stride | (rt->stride << 16));
}
- nv10->rt[0] = rt->buffer;
+ nv10mt = (struct nv10_miptree *)rt->texture;
+ nv10->rt[0] = nv10mt->buffer;
if (zeta_format)
{
- nv10->zeta = zeta->buffer;
+ nv10mt = (struct nv10_miptree *)zeta->texture;
+ nv10->zeta = nv10mt->buffer;
}
BEGIN_RING(celsius, NV10TCL_RT_HORIZ, 3);