diff options
author | Ilia Mirkin <imirkin@alum.mit.edu> | 2014-07-04 23:27:11 -0400 |
---|---|---|
committer | Ilia Mirkin <imirkin@alum.mit.edu> | 2014-07-09 19:26:32 -0400 |
commit | 532eb72be3894329eb751813f84882cf82478b8c (patch) | |
tree | 3a9915cbe0a4338a27e2415898fa71eb3bab46e2 /src/gallium/auxiliary | |
parent | 6b92a06ea32492d2ff968038672d104b711b66f0 (diff) | |
download | external_mesa3d-532eb72be3894329eb751813f84882cf82478b8c.zip external_mesa3d-532eb72be3894329eb751813f84882cf82478b8c.tar.gz external_mesa3d-532eb72be3894329eb751813f84882cf82478b8c.tar.bz2 |
tgsi: add interpolation location modifier support to text parser
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_text.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_text.c b/src/gallium/auxiliary/tgsi/tgsi_text.c index e424d99..6403344 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_text.c +++ b/src/gallium/auxiliary/tgsi/tgsi_text.c @@ -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, |