gallium: remove TGSI_SEMANTIC_VERTICES
authorZack Rusin <zackr@vmware.com>
Thu, 24 Dec 2009 18:08:36 +0000 (13:08 -0500)
committerZack Rusin <zackr@vmware.com>
Fri, 25 Dec 2009 10:52:20 +0000 (05:52 -0500)
it's a leftover from an early version of geometry shading support.
geometry shaders now encode the primitive size in the PROPERTY token
and don't need special input with their size.

src/gallium/auxiliary/draw/draw_gs.c
src/gallium/auxiliary/tgsi/tgsi_dump.c
src/gallium/auxiliary/tgsi/tgsi_text.c
src/gallium/include/pipe/p_shader_tokens.h

index 3edfb6410dc280f967b58f04c0cec35d221714d7..5db2e755423c900bd3ca083f46c06dcbc2b5d3e0 100644 (file)
@@ -188,12 +188,12 @@ static void draw_fetch_geometry_input(struct draw_geometry_shader *shader,
       /*debug_printf("Slot = %d (semantic = %d)\n", slot,
         shader->info.input_semantic_name[slot]);*/
       if (shader->info.input_semantic_name[slot] ==
-          TGSI_SEMANTIC_VERTICES) {
+          TGSI_SEMANTIC_PRIMID) {
          for (j = 0; j < num_primitives; ++j) {
-            machine->Inputs[idx].xyzw[0].f[j] = (float)num_vertices;
-            machine->Inputs[idx].xyzw[1].f[j] = (float)num_vertices;
-            machine->Inputs[idx].xyzw[2].f[j] = (float)num_vertices;
-            machine->Inputs[idx].xyzw[3].f[j] = (float)num_vertices;
+            machine->Inputs[idx].xyzw[0].f[j] = (float)start_primitive + j;
+            machine->Inputs[idx].xyzw[1].f[j] = (float)start_primitive + j;
+            machine->Inputs[idx].xyzw[2].f[j] = (float)start_primitive + j;
+            machine->Inputs[idx].xyzw[3].f[j] = (float)start_primitive + j;
          }
          ++idx;
       } else {
@@ -296,8 +296,7 @@ void draw_geometry_shader_run(struct draw_geometry_shader *shader,
    machine->Consts = constants;
 
    for (i = 0; i < shader->info.num_inputs; ++i) {
-      if (shader->info.input_semantic_name[i] != TGSI_SEMANTIC_VERTICES &&
-          shader->info.input_semantic_name[i] != TGSI_SEMANTIC_PRIMID)
+      if (shader->info.input_semantic_name[i] != TGSI_SEMANTIC_PRIMID)
          ++inputs_from_vs;
    }
 
index 5bfe0198f4a50ac60acbea3f0987f2f7fcfe4e36..a16f7c728e7f523606363fb7d0c719dd8c73daf2 100644 (file)
@@ -123,7 +123,6 @@ static const char *semantic_names[] =
    "NORMAL",
    "FACE",
    "EDGEFLAG",
-   "VERTICES_IN",
    "PRIM_ID"
 };
 
index 825d17a4de32093f9e1238aa61372d59873cd7c8..2e3f9a90e3aed5a3fa0aaf0e522abf884c4ba142 100644 (file)
@@ -932,7 +932,6 @@ static const char *semantic_names[TGSI_SEMANTIC_COUNT] =
    "GENERIC",
    "NORMAL",
    "FACE",
-   "VERTICES_IN",
    "PRIM_ID"
 };
 
index 3e7335b4553e4bdf2d78241b57ac6d891044fcc8..7b19364b9754fa2426d553af33a0ea1b538cf0c1 100644 (file)
@@ -130,9 +130,8 @@ struct tgsi_declaration_range
 #define TGSI_SEMANTIC_NORMAL    6
 #define TGSI_SEMANTIC_FACE      7
 #define TGSI_SEMANTIC_EDGEFLAG  8
-#define TGSI_SEMANTIC_VERTICES  9
-#define TGSI_SEMANTIC_PRIMID   10
-#define TGSI_SEMANTIC_COUNT    11 /**< number of semantic values */
+#define TGSI_SEMANTIC_PRIMID    9
+#define TGSI_SEMANTIC_COUNT    10 /**< number of semantic values */
 
 struct tgsi_declaration_semantic
 {