+struct ureg_dst ureg_DECL_temporary( struct ureg_program *ureg )
+{
+ return alloc_temporary(ureg, FALSE);
+}
+
+struct ureg_dst ureg_DECL_local_temporary( struct ureg_program *ureg )
+{
+ return alloc_temporary(ureg, TRUE);
+}
+
+struct ureg_dst ureg_DECL_array_temporary( struct ureg_program *ureg,
+ unsigned size,
+ boolean local )
+{
+ unsigned i = ureg->nr_temps;
+ struct ureg_dst dst = ureg_dst_register( TGSI_FILE_TEMPORARY, i );
+
+ if (local)
+ util_bitmask_set(ureg->local_temps, i);
+
+ /* Always start a new declaration at the start */
+ util_bitmask_set(ureg->decl_temps, i);
+
+ ureg->nr_temps += size;
+
+ /* and also at the end of the array */
+ util_bitmask_set(ureg->decl_temps, ureg->nr_temps);
+
+ if (ureg->nr_array_temps < UREG_MAX_ARRAY_TEMPS) {
+ ureg->array_temps[ureg->nr_array_temps++] = i;
+ dst.ArrayID = ureg->nr_array_temps;
+ }
+
+ return dst;
+}