diff options
author | Hyunjun Ko <[email protected]> | 2019-11-01 08:34:54 +0000 |
---|---|---|
committer | Kristian H. Kristensen <[email protected]> | 2020-02-07 09:51:25 -0800 |
commit | d70192e6973aec3bbe2be70192f18b6a2257872a (patch) | |
tree | 679ea1b6c950866b07b94c8001b83e8c6c5b95c1 /src/freedreno/ir3 | |
parent | 3eca6d9ce14abfc542031248be6a53c31cd113f9 (diff) |
freedreno/ir3: Add cat4 mediump opcodes
v2: Reworked to assign half-opcodes in ir3_ra.c (krh).
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3737>
Diffstat (limited to 'src/freedreno/ir3')
-rw-r--r-- | src/freedreno/ir3/ir3.h | 3 | ||||
-rw-r--r-- | src/freedreno/ir3/ir3_ra.c | 15 |
2 files changed, 18 insertions, 0 deletions
diff --git a/src/freedreno/ir3/ir3.h b/src/freedreno/ir3/ir3.h index fbe28ac3cc1..c682c6e0db0 100644 --- a/src/freedreno/ir3/ir3.h +++ b/src/freedreno/ir3/ir3.h @@ -1463,8 +1463,11 @@ INSTR3(SAD_S32) /* cat4 instructions: */ INSTR1(RCP) INSTR1(RSQ) +INSTR1(HRSQ) INSTR1(LOG2) +INSTR1(HLOG2) INSTR1(EXP2) +INSTR1(HEXP2) INSTR1(SIN) INSTR1(COS) INSTR1(SQRT) diff --git a/src/freedreno/ir3/ir3_ra.c b/src/freedreno/ir3/ir3_ra.c index 5a63e77c89e..f04db4f29ac 100644 --- a/src/freedreno/ir3/ir3_ra.c +++ b/src/freedreno/ir3/ir3_ra.c @@ -1110,6 +1110,21 @@ static void fixup_half_instr_dst(struct ir3_instruction *instr) break; } break; + case 4: + switch (instr->opc) { + case OPC_RSQ: + instr->opc = OPC_HRSQ; + break; + case OPC_LOG2: + instr->opc = OPC_HLOG2; + break; + case OPC_EXP2: + instr->opc = OPC_HEXP2; + break; + default: + break; + } + break; case 5: instr->cat5.type = half_type(instr->cat5.type); break; |