diff options
author | Alyssa Rosenzweig <[email protected]> | 2020-05-11 09:20:39 -0400 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-05-12 22:30:42 +0000 |
commit | b7bd021c700961b6eb3f9ee5b7777f4c7e1bab45 (patch) | |
tree | 629ad7f3c8f9d150cb8dd2b7a392342777e881ca /src | |
parent | bac29316b06a5bbee396c70c53ed0640af67c064 (diff) |
pan/mdg: Fix derivative swizzle
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5014>
Diffstat (limited to 'src')
-rw-r--r-- | src/panfrost/midgard/midgard_derivatives.c | 6 |
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; |