From 8955bc34581ac716cf5cabb02fde5260ab3ae207 Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 2 Oct 2007 14:25:43 -0600 Subject: [PATCH] Minor optimization: no-op CAL when ExecMask==0x0. --- src/mesa/pipe/tgsi/exec/tgsi_exec.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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: -- 2.30.2