summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBen Skeggs <[email protected]>2008-03-21 12:57:05 +1100
committerBen Skeggs <[email protected]>2008-03-21 12:57:05 +1100
commit95e8cad9a38181052790b34837daa6717e0c5171 (patch)
tree66c85313bbf20a9bb1f978a192c0d3c97a3b4e85 /src
parent85108e5f8f3fd1ace813cb6eac6e82af4a2e2c7a (diff)
nv40: use new pipe_framebuffer width/height fields
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/nv40/nv40_state_fb.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/src/gallium/drivers/nv40/nv40_state_fb.c b/src/gallium/drivers/nv40/nv40_state_fb.c
index 71795ab1824..107b4400283 100644
--- a/src/gallium/drivers/nv40/nv40_state_fb.c
+++ b/src/gallium/drivers/nv40/nv40_state_fb.c
@@ -5,10 +5,12 @@ nv40_state_framebuffer_validate(struct nv40_context *nv40)
{
struct pipe_framebuffer_state *fb = &nv40->framebuffer;
struct pipe_surface *rt[4], *zeta;
- uint32_t rt_enable, rt_format, w, h;
+ uint32_t rt_enable, rt_format;
int i, colour_format = 0, zeta_format = 0;
struct nouveau_stateobj *so = so_new(64, 10);
unsigned rt_flags = NOUVEAU_BO_RDWR | NOUVEAU_BO_VRAM;
+ unsigned w = fb->width;
+ unsigned h = fb->height;
rt_enable = 0;
for (i = 0; i < 4; i++) {
@@ -16,12 +18,8 @@ nv40_state_framebuffer_validate(struct nv40_context *nv40)
continue;
if (colour_format) {
- assert(w == fb->cbufs[i]->width);
- assert(h == fb->cbufs[i]->height);
assert(colour_format == fb->cbufs[i]->format);
} else {
- w = fb->cbufs[i]->width;
- h = fb->cbufs[i]->height;
colour_format = fb->cbufs[i]->format;
rt_enable |= (NV40TCL_RT_ENABLE_COLOR0 << i);
rt[i] = fb->cbufs[i];
@@ -33,14 +31,6 @@ nv40_state_framebuffer_validate(struct nv40_context *nv40)
rt_enable |= NV40TCL_RT_ENABLE_MRT;
if (fb->zsbuf) {
- if (colour_format) {
- assert(w == fb->zsbuf->width);
- assert(h == fb->zsbuf->height);
- } else {
- w = fb->zsbuf->width;
- h = fb->zsbuf->height;
- }
-
zeta_format = fb->zsbuf->format;
zeta = fb->zsbuf;
}