From 4de293bb9acd1ecda683f735af32f7485a0f213e Mon Sep 17 00:00:00 2001 From: Christoph Bumiller Date: Sun, 15 Aug 2010 21:37:50 +0200 Subject: nv50: loops part 2 At least the mesa demo glsl/mandelbrot should work now. --- src/gallium/drivers/nv50/nv50_pc_optimize.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/gallium/drivers/nv50/nv50_pc_optimize.c') diff --git a/src/gallium/drivers/nv50/nv50_pc_optimize.c b/src/gallium/drivers/nv50/nv50_pc_optimize.c index 64ffeaf430..daf63a3d20 100644 --- a/src/gallium/drivers/nv50/nv50_pc_optimize.c +++ b/src/gallium/drivers/nv50/nv50_pc_optimize.c @@ -89,7 +89,7 @@ inst_cullable(struct nv_instruction *nvi) static INLINE boolean nvi_isnop(struct nv_instruction *nvi) { - if (nvi->opcode == NV_OP_EXPORT) + if (nvi->opcode == NV_OP_EXPORT || nvi->opcode == NV_OP_UNDEF) return TRUE; if (nvi->fixed || @@ -849,7 +849,7 @@ nv_pass_dce(struct nv_pass_dce *ctx, struct nv_basic_block *b) int j; struct nv_instruction *nvi, *next; - for (nvi = b->entry; nvi; nvi = next) { + for (nvi = b->phi ? b->phi : b->entry; nvi; nvi = next) { next = nvi->next; if (inst_cullable(nvi)) { -- cgit v1.2.3