From 04a72391f35d4f25175fd1028871f2666d2ebb83 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Tue, 26 Mar 2019 04:48:20 +0000 Subject: panfrost/midgard: fpow is a two-part operation In fact, the native "fpow" instruction only does half of it; more work is needed for the actual instruction. For now, just lower. Fixes: 1ea42894c ("panfrost/midgard: Implement fpow") Signed-off-by: Alyssa Rosenzweig --- src/gallium/drivers/panfrost/midgard/helpers.h | 2 +- src/gallium/drivers/panfrost/midgard/midgard.h | 4 ++-- src/gallium/drivers/panfrost/midgard/midgard_compile.c | 1 - src/gallium/drivers/panfrost/midgard/midgard_compile.h | 1 + 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/gallium') diff --git a/src/gallium/drivers/panfrost/midgard/helpers.h b/src/gallium/drivers/panfrost/midgard/helpers.h index 84db2de84d1..456c3fb5f1e 100644 --- a/src/gallium/drivers/panfrost/midgard/helpers.h +++ b/src/gallium/drivers/panfrost/midgard/helpers.h @@ -234,7 +234,7 @@ static unsigned alu_opcode_props[256] = { [midgard_alu_op_frcp] = UNIT_VLUT, [midgard_alu_op_frsqrt] = UNIT_VLUT, [midgard_alu_op_fsqrt] = UNIT_VLUT, - [midgard_alu_op_fpow] = UNIT_VLUT, + [midgard_alu_op_fpow_pt1] = UNIT_VLUT, [midgard_alu_op_fexp2] = UNIT_VLUT, [midgard_alu_op_flog2] = UNIT_VLUT, diff --git a/src/gallium/drivers/panfrost/midgard/midgard.h b/src/gallium/drivers/panfrost/midgard/midgard.h index eab7cb5eec0..59957c1b566 100644 --- a/src/gallium/drivers/panfrost/midgard/midgard.h +++ b/src/gallium/drivers/panfrost/midgard/midgard.h @@ -126,7 +126,7 @@ typedef enum { midgard_alu_op_fcsel = 0xC5, midgard_alu_op_fround = 0xC6, midgard_alu_op_fatan_pt2 = 0xE8, - midgard_alu_op_fpow = 0xEC, + midgard_alu_op_fpow_pt1 = 0xEC, midgard_alu_op_frcp = 0xF0, midgard_alu_op_frsqrt = 0xF2, midgard_alu_op_fsqrt = 0xF3, @@ -498,7 +498,7 @@ static char *alu_opcode_names[256] = { [midgard_alu_op_frcp] = "frcp", [midgard_alu_op_frsqrt] = "frsqrt", [midgard_alu_op_fsqrt] = "fsqrt", - [midgard_alu_op_fpow] = "fpow", + [midgard_alu_op_fpow_pt1] = "fpow_pt1", [midgard_alu_op_fexp2] = "fexp2", [midgard_alu_op_flog2] = "flog2", [midgard_alu_op_fsin] = "fsin", diff --git a/src/gallium/drivers/panfrost/midgard/midgard_compile.c b/src/gallium/drivers/panfrost/midgard/midgard_compile.c index 3dd21d0390d..4640d921b7b 100644 --- a/src/gallium/drivers/panfrost/midgard/midgard_compile.c +++ b/src/gallium/drivers/panfrost/midgard/midgard_compile.c @@ -1016,7 +1016,6 @@ emit_alu(compiler_context *ctx, nir_alu_instr *instr) ALU_CASE(frcp, frcp); ALU_CASE(frsq, frsqrt); ALU_CASE(fsqrt, fsqrt); - ALU_CASE(fpow, fpow); ALU_CASE(fexp2, fexp2); ALU_CASE(flog2, flog2); diff --git a/src/gallium/drivers/panfrost/midgard/midgard_compile.h b/src/gallium/drivers/panfrost/midgard/midgard_compile.h index a6520091a21..a4dfb25648d 100644 --- a/src/gallium/drivers/panfrost/midgard/midgard_compile.h +++ b/src/gallium/drivers/panfrost/midgard/midgard_compile.h @@ -73,6 +73,7 @@ static const nir_shader_compiler_options midgard_nir_options = { .lower_fdiv = true, .lower_idiv = true, .lower_isign = true, + .lower_fpow = true, .vertex_id_zero_based = true, .lower_extract_byte = true, -- cgit v1.2.3