diff options
author | Brian <brian.paul@tungstengraphics.com> | 2007-10-02 14:25:43 -0600 |
---|---|---|
committer | Brian <brian.paul@tungstengraphics.com> | 2007-10-02 14:25:43 -0600 |
commit | 8955bc34581ac716cf5cabb02fde5260ab3ae207 (patch) | |
tree | 1a38d815b223539529dbcfecd5ec44c8fe0f305e /src/mesa/pipe/tgsi | |
parent | 6aab3e3d269b71e8306928088e3603daf082223f (diff) |
Minor optimization: no-op CAL when ExecMask==0x0.
Diffstat (limited to 'src/mesa/pipe/tgsi')
-rw-r--r-- | src/mesa/pipe/tgsi/exec/tgsi_exec.c | 9 |
1 files 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 e428b250f0..5a50bd5aed 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: |