summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/nv50/nv50_pc.h
diff options
context:
space:
mode:
authorChristoph Bumiller <e0425955@student.tuwien.ac.at>2010-09-02 18:27:01 +0200
committerChristoph Bumiller <e0425955@student.tuwien.ac.at>2010-09-02 18:28:47 +0200
commit443abc80db9e1a288ce770e76cccd43664348098 (patch)
tree4b82cb45fe2d5a36700addcba84685617d8521e9 /src/gallium/drivers/nv50/nv50_pc.h
parent9f9ae4eee1939dd15853b8cd1a4fad2c7197aa9a (diff)
nv50: fix build-predicate function
Diffstat (limited to 'src/gallium/drivers/nv50/nv50_pc.h')
-rw-r--r--src/gallium/drivers/nv50/nv50_pc.h20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/gallium/drivers/nv50/nv50_pc.h b/src/gallium/drivers/nv50/nv50_pc.h
index adc46dec8d..703d32d334 100644
--- a/src/gallium/drivers/nv50/nv50_pc.h
+++ b/src/gallium/drivers/nv50/nv50_pc.h
@@ -347,9 +347,10 @@ struct nv_pc {
};
void nvbb_insert_tail(struct nv_basic_block *, struct nv_instruction *);
+void nvi_insert_after(struct nv_instruction *, struct nv_instruction *);
static INLINE struct nv_instruction *
-new_instruction(struct nv_pc *pc, uint opcode)
+nv_alloc_instruction(struct nv_pc *pc, uint opcode)
{
struct nv_instruction *insn;
@@ -359,10 +360,27 @@ new_instruction(struct nv_pc *pc, uint opcode)
insn->cc = NV_CC_TR;
insn->opcode = opcode;
+ return insn;
+}
+
+static INLINE struct nv_instruction *
+new_instruction(struct nv_pc *pc, uint opcode)
+{
+ struct nv_instruction *insn = nv_alloc_instruction(pc, opcode);
+
nvbb_insert_tail(pc->current_block, insn);
return insn;
}
+static INLINE struct nv_instruction *
+new_instruction_at(struct nv_pc *pc, struct nv_instruction *at, uint opcode)
+{
+ struct nv_instruction *insn = nv_alloc_instruction(pc, opcode);
+
+ nvi_insert_after(at, insn);
+ return insn;
+}
+
static INLINE struct nv_value *
new_value(struct nv_pc *pc, ubyte file, ubyte type)
{