mesa/src/broadcom/compiler
Iago Toral Quiroga 5c42d6c62f v3dv: implement VK_EXT_shader_demote_to_helper_invocation
Demoting means that we don't execute any writes to memory but
otherwise the invocation continues to execute. Particularly,
subgroup operations and derivatives must work.

Our implementation of discard does exactly this by using
setmsf to prevent writes for the affected invocations, the
only difference for us is that with discard/terminate we
want to be more careful with emitting quad loads for tmu
operations, since the invocations are not supposed to be
running any more and load offsets may not be valid, but with
demote the invocations are not terminated and thus we should
emit memory reads for them to ensure quad operations and
derivatives from invocations that have not been demoted still
work.

Since we use the sample mask to implement demotes we can't tell
whether a particular helper invocation was originally such
(gl_HelperInvocation in GLSL) or was later demoted
(OpIsHelperInvocationEXT added with SPV_EXT_demote_to_helper_invocation),
so we use nir_lower_is_helper_invocation to take care of this.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26949>
2024-01-09 13:22:37 +00:00
..
meson.build broadcom/compiler: remove include of gallium headers from meson.build 2023-12-12 10:03:11 +00:00
nir_to_vir.c v3dv: implement VK_EXT_shader_demote_to_helper_invocation 2024-01-09 13:22:37 +00:00
qpu_schedule.c broadcom: fix scheduling dependencies for SETMSF instruction 2023-12-12 12:58:42 +00:00
qpu_validate.c broadcom: only support v42 and v71 2023-11-02 11:59:08 +01:00
v3d_compiler.h broadcom: disable perquad tmu loads after discards 2023-12-15 16:35:50 +00:00
v3d_nir_lower_image_load_store.c broadcom/compiler: update image store lowering to use v71 new packing/conversion instructions 2023-11-20 08:20:31 +00:00
v3d_nir_lower_io.c broadcom: only support v42 and v71 2023-11-02 11:59:08 +01:00
v3d_nir_lower_line_smooth.c treewide: Use nir_before/after_impl for more elaborate cases 2023-08-30 19:30:58 +00:00
v3d_nir_lower_load_store_bitsize.c treewide: Drop nir_ssa_for_src users 2023-09-18 10:25:17 -04:00
v3d_nir_lower_logic_ops.c nir: Drop most uses if nir_instr_rewrite_src() 2023-08-18 01:00:15 +00:00
v3d_nir_lower_scratch.c treewide: Drop nir_ssa_for_src users 2023-09-18 10:25:17 -04:00
v3d_nir_lower_txf_ms.c nir: Take a nir_def * in nir_tex_instr_add_src() 2023-08-18 01:00:14 +00:00
v3d_packing.c broadcom/compiler: add v3d_pack_unnormalized_coordinates helper 2023-10-31 13:00:34 +01:00
v3d_tex.c broadcom/compiler: set properly lod query 2023-11-02 11:59:08 +01:00
vir.c v3dv: implement VK_EXT_shader_demote_to_helper_invocation 2024-01-09 13:22:37 +00:00
vir_dump.c broadcom: only support v42 and v71 2023-11-02 11:59:08 +01:00
vir_live_variables.c broadcom/compiler: update payload registers handling when computing live intervals 2023-10-13 22:37:42 +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: only support v42 and v71 2023-11-02 11:59:08 +01:00
vir_opt_dead_code.c broadcom: only support v42 and v71 2023-11-02 11:59:08 +01:00
vir_opt_redundant_flags.c broadcom/qpu: define v3d_qpu_input, use on v3d_qpu_alu_instr 2023-10-13 22:37:41 +00:00
vir_opt_small_immediates.c broadcom: only support v42 and v71 2023-11-02 11:59:08 +01:00
vir_register_allocate.c broadcom: only support v42 and v71 2023-11-02 11:59:08 +01:00
vir_to_qpu.c broadcom: only support v42 and v71 2023-11-02 11:59:08 +01:00