aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/panfrost/midgard/midgard_derivatives.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/panfrost/midgard/midgard_derivatives.c b/src/panfrost/midgard/midgard_derivatives.c
index c9c6c028658..5c01ebaf64a 100644
--- a/src/panfrost/midgard/midgard_derivatives.c
+++ b/src/panfrost/midgard/midgard_derivatives.c
@@ -103,7 +103,8 @@ midgard_emit_derivatives(compiler_context *ctx, nir_alu_instr *instr)
.mask = mask_of(nr_components),
.dest = nir_dest_index(&instr->dest.dest),
.dest_type = nir_type_float32,
- .src = { nir_src_index(ctx, &instr->src[0].src), ~0, ~0, ~0 },
+ .src = { ~0, nir_src_index(ctx, &instr->src[0].src), ~0, ~0 },
+ .swizzle = SWIZZLE_IDENTITY_4,
.src_types = { nir_type_float32, nir_type_float32 },
.texture = {
.op = mir_derivative_op(instr->op),
@@ -114,9 +115,6 @@ midgard_emit_derivatives(compiler_context *ctx, nir_alu_instr *instr)
}
};
- ins.swizzle[0][2] = ins.swizzle[0][3] = COMPONENT_X;
- ins.swizzle[1][2] = ins.swizzle[1][3] = COMPONENT_X;
-
if (!instr->dest.dest.is_ssa)
ins.mask &= instr->dest.write_mask;