From 6e68f743953d79f2beb2ac1fc34331f016d1b7c7 Mon Sep 17 00:00:00 2001 From: Iago Toral Quiroga Date: Tue, 24 Sep 2019 10:43:41 +0200 Subject: [PATCH] v3d: add missing plumbing for VPM load instructions MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit We will need to use LDVPMG_IN specifically to read VPM inputs in geometry shaders. Reviewed-by: Alejandro Piñeiro --- src/broadcom/compiler/v3d_compiler.h | 4 ++++ src/broadcom/qpu/qpu_pack.c | 3 +++ 2 files changed, 7 insertions(+) diff --git a/src/broadcom/compiler/v3d_compiler.h b/src/broadcom/compiler/v3d_compiler.h index e2a4665ed42..29057bdf4df 100644 --- a/src/broadcom/compiler/v3d_compiler.h +++ b/src/broadcom/compiler/v3d_compiler.h @@ -998,6 +998,10 @@ VIR_A_ALU0(TIDX) VIR_A_ALU0(EIDX) VIR_A_ALU1(LDVPMV_IN) VIR_A_ALU1(LDVPMV_OUT) +VIR_A_ALU1(LDVPMD_IN) +VIR_A_ALU1(LDVPMD_OUT) +VIR_A_ALU2(LDVPMG_IN) +VIR_A_ALU2(LDVPMG_OUT) VIR_A_ALU0(TMUWT) VIR_A_ALU0(FXCD) diff --git a/src/broadcom/qpu/qpu_pack.c b/src/broadcom/qpu/qpu_pack.c index 516b0cf538a..6942342740c 100644 --- a/src/broadcom/qpu/qpu_pack.c +++ b/src/broadcom/qpu/qpu_pack.c @@ -521,7 +521,9 @@ static const struct opcode_desc add_ops[] = { { 187, 187, 1 << 3, ANYMUX, V3D_QPU_A_VPMSETUP, 33 }, { 188, 188, 1 << 0, ANYMUX, V3D_QPU_A_LDVPMV_IN, 40 }, + { 188, 188, 1 << 0, ANYMUX, V3D_QPU_A_LDVPMV_OUT, 40 }, { 188, 188, 1 << 1, ANYMUX, V3D_QPU_A_LDVPMD_IN, 40 }, + { 188, 188, 1 << 1, ANYMUX, V3D_QPU_A_LDVPMD_OUT, 40 }, { 188, 188, 1 << 2, ANYMUX, V3D_QPU_A_LDVPMP, 40 }, { 188, 188, 1 << 3, ANYMUX, V3D_QPU_A_RSQRT, 41 }, { 188, 188, 1 << 4, ANYMUX, V3D_QPU_A_EXP, 41 }, @@ -529,6 +531,7 @@ static const struct opcode_desc add_ops[] = { { 188, 188, 1 << 6, ANYMUX, V3D_QPU_A_SIN, 41 }, { 188, 188, 1 << 7, ANYMUX, V3D_QPU_A_RSQRT2, 41 }, { 189, 189, ANYMUX, ANYMUX, V3D_QPU_A_LDVPMG_IN, 40 }, + { 189, 189, ANYMUX, ANYMUX, V3D_QPU_A_LDVPMG_OUT, 40 }, /* FIXME: MORE COMPLICATED */ /* { 190, 191, ANYMUX, ANYMUX, V3D_QPU_A_VFMOVABSNEGNAB }, */ -- 2.30.2