unsigned vs_inputs[UREG_MAX_INPUT/32];
+ struct {
+ unsigned index;
+ } gs_input[UREG_MAX_INPUT];
+ unsigned nr_gs_inputs;
+
struct {
unsigned semantic_name;
unsigned semantic_index;
}
+struct ureg_src
+ureg_DECL_gs_input(struct ureg_program *ureg,
+ unsigned index)
+{
+ if (ureg->nr_gs_inputs < UREG_MAX_INPUT) {
+ ureg->gs_input[ureg->nr_gs_inputs].index = index;
+ ureg->nr_gs_inputs++;
+ } else {
+ set_bad(ureg);
+ }
+
+ /* XXX: Add suport for true 2D input registers. */
+ return ureg_src_register(TGSI_FILE_INPUT, index);
+}
+
+
struct ureg_dst
ureg_DECL_output( struct ureg_program *ureg,
unsigned name,
emit_decl_range( ureg, TGSI_FILE_INPUT, i, 1 );
}
}
- }
- else {
+ } else if (ureg->processor == TGSI_PROCESSOR_FRAGMENT) {
for (i = 0; i < ureg->nr_fs_inputs; i++) {
emit_decl( ureg,
TGSI_FILE_INPUT,
ureg->fs_input[i].semantic_index,
ureg->fs_input[i].interp );
}
+ } else {
+ for (i = 0; i < ureg->nr_gs_inputs; i++) {
+ emit_decl_range(ureg,
+ TGSI_FILE_INPUT,
+ ureg->gs_input[i].index,
+ 1);
+ }
}
for (i = 0; i < ureg->nr_outputs; i++) {
ureg_DECL_vs_input( struct ureg_program *,
unsigned index );
+struct ureg_src
+ureg_DECL_gs_input(struct ureg_program *,
+ unsigned index);
+
struct ureg_dst
ureg_DECL_output( struct ureg_program *,
unsigned semantic_name,