Handle CELL_CMD_VS_EXECUTE *only* outside batch commands.
authorIan Romanick <idr@us.ibm.com>
Thu, 31 Jan 2008 03:30:15 +0000 (19:30 -0800)
committerBen Skeggs <skeggsb@gmail.com>
Fri, 15 Feb 2008 02:50:27 +0000 (13:50 +1100)
src/mesa/pipe/cell/common.h
src/mesa/pipe/cell/spu/spu_main.c

index fbbdf728a12851b153948662c293d1c5d4407993..a40cfb8210a7555ab0aa456aa8a9505e7688e1e9 100644 (file)
@@ -133,7 +133,6 @@ struct cell_array_info
 
 struct cell_shader_info
 {
-   unsigned processor;
    unsigned num_outputs;
 
    void *declarations;
@@ -147,6 +146,7 @@ struct cell_shader_info
 #define SPU_VERTS_PER_BATCH 64
 struct cell_command_vs
 {
+   uint opcode;       /**< CELL_CMD_VS_EXECUTE */
    struct cell_shader_info   shader;
    unsigned num_elts;
    unsigned elts[SPU_VERTS_PER_BATCH];
@@ -190,6 +190,7 @@ struct cell_command
    struct cell_command_framebuffer fb;
    struct cell_command_clear_surface clear;
    struct cell_command_render render;
+   struct cell_command_vs vs;
 } ALIGN16_ATTRIB;
 
 
index 9daa3ec735ab2da386ddf9d6ff2ed0a5dce2f1e5..7105c0f8977e1f8797cb6ce6c173d058b0af023c 100644 (file)
@@ -397,11 +397,6 @@ cmd_batch(uint opcode)
          cmd_state_vs_array_info((struct cell_array_info *) &buffer[pos+1]);
          pos += (1 + sizeof(struct cell_array_info) / 4);
          break;
-      case CELL_CMD_VS_EXECUTE:
-         spu_execute_vertex_shader(&draw,
-                                   (struct cell_command_vs *) &buffer[pos+1]);
-         pos += (1 + sizeof(struct cell_command_vs) / 4);
-         break;
       default:
          printf("SPU %u: bad opcode: 0x%x\n", spu.init.id, buffer[pos]);
          ASSERT(0);
@@ -470,6 +465,9 @@ main_loop(void)
             assert(pos_incr == 0);
          }
          break;
+      case CELL_CMD_VS_EXECUTE:
+         spu_execute_vertex_shader(&draw, &cmd.vs);
+         break;
       case CELL_CMD_BATCH:
          cmd_batch(opcode);
          break;