summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/nv20/nv20_state_emit.c
diff options
context:
space:
mode:
authorYounes Manton <younes.m@gmail.com>2009-02-25 12:55:26 -0500
committerYounes Manton <younes.m@gmail.com>2009-02-25 12:56:00 -0500
commita0dc286b5fecec1ede014cb5702368a60cbb22bc (patch)
tree7def0bcb025d1495cf41ea7aa54fca763ae60e10 /src/gallium/drivers/nv20/nv20_state_emit.c
parent5726a5afa56e18b1662a8b03cf36c77e2d8b3114 (diff)
nouveau: nv04-nv40 texture transfer.
Diffstat (limited to 'src/gallium/drivers/nv20/nv20_state_emit.c')
-rw-r--r--src/gallium/drivers/nv20/nv20_state_emit.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/gallium/drivers/nv20/nv20_state_emit.c b/src/gallium/drivers/nv20/nv20_state_emit.c
index 0f4df9ca31..4042f46d05 100644
--- a/src/gallium/drivers/nv20/nv20_state_emit.c
+++ b/src/gallium/drivers/nv20/nv20_state_emit.c
@@ -109,7 +109,7 @@ static void nv20_state_emit_scissor(struct nv20_context* nv20)
static void nv20_state_emit_framebuffer(struct nv20_context* nv20)
{
struct pipe_framebuffer_state* fb = nv20->framebuffer;
- struct pipe_surface *rt, *zeta = NULL;
+ struct nv04_surface *rt, *zeta = NULL;
uint32_t rt_format, w, h;
int colour_format = 0, zeta_format = 0;
struct nv20_miptree *nv20mt = 0;
@@ -117,7 +117,7 @@ static void nv20_state_emit_framebuffer(struct nv20_context* nv20)
w = fb->cbufs[0]->width;
h = fb->cbufs[0]->height;
colour_format = fb->cbufs[0]->format;
- rt = fb->cbufs[0];
+ rt = (struct nv04_surface *)fb->cbufs[0];
if (fb->zsbuf) {
if (colour_format) {
@@ -129,7 +129,7 @@ static void nv20_state_emit_framebuffer(struct nv20_context* nv20)
}
zeta_format = fb->zsbuf->format;
- zeta = fb->zsbuf;
+ zeta = (struct nv04_surface *)fb->zsbuf;
}
rt_format = NV20TCL_RT_FORMAT_TYPE_LINEAR | 0x20;
@@ -148,18 +148,18 @@ static void nv20_state_emit_framebuffer(struct nv20_context* nv20)
if (zeta) {
BEGIN_RING(kelvin, NV20TCL_RT_PITCH, 1);
- OUT_RING (rt->stride | (zeta->stride << 16));
+ OUT_RING (rt->pitch | (zeta->pitch << 16));
} else {
BEGIN_RING(kelvin, NV20TCL_RT_PITCH, 1);
- OUT_RING (rt->stride | (rt->stride << 16));
+ OUT_RING (rt->pitch | (rt->pitch << 16));
}
- nv20mt = (struct nv20_miptree *)rt->texture;
+ nv20mt = (struct nv20_miptree *)rt->base.texture;
nv20->rt[0] = nv20mt->buffer;
if (zeta_format)
{
- nv20mt = (struct nv20_miptree *)zeta->texture;
+ nv20mt = (struct nv20_miptree *)zeta->base.texture;
nv20->zeta = nv20mt->buffer;
}