tgsi: add interpolation location modifier support to text parser

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
This commit is contained in:
Ilia Mirkin 2014-07-04 23:27:11 -04:00
parent 6b92a06ea3
commit 532eb72be3

View file

@ -1375,6 +1375,23 @@ static boolean parse_declaration( struct translate_ctx *ctx )
}
}
cur = ctx->cur;
eat_opt_white( &cur );
if (*cur == ',' && !is_vs_input) {
uint i;
cur++;
eat_opt_white( &cur );
for (i = 0; i < TGSI_INTERPOLATE_LOC_COUNT; i++) {
if (str_match_nocase_whole( &cur, tgsi_interpolate_locations[i] )) {
decl.Interp.Location = i;
ctx->cur = cur;
break;
}
}
}
advance = tgsi_build_full_declaration(
&decl,
ctx->tokens_cur,