mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 09:48:07 +02:00
Cell: asst. updates to sync up with today's earlier gallium changes
This commit is contained in:
parent
8de2331e43
commit
f19b2d7221
5 changed files with 11 additions and 21 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue