Mesa (master): tgsi: add interpolation location modifier support to text parser
Ilia Mirkin
imirkin at kemper.freedesktop.org
Wed Jul 9 23:47:37 UTC 2014
Module: Mesa
Branch: master
Commit: 532eb72be3894329eb751813f84882cf82478b8c
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=532eb72be3894329eb751813f84882cf82478b8c
Author: Ilia Mirkin <imirkin at alum.mit.edu>
Date: Fri Jul 4 23:27:11 2014 -0400
tgsi: add interpolation location modifier support to text parser
Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
---
src/gallium/auxiliary/tgsi/tgsi_text.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
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,
More information about the mesa-commit
mailing list