summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2014-09-29 15:31:23 -0700
committerEric Anholt <[email protected]>2014-09-29 17:44:15 -0700
commit1d42aa83580df270f53ab3a4e6b78e172107ee5f (patch)
tree5b0dc9d64b13a06ebc533343b2c1626759189f66 /src/gallium
parent66ab9c22fecc053f099376c7b20958e0ffdf05ca (diff)
vc4: Shove some depth comparison bits down to where they're used.
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/vc4/vc4_program.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gallium/drivers/vc4/vc4_program.c b/src/gallium/drivers/vc4/vc4_program.c
index 64faf6f79d2..6dc42ac3e32 100644
--- a/src/gallium/drivers/vc4/vc4_program.c
+++ b/src/gallium/drivers/vc4/vc4_program.c
@@ -576,13 +576,13 @@ tgsi_to_qir_tex(struct vc4_compile *c,
struct qreg depth_output;
- struct qreg compare = src[0 * 4 + 2];
-
- if (tgsi_inst->Instruction.Opcode == TGSI_OPCODE_TXP)
- compare = qir_FMUL(c, compare, proj);
-
struct qreg one = qir_uniform_f(c, 1.0f);
if (c->key->tex[unit].compare_mode) {
+ struct qreg compare = src[0 * 4 + 2];
+
+ if (tgsi_inst->Instruction.Opcode == TGSI_OPCODE_TXP)
+ compare = qir_FMUL(c, compare, proj);
+
switch (c->key->tex[unit].compare_func) {
case PIPE_FUNC_NEVER:
depth_output = qir_uniform_f(c, 0.0f);