summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Whitwell <keithw@vmware.com>2010-01-07 16:27:53 +0000
committerKeith Whitwell <keithw@vmware.com>2010-01-07 16:27:53 +0000
commit397ad1ccbc583a5d18a547027542122eb30e0d09 (patch)
treec6addf6aa8644cf0721bf19f3b8318ef6020725e
parent94d4989e06bd0c0a66b55ebf94b3a472ec5e258e (diff)
cell: attempt to update for framebuffer changes
-rw-r--r--src/gallium/drivers/cell/ppu/cell_context.h3
-rw-r--r--src/gallium/drivers/cell/ppu/cell_pipe_state.c6
-rw-r--r--src/gallium/drivers/cell/ppu/cell_state_emit.c4
3 files changed, 9 insertions, 4 deletions
diff --git a/src/gallium/drivers/cell/ppu/cell_context.h b/src/gallium/drivers/cell/ppu/cell_context.h
index 5c3188e7f9..659eed6290 100644
--- a/src/gallium/drivers/cell/ppu/cell_context.h
+++ b/src/gallium/drivers/cell/ppu/cell_context.h
@@ -117,6 +117,9 @@ struct cell_context
struct pipe_clip_state clip;
struct pipe_constant_buffer constants[2];
struct pipe_framebuffer_state framebuffer;
+ uint framebuffer_width;
+ uint framebuffer_height;
+
struct pipe_poly_stipple poly_stipple;
struct pipe_scissor_state scissor;
struct cell_texture *texture[PIPE_MAX_SAMPLERS];
diff --git a/src/gallium/drivers/cell/ppu/cell_pipe_state.c b/src/gallium/drivers/cell/ppu/cell_pipe_state.c
index c18a5d0635..b548395c5e 100644
--- a/src/gallium/drivers/cell/ppu/cell_pipe_state.c
+++ b/src/gallium/drivers/cell/ppu/cell_pipe_state.c
@@ -358,8 +358,10 @@ cell_set_framebuffer_state(struct pipe_context *pipe,
/* update my state
* (this is also where old surfaces will finally get freed)
*/
- cell->framebuffer.width = fb->width;
- cell->framebuffer.height = fb->height;
+ util_framebuffer_uniform_size( fb,
+ &cell->framebuffer_width,
+ &cell->framebuffer_height );
+
cell->framebuffer.nr_cbufs = fb->nr_cbufs;
for (i = 0; i < PIPE_MAX_COLOR_BUFS; i++) {
pipe_surface_reference(&cell->framebuffer.cbufs[i], fb->cbufs[i]);
diff --git a/src/gallium/drivers/cell/ppu/cell_state_emit.c b/src/gallium/drivers/cell/ppu/cell_state_emit.c
index 5b87286d4c..8b5c41f475 100644
--- a/src/gallium/drivers/cell/ppu/cell_state_emit.c
+++ b/src/gallium/drivers/cell/ppu/cell_state_emit.c
@@ -204,8 +204,8 @@ cell_emit_state(struct cell_context *cell)
fb->color_format = cbuf->format;
fb->depth_start = cell->zsbuf_map;
fb->depth_format = zbuf ? zbuf->format : PIPE_FORMAT_NONE;
- fb->width = cell->framebuffer.width;
- fb->height = cell->framebuffer.height;
+ fb->width = cell->framebuffer_width;
+ fb->height = cell->framebuffer_height;
#if 0
printf("EMIT color format %s\n", pf_name(fb->color_format));
printf("EMIT depth format %s\n", pf_name(fb->depth_format));