mesa/src/broadcom/compiler
Juan A. Suarez Romero d0e83b6174 broadcom/compiler: change current block on setting spill base
The spill base setting instructions (which includes some uniforms) are
added in the entry block, not in the current block. When ldunif
optimization is applied, the cursor is pointing to instructions in the
entry block, but the current block is a different one. This leads to a
heap-buffer-overflow when going through the list of instructions
(detected by the address sanitizer).

Thus change the current block to entry block, and restore it after the
setup is done.

This fixes
dEQP-VK.ssbo.readonly.layout.single_struct.single_buffer.std430_instance_array_comp_access_store_cols
with address sanitizer enabled.

v2:
 - Set current block instead of disabling ldunif optimization (Iago)

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12221>
2021-08-09 13:15:24 +00:00
..
meson.build broadcom/compiler: add a constant alu optimization pass 2021-02-23 08:08:01 +00:00
nir_to_vir.c nir: add indirect loop unrolling to compiler options 2021-08-03 10:54:50 +00:00
qpu_schedule.c broadcom/compiler: fix add vs. mul 2021-07-12 11:54:03 +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 broadcom/compiler: Add a v3d_compile argument to vir_set_[pu]f 2021-02-12 07:05:33 +00:00
v3d_compiler.h broadcom/compiler: implement nir_intrinsic_load_view_index 2021-07-27 07:31:31 +00:00
v3d_nir_lower_image_load_store.c nir: Make nir_ssa_def_rewrite_uses_after take an SSA value 2021-03-08 16:59:55 +00:00
v3d_nir_lower_io.c v3d: use intrinsic builders 2021-01-06 14:34:41 +00:00
v3d_nir_lower_line_smooth.c v3d: use intrinsic builders 2021-01-06 14:34:41 +00:00
v3d_nir_lower_logic_ops.c broadcom/compiler: consider RT component size when lowering logic ops in Vulkan 2021-05-18 11:28:17 +00:00
v3d_nir_lower_robust_buffer_access.c v3dv: don't lower vulkan resource index result to scalar 2021-06-10 05:47:29 +00:00
v3d_nir_lower_scratch.c nir: Make nir_ssa_def_rewrite_uses take an SSA value 2021-03-08 16:59:55 +00:00
v3d_nir_lower_txf_ms.c v3d: Use nir_shader_lower_instructions() for txf_ms lowering. 2019-07-18 11:28:56 -07:00
vir.c broadcom/compiler: implement gl_PrimitiveID in FS without a GS 2021-07-14 12:05:56 +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 util/hash_table: update users to use new optimal integer hash functions 2020-01-23 17:06:57 +00:00
vir_opt_constant_alu.c broadcom/compiler: optimize constant vfpack 2021-03-22 12:17:13 +00:00
vir_opt_copy_propagate.c v3d: Use ldunif instructions for uniforms. 2019-03-05 12:57:39 -08:00
vir_opt_dead_code.c broadcom/compiler: drop the destination for unused ldunifa 2021-03-04 09:00:15 +01:00
vir_opt_redundant_flags.c v3d: fix checking twice auf flag 2019-06-13 11:45:18 +02: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: change current block on setting spill base 2021-08-09 13:15:24 +00:00
vir_to_qpu.c broadcom/compiler: add a NOP count stat to shader-db 2021-03-31 05:51:22 +00:00