summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/tgsi/tgsi_exec.h
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>2009-07-15 23:44:53 +0100
committerKeith Whitwell <keithw@vmware.com>2009-07-16 09:53:07 +0100
commit6175653d0bceedba1f599d27111bab14f312f134 (patch)
treeadf7ba396a1621549b4842d047709129dc87646a /src/gallium/auxiliary/tgsi/tgsi_exec.h
parent3a3b83e5112b725e22f05b32a273a2351b820944 (diff)
gallium: proper constructor and destructor for tgsi_exec_machine
Centralize the creation, initialization and destruction of this struct. Use align_malloc instead of home-brew alternatives.
Diffstat (limited to 'src/gallium/auxiliary/tgsi/tgsi_exec.h')
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_exec.h22
1 files changed, 8 insertions, 14 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_exec.h b/src/gallium/auxiliary/tgsi/tgsi_exec.h
index da22baad3e..f1866b7658 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_exec.h
+++ b/src/gallium/auxiliary/tgsi/tgsi_exec.h
@@ -187,20 +187,16 @@ struct tgsi_exec_labels
struct tgsi_exec_machine
{
/* Total = program temporaries + internal temporaries
- * + 1 padding to align to 16 bytes
*/
- struct tgsi_exec_vector _Temps[TGSI_EXEC_NUM_TEMPS +
- TGSI_EXEC_NUM_TEMP_EXTRAS + 1];
+ struct tgsi_exec_vector Temps[TGSI_EXEC_NUM_TEMPS +
+ TGSI_EXEC_NUM_TEMP_EXTRAS];
+
+ float Imms[TGSI_EXEC_NUM_IMMEDIATES][4];
- /*
- * This will point to _Temps after aligning to 16B boundary.
- */
- struct tgsi_exec_vector *Temps;
struct tgsi_exec_vector *Addrs;
struct tgsi_sampler **Samplers;
- float Imms[TGSI_EXEC_NUM_IMMEDIATES][4];
unsigned ImmLimit;
const float (*Consts)[4];
struct tgsi_exec_vector *Inputs;
@@ -251,9 +247,11 @@ struct tgsi_exec_machine
struct tgsi_exec_labels Labels;
};
+struct tgsi_exec_machine *
+tgsi_exec_machine_create( void );
+
void
-tgsi_exec_machine_init(
- struct tgsi_exec_machine *mach );
+tgsi_exec_machine_destroy(struct tgsi_exec_machine *mach);
void
@@ -268,10 +266,6 @@ tgsi_exec_machine_run(
struct tgsi_exec_machine *mach );
-void
-tgsi_exec_machine_free_data(struct tgsi_exec_machine *mach);
-
-
static INLINE void
tgsi_set_kill_mask(struct tgsi_exec_machine *mach, unsigned mask)
{