summaryrefslogtreecommitdiff
path: root/src/mesa/pipe
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/pipe')
-rw-r--r--src/mesa/pipe/draw/draw_feedback.c7
-rw-r--r--src/mesa/pipe/tgsi/mesa/mesa_to_tgsi.c4
2 files changed, 6 insertions, 5 deletions
diff --git a/src/mesa/pipe/draw/draw_feedback.c b/src/mesa/pipe/draw/draw_feedback.c
index 3b8400233e..ee54db0ad5 100644
--- a/src/mesa/pipe/draw/draw_feedback.c
+++ b/src/mesa/pipe/draw/draw_feedback.c
@@ -78,11 +78,9 @@ feedback_vertex(struct draw_stage *stage, const struct vertex_header *vertex)
* we can either address output buffer 0 (for interleaving) or
* output buffer i (for non-interleaved).
*/
-#if 0
for (i = 0; i < feedback->num_attribs; i++) {
- const uint attr = feedback->attrib[i];
- const uint slot = stage->draw->vertex_info.attrib_to_slot[attr];
- const float *src = attr ? vertex->data[slot] : vertex->clip;
+ const uint slot = feedback->attrib[i];
+ const float *src = slot ? vertex->data[slot] : vertex->clip;
const uint size = feedback->size[i];
float *dest = fs->dest[i * select];
@@ -104,7 +102,6 @@ feedback_vertex(struct draw_stage *stage, const struct vertex_header *vertex)
}
fs->dest[i * select] += size;
}
-#endif
fs->num_vert_emitted++;
}
diff --git a/src/mesa/pipe/tgsi/mesa/mesa_to_tgsi.c b/src/mesa/pipe/tgsi/mesa/mesa_to_tgsi.c
index d0d97ab0f8..fa27fd3cd0 100644
--- a/src/mesa/pipe/tgsi/mesa/mesa_to_tgsi.c
+++ b/src/mesa/pipe/tgsi/mesa/mesa_to_tgsi.c
@@ -476,6 +476,8 @@ make_input_decl(
{
struct tgsi_full_declaration decl;
+ assert(semantic_name < TGSI_SEMANTIC_COUNT);
+
decl = tgsi_default_full_declaration();
decl.Declaration.File = TGSI_FILE_INPUT;
decl.Declaration.Declare = TGSI_DECLARE_RANGE;
@@ -500,6 +502,8 @@ make_output_decl(
{
struct tgsi_full_declaration decl;
+ assert(semantic_name < TGSI_SEMANTIC_COUNT);
+
decl = tgsi_default_full_declaration();
decl.Declaration.File = TGSI_FILE_OUTPUT;
decl.Declaration.Declare = TGSI_DECLARE_RANGE;