summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorZack Rusin <zackr@vmware.com>2009-12-24 13:08:36 -0500
committerZack Rusin <zackr@vmware.com>2009-12-25 05:52:20 -0500
commitfb0a9aa5e0476d8ca332753f52a9e56f9cfa8dfa (patch)
treefe3335d8896265da82fb8189b56e4d406f29906f /src/gallium
parentb0bc582db761ea3f47580dd2908a227987177dc2 (diff)
downloadexternal_mesa3d-fb0a9aa5e0476d8ca332753f52a9e56f9cfa8dfa.zip
external_mesa3d-fb0a9aa5e0476d8ca332753f52a9e56f9cfa8dfa.tar.gz
external_mesa3d-fb0a9aa5e0476d8ca332753f52a9e56f9cfa8dfa.tar.bz2
gallium: remove TGSI_SEMANTIC_VERTICES
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.
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/auxiliary/draw/draw_gs.c13
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_dump.c1
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_text.c1
-rw-r--r--src/gallium/include/pipe/p_shader_tokens.h5
4 files changed, 8 insertions, 12 deletions
diff --git a/src/gallium/auxiliary/draw/draw_gs.c b/src/gallium/auxiliary/draw/draw_gs.c
index 3edfb64..5db2e75 100644
--- a/src/gallium/auxiliary/draw/draw_gs.c
+++ b/src/gallium/auxiliary/draw/draw_gs.c
@@ -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;
}
diff --git a/src/gallium/auxiliary/tgsi/tgsi_dump.c b/src/gallium/auxiliary/tgsi/tgsi_dump.c
index 5bfe019..a16f7c7 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_dump.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_dump.c
@@ -123,7 +123,6 @@ static const char *semantic_names[] =
"NORMAL",
"FACE",
"EDGEFLAG",
- "VERTICES_IN",
"PRIM_ID"
};
diff --git a/src/gallium/auxiliary/tgsi/tgsi_text.c b/src/gallium/auxiliary/tgsi/tgsi_text.c
index 825d17a..2e3f9a9 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_text.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_text.c
@@ -932,7 +932,6 @@ static const char *semantic_names[TGSI_SEMANTIC_COUNT] =
"GENERIC",
"NORMAL",
"FACE",
- "VERTICES_IN",
"PRIM_ID"
};
diff --git a/src/gallium/include/pipe/p_shader_tokens.h b/src/gallium/include/pipe/p_shader_tokens.h
index 3e7335b..7b19364 100644
--- a/src/gallium/include/pipe/p_shader_tokens.h
+++ b/src/gallium/include/pipe/p_shader_tokens.h
@@ -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
{