mesa/src/broadcom/compiler
Alejandro Piñeiro 9cbc3ab239 broadcom/compiler: update how we compute return_words_of_texture_data on non-ssa
For the non-ssa case, we were trying to use reg->num_components. But
this is not the same that nir_ssa_def_components_read. It is the
number of components of the destination register. And in the 16bit
case, even if nir_lower_tex packs the outcome, it doesn't update the
number of components, as nir_tex_instr_dest_size would still return
4. And nir validate would check that those values are the same.

So this change focuses on the last part of this comment at
nir_lower_tex:

 * Note that we don't change the destination num_components, because
 * nir_tex_instr_dest_size() will still return 4.  The driver is just
 * expected to not store the other channels, given that nothing at the
 * NIR level will read them.

We just limit how many channels we would use for the f16 case.

It is also worth to note, based on the CTS and different applications
we test, that this is a corner case.

This was detected when we experimented to enable nir_opt_gcm for v3d,
that lead to raise an assertion slightly below with some shaderdb
tests, but technically it could happen without it.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17185>
2022-10-26 12:29:30 +00:00
..
meson.build broadcom/compiler: rename v3d_nir_lower_robust_buffer_access.c 2022-09-27 09:08:29 +00:00
nir_to_vir.c broadcom/compiler: don't call nir_opt_load_store_vectorize on all v3d_optimize_nir calls 2022-10-26 12:29:30 +00:00
qpu_schedule.c broadcom/compiler: check signal writes to magic regs when updating scoreboard 2022-09-20 06:56:28 +00:00
qpu_validate.c broadcom/compiler: don't check for GFXH-1633 on V3D 4.2.x 2021-02-12 08:24:21 +00:00
v3d33_tex.c broadcom/compiler: support pipelining of tex instructions 2021-02-04 10:33:10 +00:00
v3d33_vpm_setup.c
v3d40_tex.c broadcom/compiler: update how we compute return_words_of_texture_data on non-ssa 2022-10-26 12:29:30 +00:00
v3d_compiler.h v3dv: expose VK_EXT_image_robustness 2022-09-27 09:08:29 +00:00
v3d_nir_lower_image_load_store.c broadcom/compiler: make several passes to return a progress 2022-07-20 11:35:25 +00:00
v3d_nir_lower_io.c broadcom/compiler: make several passes to return a progress 2022-07-20 11:35:25 +00:00
v3d_nir_lower_line_smooth.c broadcom/compiler: make several passes to return a progress 2022-07-20 11:35:25 +00:00
v3d_nir_lower_load_store_bitsize.c broadcom/compiler: make several passes to return a progress 2022-07-20 11:35:25 +00:00
v3d_nir_lower_logic_ops.c broadcom/compiler: make several passes to return a progress 2022-07-20 11:35:25 +00:00
v3d_nir_lower_robust_access.c broadcom/compiler: add a lowering for robust image access 2022-09-27 09:08:29 +00:00
v3d_nir_lower_scratch.c broadcom/compiler: make several passes to return a progress 2022-07-20 11:35:25 +00:00
v3d_nir_lower_txf_ms.c broadcom/compiler: make several passes to return a progress 2022-07-20 11:35:25 +00:00
vir.c v3dv: expose VK_EXT_image_robustness 2022-09-27 09:08:29 +00:00
vir_dump.c broadcom/compiler: use signed pointers for packed condition 2021-04-12 15:22:05 +00:00
vir_live_variables.c broadcom/compiler: Fix qpu.flags.muf typo. 2021-08-24 08:30:59 +00:00
vir_opt_constant_alu.c v3dv/v3d: Fix copyright holder to Raspberry Pi Ltd 2022-02-18 11:50:07 +01:00
vir_opt_copy_propagate.c broadcom/compiler: make opt passes set current block 2021-11-02 11:17:01 +00:00
vir_opt_dead_code.c broadcom/compiler: make opt passes set current block 2021-11-02 11:17:01 +00:00
vir_opt_redundant_flags.c broadcom/compiler: make opt passes set current block 2021-11-02 11:17:01 +00:00
vir_opt_small_immediates.c
vir_register_allocate.c broadcom/compiler: don't predicate postponed spills 2022-06-28 05:49:51 +00:00
vir_to_qpu.c v3d: introduce V3D_DBG() macro to make V3D_DEBUG checks consistent 2022-08-24 23:03:57 +00:00