diff options
author | Alex Deucher <alexdeucher@gmail.com> | 2009-07-17 14:46:40 -0400 |
---|---|---|
committer | Alex Deucher <alexdeucher@gmail.com> | 2009-07-17 14:46:40 -0400 |
commit | e910f6831b4e7033a0d5cbd83bdab191d622bad0 (patch) | |
tree | f5a386cad3583d60757e2837418b734f09e76295 /src/mesa/state_tracker | |
parent | 79a170108f1d9cad949cd2a34e4de597beae72db (diff) | |
parent | 30bccf8ea9cd84d1a52a31b6f86b783dfb919374 (diff) |
Merge branch 'master' of git+ssh://agd5f@git.freedesktop.org/git/mesa/mesa into r6xx-rewrite
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r-- | src/mesa/state_tracker/st_program.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c index e4d3bb33c7..806e0ca8f6 100644 --- a/src/mesa/state_tracker/st_program.c +++ b/src/mesa/state_tracker/st_program.c @@ -151,6 +151,7 @@ st_translate_vertex_program(struct st_context *st, case VERT_ATTRIB_TEX5: case VERT_ATTRIB_TEX6: case VERT_ATTRIB_TEX7: + assert(slot < Elements(vs_input_semantic_name)); vs_input_semantic_name[slot] = TGSI_SEMANTIC_GENERIC; vs_input_semantic_index[slot] = num_generic++; break; @@ -171,6 +172,7 @@ st_translate_vertex_program(struct st_context *st, case VERT_ATTRIB_GENERIC14: case VERT_ATTRIB_GENERIC15: assert(attr < VERT_ATTRIB_MAX); + assert(slot < Elements(vs_input_semantic_name)); vs_input_semantic_name[slot] = TGSI_SEMANTIC_GENERIC; vs_input_semantic_index[slot] = num_generic++; break; @@ -198,6 +200,7 @@ st_translate_vertex_program(struct st_context *st, /* initialize output semantics to defaults */ for (i = 0; i < PIPE_MAX_SHADER_OUTPUTS; i++) { + assert(i < Elements(vs_output_semantic_name)); vs_output_semantic_name[i] = TGSI_SEMANTIC_GENERIC; vs_output_semantic_index[i] = 0; output_flags[i] = 0x0; @@ -273,6 +276,7 @@ st_translate_vertex_program(struct st_context *st, case VERT_RESULT_VAR0: /* fall-through */ default: + assert(slot < Elements(vs_output_semantic_name)); if (outputSemanticName) { /* use provided semantic into */ assert(outputSemanticName[attr] != TGSI_SEMANTIC_COUNT); @@ -286,6 +290,7 @@ st_translate_vertex_program(struct st_context *st, } } + assert(slot < Elements(output_flags)); output_flags[slot] = stvp->Base.Base.OutputFlags[attr]; } } |