[Mesa-dev] [PATCH 3/3] tgsi: add interpolation location modifier support to text parser
Ilia Mirkin
imirkin at alum.mit.edu
Fri Jul 4 21:07:03 PDT 2014
Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
---
nouveau_compiler standalone binary uses the text representation for shader
input, so this is necessary to be able to test the centroid/sample stuff
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 7e50d8d..c6134c5 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_text.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_text.c
@@ -1368,6 +1368,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,
--
1.8.5.5
More information about the mesa-dev
mailing list