Cell: asst. updates to sync up with today's earlier gallium changes
authorBrian <brian.paul@tungstengraphics.com>
Wed, 23 Jan 2008 23:17:49 +0000 (16:17 -0700)
committerBrian <brian.paul@tungstengraphics.com>
Wed, 23 Jan 2008 23:17:49 +0000 (16:17 -0700)
src/mesa/pipe/cell/ppu/cell_clear.c
src/mesa/pipe/cell/ppu/cell_context.h
src/mesa/pipe/cell/ppu/cell_spu.c
src/mesa/pipe/cell/ppu/cell_state_derived.c
src/mesa/pipe/cell/ppu/cell_state_surface.c

index 48c1c8e2c88c32e368c4f923b09b8abef2933fbe..9f7cfdcb4614e5403c938f0c5b2a184c1ce68ebe 100644 (file)
@@ -53,7 +53,7 @@ cell_clear_surface(struct pipe_context *pipe, struct pipe_surface *ps,
    if (!cell->cbuf_map[0])
       cell->cbuf_map[0] = pipe_surface_map(ps);
 
-   if (ps == cell->framebuffer.zbuf) {
+   if (ps == cell->framebuffer.zsbuf) {
       surfIndex = 1;
    }
    else {
index 1937812e2de2c6cb025c337c4854c548ef7b2da7..b6c59ff596f6365501b1672e96681dc4a5bc9529 100644 (file)
@@ -82,7 +82,7 @@ struct cell_context
    struct pipe_vertex_element vertex_element[PIPE_ATTRIB_MAX];
 
    ubyte *cbuf_map[PIPE_MAX_COLOR_BUFS];
-   ubyte *zbuf_map;
+   ubyte *zsbuf_map;
 
    uint dirty;
 
index a21ab9ff3abf6633b3186f2483f522ea1769c45d..5a52af1f473aa83664bed43a0f54b591a886652a 100644 (file)
@@ -163,14 +163,14 @@ test_spus(struct cell_context *cell)
 {
    uint i;
    struct pipe_surface *csurf = cell->framebuffer.cbufs[0];
-   struct pipe_surface *zsurf = cell->framebuffer.zbuf;
+   struct pipe_surface *zsurf = cell->framebuffer.zsbuf;
 
    printf("PPU: sleep(2)\n\n\n");
    sleep(2);
 
    for (i = 0; i < cell->num_spus; i++) {
       cell_global.command[i].fb.color_start = cell->cbuf_map[0];
-      cell_global.command[i].fb.depth_start = cell->zbuf_map;
+      cell_global.command[i].fb.depth_start = cell->zsbuf_map;
       cell_global.command[i].fb.width = csurf->width;
       cell_global.command[i].fb.height = csurf->height;
       cell_global.command[i].fb.color_format = PIPE_FORMAT_A8R8G8B8_UNORM;
index 1e31c11ecd2b8567f61786d7d7f06835f4771c1a..f907ce97e691036a2bc4d08f3319e8d1b592cffa 100644 (file)
@@ -157,17 +157,7 @@ static void calculate_vertex_layout( struct cell_context *cell )
    /* XXX we also need to do this when the shading mode (interp modes) change: */
 #endif
 
-   if (1/*vinfo->attr_mask != cell->attr_mask*/) {
-      /*cell->attr_mask = vinfo->attr_mask;*/
-
-      draw_compute_vertex_size(vinfo);
-      draw_set_vertex_info(cell->draw, vinfo);
-
-#if 0
-      draw_set_twoside_attributes(cell->draw,
-                                  front0, back0, front1, back1);
-#endif
-   }
+   draw_compute_vertex_size(vinfo);
 }
 
 
index 9bf3c339d25394cc8aec7a4e25dfe024b6ec7698..1f7faca08083a317099849f4c701df76c5ca3e81 100644 (file)
@@ -42,7 +42,7 @@ cell_set_framebuffer_state(struct pipe_context *pipe,
    /* XXX revisit this memcmp! */
    if (memcmp(&cell->framebuffer, fb, sizeof(*fb))) {
       struct pipe_surface *csurf = fb->cbufs[0];
-      struct pipe_surface *zsurf = fb->zbuf;
+      struct pipe_surface *zsurf = fb->zsbuf;
       uint i;
 
       /* change in fb state */
@@ -55,9 +55,9 @@ cell_set_framebuffer_state(struct pipe_context *pipe,
          }
       }
 
-      if (cell->framebuffer.zbuf && cell->zbuf_map) {
-         pipe_surface_unmap(cell->framebuffer.zbuf);
-         cell->zbuf_map = NULL;
+      if (cell->framebuffer.zsbuf && cell->zsbuf_map) {
+         pipe_surface_unmap(cell->framebuffer.zsbuf);
+         cell->zsbuf_map = NULL;
       }
 
       /* update my state */
@@ -68,7 +68,7 @@ cell_set_framebuffer_state(struct pipe_context *pipe,
          cell->cbuf_map[0] = pipe_surface_map(csurf);
 
       if (zsurf)
-         cell->zbuf_map = pipe_surface_map(zsurf);
+         cell->zsbuf_map = pipe_surface_map(zsurf);
 
 #if 0
       for (i = 0; i < cell->num_spus; i++) {
@@ -90,7 +90,7 @@ cell_set_framebuffer_state(struct pipe_context *pipe,
          fb->opcode = CELL_CMD_FRAMEBUFFER;
          fb->color_start = cell->cbuf_map[0];
          fb->color_format = csurf->format;
-         fb->depth_start = cell->zbuf_map;
+         fb->depth_start = cell->zsbuf_map;
          fb->depth_format = zsurf ? zsurf->format : PIPE_FORMAT_NONE;
          fb->width = csurf->width;
          fb->height = csurf->height;