summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/tgsi
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2009-09-12 14:16:00 -0700
committerKeith Whitwell <[email protected]>2009-09-12 14:16:00 -0700
commitae4704eabc237e13c9b06df9c44f31c9baca6208 (patch)
treed70220d5faa5e88ab6b257ca92c5f88c361a0efa /src/gallium/auxiliary/tgsi
parent09b566e1610ec699490dc01bcea0b8c5cc44a78d (diff)
tgsi/ureg: give ureg_DECL_constant an explicit index parameter
Avoid the need to emit all constant declarations in order. Makes referring to a specific constant in the constant buffer much easier.
Diffstat (limited to 'src/gallium/auxiliary/tgsi')
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_ureg.c5
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_ureg.h3
2 files changed, 6 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_ureg.c b/src/gallium/auxiliary/tgsi/tgsi_ureg.c
index 55a4e5b2e92..9222af91fe1 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_ureg.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_ureg.c
@@ -308,8 +308,11 @@ out:
* value or manage any constant_buffer contents -- that's the
* resposibility of the calling code.
*/
-struct ureg_src ureg_DECL_constant(struct ureg_program *ureg )
+struct ureg_src ureg_DECL_constant(struct ureg_program *ureg,
+ unsigned index )
{
+
+
return ureg_src_register( TGSI_FILE_CONSTANT, ureg->nr_constants++ );
}
diff --git a/src/gallium/auxiliary/tgsi/tgsi_ureg.h b/src/gallium/auxiliary/tgsi/tgsi_ureg.h
index 3bc1b775030..627a5b0c523 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_ureg.h
+++ b/src/gallium/auxiliary/tgsi/tgsi_ureg.h
@@ -129,7 +129,8 @@ ureg_DECL_immediate( struct ureg_program *,
unsigned nr );
struct ureg_src
-ureg_DECL_constant( struct ureg_program * );
+ureg_DECL_constant( struct ureg_program *,
+ unsigned index );
struct ureg_dst
ureg_DECL_temporary( struct ureg_program * );