summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/nv20/nv20_state_emit.c
diff options
context:
space:
mode:
authorZack Rusin <zackr@vmware.com>2009-02-02 23:47:16 -0500
committerZack Rusin <zackr@vmware.com>2009-02-02 23:47:16 -0500
commit5069bfed29bcee2c89c36c74c6d65d388eb7792e (patch)
tree2aef5035140ca24eef97b5d328e0c29d0460f3a8 /src/gallium/drivers/nv20/nv20_state_emit.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/nv20/nv20_state_emit.c')
-rw-r--r--src/gallium/drivers/nv20/nv20_state_emit.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gallium/drivers/nv20/nv20_state_emit.c b/src/gallium/drivers/nv20/nv20_state_emit.c
index ea20078a50..0f4df9ca31 100644
--- a/src/gallium/drivers/nv20/nv20_state_emit.c
+++ b/src/gallium/drivers/nv20/nv20_state_emit.c
@@ -112,6 +112,7 @@ static void nv20_state_emit_framebuffer(struct nv20_context* nv20)
struct pipe_surface *rt, *zeta = NULL;
uint32_t rt_format, w, h;
int colour_format = 0, zeta_format = 0;
+ struct nv20_miptree *nv20mt = 0;
w = fb->cbufs[0]->width;
h = fb->cbufs[0]->height;
@@ -153,11 +154,13 @@ static void nv20_state_emit_framebuffer(struct nv20_context* nv20)
OUT_RING (rt->stride | (rt->stride << 16));
}
- nv20->rt[0] = rt->buffer;
+ nv20mt = (struct nv20_miptree *)rt->texture;
+ nv20->rt[0] = nv20mt->buffer;
if (zeta_format)
{
- nv20->zeta = zeta->buffer;
+ nv20mt = (struct nv20_miptree *)zeta->texture;
+ nv20->zeta = nv20mt->buffer;
}
BEGIN_RING(kelvin, NV20TCL_RT_HORIZ, 3);