summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2015-04-07 01:10:17 +0200
committerMarek Olšák <[email protected]>2015-06-16 15:47:03 +0200
commitaab55b0bc6086a032f44c99ad6569ea2eac128ca (patch)
treec21ca534b478724e5c7a227907867fee4f7edabe /src/mesa/state_tracker
parent42a3c1ec8471fc76eb6d3d6f1bd1739e24a5f33a (diff)
st/mesa: improve assertions in vp/fp translation
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r--src/mesa/state_tracker/st_program.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c
index d5a124f2188..fa792bc349b 100644
--- a/src/mesa/state_tracker/st_program.c
+++ b/src/mesa/state_tracker/st_program.c
@@ -286,7 +286,8 @@ st_prepare_vertex_program(struct gl_context *ctx,
/* fall through */
case VARYING_SLOT_VAR0:
default:
- assert(attr < VARYING_SLOT_MAX);
+ assert(attr >= VARYING_SLOT_VAR0 ||
+ (attr >= VARYING_SLOT_TEX0 && attr <= VARYING_SLOT_TEX7));
stvp->output_semantic_name[slot] = TGSI_SEMANTIC_GENERIC;
stvp->output_semantic_index[slot] =
st_get_generic_varying_index(st, attr);
@@ -663,7 +664,8 @@ st_translate_fragment_program(struct st_context *st,
* consumed for the TEXi varyings, and we can base the locations of
* the user varyings on VAR0. Otherwise, we use TEX0 as base index.
*/
- assert(attr >= VARYING_SLOT_TEX0);
+ assert(attr >= VARYING_SLOT_VAR0 || attr == VARYING_SLOT_PNTC ||
+ (attr >= VARYING_SLOT_TEX0 && attr <= VARYING_SLOT_TEX7));
input_semantic_name[slot] = TGSI_SEMANTIC_GENERIC;
input_semantic_index[slot] = st_get_generic_varying_index(st, attr);
if (attr == VARYING_SLOT_PNTC)