summaryrefslogtreecommitdiffstats
path: root/src/panfrost/midgard/midgard_derivatives.c
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2019-08-21 09:15:56 -0700
committerAlyssa Rosenzweig <[email protected]>2019-08-21 10:38:31 -0700
commit6189274f5751ed3595e42f044f4f8ce386f5a272 (patch)
tree64c7c203e3bd74d5fcfd7d740a6df3ca59eb1ecc /src/panfrost/midgard/midgard_derivatives.c
parentcda0ec67e6a615c10ac75e7345c8982637526d8c (diff)
pan/midgard: Represent unused nodes by ~0
This allows nodes to be unsigned and prevents a class of weird signedness bugs identified by Coverity. Signed-off-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/panfrost/midgard/midgard_derivatives.c')
-rw-r--r--src/panfrost/midgard/midgard_derivatives.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/panfrost/midgard/midgard_derivatives.c b/src/panfrost/midgard/midgard_derivatives.c
index 0f15af3db42..9a1506372b8 100644
--- a/src/panfrost/midgard/midgard_derivatives.c
+++ b/src/panfrost/midgard/midgard_derivatives.c
@@ -96,7 +96,7 @@ midgard_emit_derivatives(compiler_context *ctx, nir_alu_instr *instr)
.mask = mask_of(nr_components),
.ssa_args = {
.dest = nir_dest_index(ctx, &instr->dest.dest),
- .src = { nir_alu_src_index(ctx, &instr->src[0]), -1, -1 },
+ .src = { nir_alu_src_index(ctx, &instr->src[0]), ~0, ~0 },
},
.texture = {
.op = mir_derivative_op(instr->op),