cell: use pipe_framebuffer_state.width, height
authorBrian <brian.paul@tungstengraphics.com>
Thu, 20 Mar 2008 21:02:59 +0000 (15:02 -0600)
committerBrian <brian.paul@tungstengraphics.com>
Thu, 20 Mar 2008 21:04:08 +0000 (15:04 -0600)
src/gallium/drivers/cell/ppu/cell_state_derived.c
src/gallium/drivers/cell/ppu/cell_state_emit.c

index 5c240a55c0b55b46632843d8e3ffcbe3d75d275b..5480534ad904dda8d36b95b6d5f4bc88d5734d17 100644 (file)
@@ -141,17 +141,8 @@ calculate_vertex_layout( struct cell_context *cell )
 static void
 compute_cliprect(struct cell_context *sp)
 {
-   unsigned surfWidth, surfHeight;
-
-   if (sp->framebuffer.num_cbufs > 0) {
-      surfWidth = sp->framebuffer.cbufs[0]->width;
-      surfHeight = sp->framebuffer.cbufs[0]->height;
-   }
-   else {
-      /* no surface? */
-      surfWidth = sp->scissor.maxx;
-      surfHeight = sp->scissor.maxy;
-   }
+   uint surfWidth = sp->framebuffer.width;
+   uint surfHeight = sp->framebuffer.height;
 
    if (sp->rasterizer->scissor) {
       /* clip to scissor rect */
index 4d589bcdbf99f555c663ebce621fcfab614fe971..31cc938f074d46deb4bc1b2d230d2ec672f86d77 100644 (file)
@@ -60,8 +60,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.cbufs[0]->width;
-      fb->height = cell->framebuffer.cbufs[0]->height;
+      fb->width = cell->framebuffer.width;
+      fb->height = cell->framebuffer.height;
    }
 
    if (cell->dirty & CELL_NEW_BLEND) {