From: Brian Date: Tue, 2 Oct 2007 20:25:43 +0000 (-0600) Subject: Minor optimization: no-op CAL when ExecMask==0x0. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8955bc34581ac716cf5cabb02fde5260ab3ae207;p=mesa.git Minor optimization: no-op CAL when ExecMask==0x0. --- diff --git a/src/mesa/pipe/tgsi/exec/tgsi_exec.c b/src/mesa/pipe/tgsi/exec/tgsi_exec.c index e428b250f00..5a50bd5aed6 100644 --- a/src/mesa/pipe/tgsi/exec/tgsi_exec.c +++ b/src/mesa/pipe/tgsi/exec/tgsi_exec.c @@ -1911,9 +1911,12 @@ exec_instruction( break; case TGSI_OPCODE_CAL: - /* note that PC was already incremented above */ - mach->CallStack[mach->CallStackTop++] = *pc; - *pc = inst->InstructionExtLabel.Label; + /* skip the call if no execution channels are enabled */ + if (mach->ExecMask) { + /* note that PC was already incremented above */ + mach->CallStack[mach->CallStackTop++] = *pc; + *pc = inst->InstructionExtLabel.Label; + } break; case TGSI_OPCODE_RET: