From: Brian Date: Wed, 23 Jan 2008 23:17:49 +0000 (-0700) Subject: Cell: asst. updates to sync up with today's earlier gallium changes X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f19b2d72214fe4354d1e123ebe892255a11525c3;p=mesa.git Cell: asst. updates to sync up with today's earlier gallium changes --- diff --git a/src/mesa/pipe/cell/ppu/cell_clear.c b/src/mesa/pipe/cell/ppu/cell_clear.c index 48c1c8e2c88..9f7cfdcb461 100644 --- a/src/mesa/pipe/cell/ppu/cell_clear.c +++ b/src/mesa/pipe/cell/ppu/cell_clear.c @@ -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 { diff --git a/src/mesa/pipe/cell/ppu/cell_context.h b/src/mesa/pipe/cell/ppu/cell_context.h index 1937812e2de..b6c59ff596f 100644 --- a/src/mesa/pipe/cell/ppu/cell_context.h +++ b/src/mesa/pipe/cell/ppu/cell_context.h @@ -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; diff --git a/src/mesa/pipe/cell/ppu/cell_spu.c b/src/mesa/pipe/cell/ppu/cell_spu.c index a21ab9ff3ab..5a52af1f473 100644 --- a/src/mesa/pipe/cell/ppu/cell_spu.c +++ b/src/mesa/pipe/cell/ppu/cell_spu.c @@ -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; diff --git a/src/mesa/pipe/cell/ppu/cell_state_derived.c b/src/mesa/pipe/cell/ppu/cell_state_derived.c index 1e31c11ecd2..f907ce97e69 100644 --- a/src/mesa/pipe/cell/ppu/cell_state_derived.c +++ b/src/mesa/pipe/cell/ppu/cell_state_derived.c @@ -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); } diff --git a/src/mesa/pipe/cell/ppu/cell_state_surface.c b/src/mesa/pipe/cell/ppu/cell_state_surface.c index 9bf3c339d25..1f7faca0808 100644 --- a/src/mesa/pipe/cell/ppu/cell_state_surface.c +++ b/src/mesa/pipe/cell/ppu/cell_state_surface.c @@ -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;