mesa/src/broadcom/compiler
Iago Toral Quiroga 9217c565b2 v3d,v3dv: stop trying to force 16-bit TMU output for shadow comparisons
In V3D we were doing this incorrectly by peeking into the sampler state
unconditionally, which is not correct if the TMU operations don't use
sampler state at all (like PBOs). This was causing us to fail the second
test in this sequence when both tests run back back to back in the same
process:

dEQP-GLES3.functional.texture.shadow.2d.linear.greater_or_equal_depth_component32f
dEQP-GLES3.functional.texture.specification.teximage2d_pbo.rg32f_cube

Here, the first test would setup sampler state for shadow comparisons and
the second test would setup a PBO upload, which would incorrectly pick
up the sampler state to decide about the TMU output size for the PBO
operation.

In V3DV we were doing this right looking through each texture/sampler
instruction and checking if they all involved shadow comparisons or had
relaxed precission, defaulting to 32-bit otherwise.

This special-casing for shadow comparisons also leaks from drivers
into the compiler where we are forced to emit some pieces of sampler
state for 32-bit outputs, so we had to special-case shadow instructions
there as well and we also had a fix for CS textures not having correct
sampler state representing shadow operations too. Finally,
we also had  at least a couple of bugs where forcing 32-bit TMU output
through V3D_DEBUG wasn't correctly forcing shadow comparisons to actually
be 32-bit in all the right places, leading to visual bugs with the
option enabled (Sponza being one example of this). This change eliminates
all of these issues.

Finally, the performance improvement observed from special casing shadow
comparison is negligible, and in specific scenarios it can even be
detrimental to performance due to increased register pressure (Sponza with
PCF filtering set to 4 is an example of this again).

Fixes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8684
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22284>
2023-04-05 06:52:51 +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: track pending ldtmu count with each TMU lookup 2023-03-21 11:29:05 +00:00
qpu_schedule.c broadcom/compiler: track pending ldtmu count with each TMU lookup 2023-03-21 11:29:05 +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 broadcom/vc5: Move V3D 3.3 VPM write setup to a separate file. 2018-01-12 21:56:24 -08:00
v3d40_tex.c v3d,v3dv: stop trying to force 16-bit TMU output for shadow comparisons 2023-04-05 06:52:51 +00:00
v3d_compiler.h broadcom/compiler: track pending ldtmu count with each TMU lookup 2023-03-21 11:29:05 +00:00
v3d_nir_lower_image_load_store.c broadcom/compiler: fix indentation at v3d_nir_lower_image_load_store 2023-01-30 21:57:45 +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: drop unused v3d_compile parameter for nir pass 2022-11-04 09:58:10 +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 v3dv: implement VK_EXT_pipeline_robustness 2022-10-27 08:17:11 +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: v3d_nir_lower_txf_ms doesn't need v3d_compile 2023-01-18 13:09:57 +00:00
vir.c v3d,v3dv: stop trying to force 16-bit TMU output for shadow comparisons 2023-04-05 06:52:51 +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 v3d: Use ldunif instructions for uniforms. 2019-03-05 12:57:39 -08:00
vir_register_allocate.c broadcom/compiler: track pending ldtmu count with each TMU lookup 2023-03-21 11:29:05 +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