summaryrefslogtreecommitdiff
path: root/ir.h
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2010-06-24 15:21:51 -0700
committerEric Anholt <eric@anholt.net>2010-06-24 15:27:10 -0700
commit0ee7d80269bfab14683623b0c8fc12da43db8d78 (patch)
tree7b2a65190c9934ed8a0ff02f2845323c420153a3 /ir.h
parent6b01b50888d22ee330df44240591051cb55cf2a9 (diff)
parent8364fc85b8273b4d0f2ecebe7e0085e250d29990 (diff)
Merge branch 'mesa'
This brings in the ir_to_mesa.cpp code I've been developing to codegen to the Mesa IR. It does not actually generate a complete Mesa fragment/vertex program yet.
Diffstat (limited to 'ir.h')
-rw-r--r--ir.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/ir.h b/ir.h
index 1c95512fb1..3d2c7ff5cf 100644
--- a/ir.h
+++ b/ir.h
@@ -37,6 +37,10 @@ extern "C" {
#include "ir_visitor.h"
#include "ir_hierarchical_visitor.h"
+#ifndef ARRAY_SIZE
+#define ARRAY_SIZE(x) (sizeof(x) / sizeof(x[0]))
+#endif
+
struct ir_program {
void *bong_hits;
};
@@ -758,9 +762,9 @@ public:
};
ir_loop_jump(jump_mode mode)
- : mode(mode)
{
- /* empty */
+ this->mode = mode;
+ this->loop = loop;
}
virtual ir_instruction *clone(struct hash_table *) const;
@@ -782,9 +786,11 @@ public:
return mode == jump_continue;
}
-private:
/** Mode selector for the jump instruction. */
enum jump_mode mode;
+private:
+ /** Loop containing this break instruction. */
+ ir_loop *loop;
};
/*@}*/