diff options
author | Iago Toral Quiroga <itoral@igalia.com> | 2022-01-21 12:04:11 +0100 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2022-01-25 09:08:26 +0000 |
commit | 1b530d948d7c023416142920e27d46f1d35c4d02 (patch) | |
tree | 49b83f2da37209e19166812078225d5519b5e4db | |
parent | 84adf89d3393e4d1d48d29449198f9de7b6239a7 (diff) |
broadcom/compiler: support 8-bit general store access
Just like with 16-bit, this mode only supports scalar access, but
we are already lowering all non 32-bit accesses to scalar.
Reviewed-by: Alejandro PiƱeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14648>
-rw-r--r-- | src/broadcom/compiler/nir_to_vir.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/broadcom/compiler/nir_to_vir.c b/src/broadcom/compiler/nir_to_vir.c index 06584171c27..0581002b7b8 100644 --- a/src/broadcom/compiler/nir_to_vir.c +++ b/src/broadcom/compiler/nir_to_vir.c @@ -635,11 +635,18 @@ ntq_emit_tmu_general(struct v3d_compile *c, nir_intrinsic_instr *instr, if (tmu_op == V3D_TMU_OP_WRITE_CMPXCHG_READ_FLUSH) { config |= GENERAL_TMU_LOOKUP_TYPE_VEC2; } else if (is_atomic || num_components == 1) { - if (type_size == 4) { + switch (type_size) { + case 4: config |= GENERAL_TMU_LOOKUP_TYPE_32BIT_UI; - } else { - assert(type_size == 2); + break; + case 2: config |= GENERAL_TMU_LOOKUP_TYPE_16BIT_UI; + break; + case 1: + config |= GENERAL_TMU_LOOKUP_TYPE_8BIT_UI; + break; + default: + unreachable("Unsupported bitsize"); } } else { assert(type_size == 4); |