diff options
| author | Christoph Bumiller <e0425955@student.tuwien.ac.at> | 2009-11-01 14:04:54 +0100 | 
|---|---|---|
| committer | Christoph Bumiller <e0425955@student.tuwien.ac.at> | 2009-11-01 14:28:04 +0100 | 
| commit | 496c9eaacfabc4df4e6fb5ba230e60dc660554c8 (patch) | |
| tree | 7183df879076d6b0b66e2201b2e5078186dbd1fe | |
| parent | 99e308a0e0479971fe3a8a0aba586e19456e4b88 (diff) | |
nv50: make IF condition safe
Don't assume that a SET that writes to IF's argument
directly precedes the IF.
| -rw-r--r-- | src/gallium/drivers/nv50/nv50_program.c | 4 | 
1 files changed, 3 insertions, 1 deletions
| diff --git a/src/gallium/drivers/nv50/nv50_program.c b/src/gallium/drivers/nv50/nv50_program.c index 5944a0b7ff..66190f070d 100644 --- a/src/gallium/drivers/nv50/nv50_program.c +++ b/src/gallium/drivers/nv50/nv50_program.c @@ -2026,7 +2026,9 @@ nv50_program_tx_insn(struct nv50_pc *pc,  	case TGSI_OPCODE_IF:  		/* emitting a join_at may not be necessary */  		assert(pc->if_lvl < MAX_IF_DEPTH); -		set_pred_wr(pc, 1, 0, pc->if_cond); +		/* set_pred_wr(pc, 1, 0, pc->if_cond); */ +		emit_cvt(pc, NULL, src[0][0], 0, CVTOP_ABS | CVTOP_RN, +			 CVT_F32_F32);  		emit_branch(pc, 0, 2, &pc->br_join[pc->if_lvl]);  		pc->if_insn[pc->if_lvl++] = pc->p->exec_tail;  		terminate_mbb(pc); | 
