Pārlūkot izejas kodu

i965: Emit conditional code updates as required for GLSL VS if statements.

Previously, we'd be branching based on whatever condition code happened to be
laying around.
(cherry picked from commit 7007f8b352)
tags/mesa_7_6_rc1
Eric Anholt pirms 16 gadiem
vecāks
revīzija
3d6c73513c
1 mainītis faili ar 13 papildinājumiem un 0 dzēšanām
  1. 13
    0
      src/mesa/drivers/dri/i965/brw_vs_emit.c

+ 13
- 0
src/mesa/drivers/dri/i965/brw_vs_emit.c Parādīt failu

@@ -1448,6 +1448,19 @@ void brw_vs_emit(struct brw_vs_compile *c )
"unknown");
}

/* Set the predication update on the last instruction of the native
* instruction sequence.
*
* This would be problematic if it was set on a math instruction,
* but that shouldn't be the case with the current GLSL compiler.
*/
if (inst->CondUpdate) {
struct brw_instruction *hw_insn = &p->store[p->nr_insn - 1];

assert(hw_insn->header.destreg__conditionalmod == 0);
hw_insn->header.destreg__conditionalmod = BRW_CONDITIONAL_NZ;
}

if ((inst->DstReg.File == PROGRAM_OUTPUT)
&& (inst->DstReg.Index != VERT_RESULT_HPOS)
&& c->output_regs[inst->DstReg.Index].used_in_src) {

Notiek ielāde…
Atcelt
Saglabāt