mesa/src/broadcom
Iago Toral Quiroga 80b0483ea9 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>
(cherry picked from commit 1174f37609)
2022-11-09 21:22:06 +00:00
..
ci vc4: mark piglit copypixels-(draw-)sync as flaky 2022-10-25 16:24:59 +00:00
cle broadcom: fix dependencies in static_library() calls 2022-09-14 09:38:28 +00:00
clif v3d/clif: add support for dumping GS shader state 2021-10-13 21:23:10 +00:00
common broadcom/compiler: increase V3D_MAX_BUFFE_RANGE to 2^30 bytes 2022-09-22 11:07:26 +00:00
compiler broadcom/compiler: avoid using ldvary sequence to hide latency of branching 2022-11-09 21:22:06 +00:00
drm-shim Use proper types for meson objects 2022-04-18 13:03:08 +03:00
qpu broadcom/compiler: detect unifa write from signal 2022-09-20 06:56:28 +00:00
simulator broadcom/simulator: add a helper to get the amount of free heap memory 2022-09-09 11:14:03 +00:00
vulkan v3dv: use vk_alloc instead of malloc 2022-11-09 21:22:05 +00:00
.editorconfig broadcom: add editorconfig 2017-07-25 14:44:52 -07:00
meson.build meson: drop duplicate lib in lib name 2022-08-22 08:35:41 +00:00