pan/bi: Simplify derivative lowering

Now that we lower FAU correctly, we don't need to write the extra move
explicitly, it will be lowered in later.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8973>
This commit is contained in:
Alyssa Rosenzweig
2021-02-10 11:44:37 -05:00
committed by Marge Bot
parent 0acc6b564e
commit fa79168b9e
+3 -4
View File
@@ -1284,11 +1284,10 @@ bi_emit_alu(bi_builder *b, nir_alu_instr *instr)
case nir_op_fddx:
case nir_op_fddy: {
bi_index cur_lane = bi_mov_i32(b, bi_fau(BIR_FAU_LANE_ID, false));
bi_index lane1 = bi_lshift_and_i32(b, cur_lane,
bi_index lane1 = bi_lshift_and_i32(b,
bi_fau(BIR_FAU_LANE_ID, false),
bi_imm_u32(instr->op == nir_op_fddx ? 2 : 1),
bi_byte(bi_zero(), 0));
bi_imm_u8(0));
bi_index lane2 = bi_iadd_u32(b, lane1,
bi_imm_u32(instr->op == nir_op_fddx ? 1 : 2),