Mesa (gallium-fb-dimensions): cell: attempt to update for framebuffer changes
Keith Whitwell
keithw at kemper.freedesktop.org
Thu Jan 7 16:28:59 UTC 2010
Module: Mesa
Branch: gallium-fb-dimensions
Commit: 397ad1ccbc583a5d18a547027542122eb30e0d09
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=397ad1ccbc583a5d18a547027542122eb30e0d09
Author: Keith Whitwell <keithw at vmware.com>
Date: Thu Jan 7 16:27:53 2010 +0000
cell: attempt to update for framebuffer changes
---
src/gallium/drivers/cell/ppu/cell_context.h | 3 +++
src/gallium/drivers/cell/ppu/cell_pipe_state.c | 6 ++++--
src/gallium/drivers/cell/ppu/cell_state_emit.c | 4 ++--
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 5c3188e..659eed6 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 c18a5d0..b548395 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 5b87286..8b5c41f 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));
More information about the mesa-commit
mailing list