mesa/src/broadcom/compiler
Iago Toral Quiroga 1174f37609 broadcom/compiler: avoid using ldvary sequence to hide latency of branching
This can cause us to stomp the contents of r5 before we have a chance to read
it, like this:

0x3d103186bb800000 nop                           ; nop                         ; ldvary.r0
0x3d105686bbf40000 nop                           ; mov rf26, r5                ; ldvary.r1
0x020000ef0000d000 bu.allna  232, r:unif (0x0000001c / 0.000000)
0x3d1096c6bbf40000 nop                           ; mov rf27, r5                ; ldvary.r2

Here, the MOV in the last instruction is supposed to read r5 produced from
ldvary.r0, but because we have inserted the bu instruction in between now
that read happens at the same time that ldvary.r1 updates r5, stomping the
value we were supposed to read.

Fix this by disallowing injection of a branch instruction in between an ldvary
instruction and its write to the r5 register 2 instructions later.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7062
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19616>
2022-11-09 20:51:25 +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: handle vec2 load/store index 2022-10-28 08:23:32 +02:00
qpu_schedule.c broadcom/compiler: avoid using ldvary sequence to hide latency of branching 2022-11-09 20:51:25 +00:00
qpu_validate.c
v3d33_tex.c
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 broadcom/compiler: drop unused v3d_compile parameter for nir pass 2022-11-04 09:58:10 +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: 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: make several passes to return a progress 2022-07-20 11:35:25 +00:00
vir.c broadcom/compiler: drop unused v3d_compile parameter for nir pass 2022-11-04 09:58:10 +00:00
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 v3d: introduce V3D_DBG() macro to make V3D_DEBUG checks consistent 2022-08-24 23:03:57 +00:00