llvmpipe,i915: add back NEW_RASTERIZER dependency when computing vertex info
[mesa.git] / src / gallium / auxiliary / draw / draw_vs_exec.c
index 277d739e2c51f01ba2330ad5efdae61c236b83f4..abd64f5acd2ca20e65511ce9fd2beaad46813577 100644 (file)
@@ -129,6 +129,18 @@ vs_exec_run_linear( struct draw_vertex_shader *shader,
             unsigned vid = machine->SysSemanticToIndex[TGSI_SEMANTIC_VERTEXID];
             assert(vid < Elements(machine->SystemValue));
             machine->SystemValue[vid].i[j] = i + j;
+            /* XXX this should include base vertex. Where to get it??? */
+         }
+         if (shader->info.uses_basevertex) {
+            unsigned vid = machine->SysSemanticToIndex[TGSI_SEMANTIC_BASEVERTEX];
+            assert(vid < Elements(machine->SystemValue));
+            machine->SystemValue[vid].i[j] = 0;
+            /* XXX Where to get it??? */
+         }
+         if (shader->info.uses_vertexid_nobase) {
+            unsigned vid = machine->SysSemanticToIndex[TGSI_SEMANTIC_VERTEXID_NOBASE];
+            assert(vid < Elements(machine->SystemValue));
+            machine->SystemValue[vid].i[j] = i + j;
          }
 
          for (slot = 0; slot < shader->info.num_inputs; slot++) {
@@ -144,7 +156,7 @@ vs_exec_run_linear( struct draw_vertex_shader *shader,
             machine->Inputs[slot].xyzw[3].f[j] = input[slot][3];
          }
 
-        input = (const float (*)[4])((const char *)input + input_stride);
+         input = (const float (*)[4])((const char *)input + input_stride);
       } 
 
       tgsi_set_exec_mask(machine,
@@ -213,7 +225,7 @@ draw_create_vs_exec(struct draw_context *draw,
 {
    struct exec_vertex_shader *vs = CALLOC_STRUCT( exec_vertex_shader );
 
-   if (vs == NULL) 
+   if (!vs)
       return NULL;
 
    /* we make a private copy of the tokens */