diff options
Diffstat (limited to 'src/mesa/pipe/cell/ppu')
-rw-r--r-- | src/mesa/pipe/cell/ppu/cell_state.h | 1 | ||||
-rw-r--r-- | src/mesa/pipe/cell/ppu/cell_state_derived.c | 5 | ||||
-rw-r--r-- | src/mesa/pipe/cell/ppu/cell_state_emit.c | 6 |
3 files changed, 12 insertions, 0 deletions
diff --git a/src/mesa/pipe/cell/ppu/cell_state.h b/src/mesa/pipe/cell/ppu/cell_state.h index fbca7c9574..3a71ba14fa 100644 --- a/src/mesa/pipe/cell/ppu/cell_state.h +++ b/src/mesa/pipe/cell/ppu/cell_state.h @@ -19,6 +19,7 @@ #define CELL_NEW_VERTEX 0x1000 #define CELL_NEW_VS 0x2000 #define CELL_NEW_CONSTANTS 0x4000 +#define CELL_NEW_VERTEX_INFO 0x8000 diff --git a/src/mesa/pipe/cell/ppu/cell_state_derived.c b/src/mesa/pipe/cell/ppu/cell_state_derived.c index f3b3ae8544..56daf5dfde 100644 --- a/src/mesa/pipe/cell/ppu/cell_state_derived.c +++ b/src/mesa/pipe/cell/ppu/cell_state_derived.c @@ -30,6 +30,7 @@ #include "pipe/draw/draw_context.h" #include "pipe/draw/draw_vertex.h" #include "cell_context.h" +#include "cell_batch.h" #include "cell_state.h" #include "cell_state_emit.h" @@ -85,6 +86,7 @@ calculate_vertex_layout( struct cell_context *cell ) assert(src >= 0); draw_emit_vertex_attr(vinfo, EMIT_4F, INTERP_POS, src); + /* * Loop over fragment shader inputs, searching for the matching output * from the vertex shader. @@ -126,6 +128,9 @@ calculate_vertex_layout( struct cell_context *cell ) } draw_compute_vertex_size(vinfo); + + /* XXX only signal this if format really changes */ + cell->dirty |= CELL_NEW_VERTEX_INFO; } diff --git a/src/mesa/pipe/cell/ppu/cell_state_emit.c b/src/mesa/pipe/cell/ppu/cell_state_emit.c index e7d14d0d25..e5b7c92514 100644 --- a/src/mesa/pipe/cell/ppu/cell_state_emit.c +++ b/src/mesa/pipe/cell/ppu/cell_state_emit.c @@ -49,4 +49,10 @@ cell_emit_state(struct cell_context *cell) cell_batch_append(cell, cell->sampler[0], sizeof(struct pipe_sampler_state)); } + + if (cell->dirty & CELL_NEW_VERTEX_INFO) { + uint cmd = CELL_CMD_STATE_VERTEX_INFO; + cell_batch_append(cell, &cmd, 4); + cell_batch_append(cell, &cell->vertex_info, sizeof(struct vertex_info)); + } } |