Merge branch '7.8'
[mesa.git] / src / gallium / drivers / cell / ppu / cell_vertex_shader.c
index 17141924be83a8c692ccdf05179d511d6c3b9055..3d389d6ea36c930440c5b6b923fc2e7f534fa872 100644 (file)
@@ -31,7 +31,7 @@
 
 #include "pipe/p_defines.h"
 #include "pipe/p_context.h"
-#include "pipe/p_winsys.h"
+#include "util/u_math.h"
 
 #include "cell_context.h"
 #include "cell_draw_arrays.h"
@@ -50,6 +50,7 @@
 void
 cell_vertex_shader_queue_flush(struct draw_context *draw)
 {
+#if 0
    struct cell_context *const cell =
        (struct cell_context *) draw->driver_private;
    struct cell_command_vs *const vs = &cell_global.command[0].vs;
@@ -69,7 +70,7 @@ cell_vertex_shader_queue_flush(struct draw_context *draw)
    batch = cell_batch_alloc(cell, sizeof(batch[0]) + sizeof(*cf));
    batch[0] = CELL_CMD_STATE_ATTRIB_FETCH;
    cf = (struct cell_attribute_fetch_code *) (&batch[1]);
-   cf->base = cell->attrib_fetch.store;
+   cf->base = (uint64_t) cell->attrib_fetch.store;
    cf->size = ROUNDUP16((unsigned)((void *) cell->attrib_fetch.csr 
                                   - (void *) cell->attrib_fetch.store));
 
@@ -127,14 +128,18 @@ cell_vertex_shader_queue_flush(struct draw_context *draw)
 
       for (/* empty */; j < SPU_VERTS_PER_BATCH; j++) {
          vs->elts[j] = vs->elts[0];
-         vs->vOut[j] = vs->vOut[0];
+         vs->vOut[j] = (uintptr_t) draw->vs.queue[i + j].vertex;
       }
 
       vs->num_elts = n;
       send_mbox_message(cell_global.spe_contexts[0], CELL_CMD_VS_EXECUTE);
 
-      cell_flush_int(& cell->pipe, PIPE_FLUSH_WAIT);
+      cell_flush_int(cell, CELL_FLUSH_WAIT);
    }
 
+   draw->vs.post_nr = draw->vs.queue_nr;
    draw->vs.queue_nr = 0;
+#else
+   assert(0);
+#endif
 }