From ad83f3bf0a633d5d7360c849010f01063afc1702 Mon Sep 17 00:00:00 2001 From: Michal Krol Date: Tue, 2 Feb 2010 10:42:13 +0100 Subject: tgsi: ureg_DECL_gs_input() accepts shader semantics. --- src/gallium/auxiliary/tgsi/tgsi_ureg.c | 18 +++++++++++++----- src/gallium/auxiliary/tgsi/tgsi_ureg.h | 4 +++- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/src/gallium/auxiliary/tgsi/tgsi_ureg.c b/src/gallium/auxiliary/tgsi/tgsi_ureg.c index 0ae46785bb..e31ae8b455 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_ureg.c +++ b/src/gallium/auxiliary/tgsi/tgsi_ureg.c @@ -103,6 +103,8 @@ struct ureg_program struct { unsigned index; + unsigned semantic_name; + unsigned semantic_index; } gs_input[UREG_MAX_INPUT]; unsigned nr_gs_inputs; @@ -325,10 +327,14 @@ ureg_DECL_vs_input( struct ureg_program *ureg, struct ureg_src ureg_DECL_gs_input(struct ureg_program *ureg, - unsigned index) + unsigned index, + unsigned semantic_name, + unsigned semantic_index) { if (ureg->nr_gs_inputs < UREG_MAX_INPUT) { ureg->gs_input[ureg->nr_gs_inputs].index = index; + ureg->gs_input[ureg->nr_gs_inputs].semantic_name = semantic_name; + ureg->gs_input[ureg->nr_gs_inputs].semantic_index = semantic_index; ureg->nr_gs_inputs++; } else { set_bad(ureg); @@ -1251,10 +1257,12 @@ static void emit_decls( struct ureg_program *ureg ) } } else { for (i = 0; i < ureg->nr_gs_inputs; i++) { - emit_decl_range(ureg, - TGSI_FILE_INPUT, - ureg->gs_input[i].index, - 1); + emit_decl(ureg, + TGSI_FILE_INPUT, + ureg->gs_input[i].index, + ureg->gs_input[i].semantic_name, + ureg->gs_input[i].semantic_index, + TGSI_INTERPOLATE_CONSTANT); } } diff --git a/src/gallium/auxiliary/tgsi/tgsi_ureg.h b/src/gallium/auxiliary/tgsi/tgsi_ureg.h index e25f35c6dc..d6e8e5d553 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_ureg.h +++ b/src/gallium/auxiliary/tgsi/tgsi_ureg.h @@ -160,7 +160,9 @@ ureg_DECL_vs_input( struct ureg_program *, struct ureg_src ureg_DECL_gs_input(struct ureg_program *, - unsigned index); + unsigned index, + unsigned semantic_name, + unsigned semantic_index); struct ureg_src ureg_DECL_system_value(struct ureg_program *, -- cgit v1.2.3