mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-20 04:48:07 +02:00
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> |
||
|---|---|---|
| .. | ||
| meson.build | ||
| nir_to_vir.c | ||
| qpu_schedule.c | ||
| qpu_validate.c | ||
| v3d33_tex.c | ||
| v3d33_vpm_setup.c | ||
| v3d40_tex.c | ||
| v3d_compiler.h | ||
| v3d_nir_lower_image_load_store.c | ||
| v3d_nir_lower_io.c | ||
| v3d_nir_lower_line_smooth.c | ||
| v3d_nir_lower_load_store_bitsize.c | ||
| v3d_nir_lower_logic_ops.c | ||
| v3d_nir_lower_robust_access.c | ||
| v3d_nir_lower_scratch.c | ||
| v3d_nir_lower_txf_ms.c | ||
| vir.c | ||
| vir_dump.c | ||
| vir_live_variables.c | ||
| vir_opt_constant_alu.c | ||
| vir_opt_copy_propagate.c | ||
| vir_opt_dead_code.c | ||
| vir_opt_redundant_flags.c | ||
| vir_opt_small_immediates.c | ||
| vir_register_allocate.c | ||
| vir_to_qpu.c | ||