diff options
author | Alyssa Rosenzweig <[email protected]> | 2019-03-13 05:01:43 +0000 |
---|---|---|
committer | Alyssa Rosenzweig <[email protected]> | 2019-03-14 22:50:24 +0000 |
commit | 1ea42894c70f271c6ea958a9d3cc7ba8c5948c2e (patch) | |
tree | c0f0026abb5d1de0e0e31c11f64d2fa5fe2b5819 /src/gallium/drivers | |
parent | 2eb65c21737e6b48107d056a6cb686421baf27d3 (diff) |
panfrost/midgard: Implement fpow
We have a native op for this, which was just found in a disassembly --
so instead of lowering, use it!
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
4 files changed, 4 insertions, 1 deletions
diff --git a/src/gallium/drivers/panfrost/midgard/helpers.h b/src/gallium/drivers/panfrost/midgard/helpers.h index b597e516f20..606eb9982e7 100644 --- a/src/gallium/drivers/panfrost/midgard/helpers.h +++ b/src/gallium/drivers/panfrost/midgard/helpers.h @@ -228,6 +228,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_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 f6b83d30f5d..39b1df5d915 100644 --- a/src/gallium/drivers/panfrost/midgard/midgard.h +++ b/src/gallium/drivers/panfrost/midgard/midgard.h @@ -108,6 +108,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_frcp = 0xF0, midgard_alu_op_frsqrt = 0xF2, midgard_alu_op_fsqrt = 0xF3, @@ -462,6 +463,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_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 a6c4b4498da..7f3b6997ca0 100644 --- a/src/gallium/drivers/panfrost/midgard/midgard_compile.c +++ b/src/gallium/drivers/panfrost/midgard/midgard_compile.c @@ -990,6 +990,7 @@ 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 2fcbc317164..6225d041c07 100644 --- a/src/gallium/drivers/panfrost/midgard/midgard_compile.h +++ b/src/gallium/drivers/panfrost/midgard/midgard_compile.h @@ -62,7 +62,6 @@ midgard_compile_shader_nir(nir_shader *nir, midgard_program *program, bool is_bl static const nir_shader_compiler_options midgard_nir_options = { .lower_ffma = true, .lower_sub = true, - .lower_fpow = true, .lower_scmp = true, .lower_flrp32 = true, .lower_flrp64 = true, |