mesa/src/amd/vulkan
Konstantin Seurer de32f9275f treewide: add & use parent instr helpers
We add a bunch of new helpers to avoid the need to touch >parent_instr,
including the full set of:

* nir_def_is_*
* nir_def_as_*_or_null
* nir_def_as_* [assumes the right instr type]
* nir_src_is_*
* nir_src_as_*
* nir_scalar_is_*
* nir_scalar_as_*

Plus nir_def_instr() where there's no more suitable helper.

Also an existing helper is renamed to unify all the names, while we're
churning the tree:

* nir_src_as_alu_instr -> nir_src_as_alu

..and then we port the tree to use the helpers as much as possible, using
nir_def_instr() where that does not work.

Acked-by: Marek Olšák <maraeo@gmail.com>

---

To eliminate nir_def::parent_instr we need to churn the tree anyway, so I'm
taking this opportunity to clean up a lot of NIR patterns.

Co-authored-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38313>
2025-11-12 21:22:13 +00:00
..
bvh radv: Always use compact bvh encoding 2025-10-24 21:17:10 +00:00
layers radv/null_device: don't attempt to upload shaders 2025-11-06 13:53:06 +00:00
meta radv/meta: fuse depth/stencil aspects copy with the GFX path 2025-11-12 07:35:33 +00:00
nir treewide: add & use parent instr helpers 2025-11-12 21:22:13 +00:00
tests radv/tests: use vkGetPipelineKeyKHR() instead of compiling pipelines 2025-11-07 12:15:38 +01:00
winsys/amdgpu radv: add RADV_DEBUG=dumpibs to dump command buffers 2025-11-12 08:52:17 +00:00
.clang-format radv/clang-format: Do not indent C++ modifiers 2023-11-02 15:48:36 +00:00
.editorconfig
meson.build radv: delete winsys/null/* 2025-11-06 13:53:07 +00:00
radv_acceleration_structure.c radv: Report smaller bvh sizes when possible 2025-10-24 21:17:10 +00:00
radv_aco_shader_info.h radv/shader_info: rename gs_ring_info -> legacy_gs_info and use union with ngg_info 2025-11-03 13:38:38 +01:00
radv_android.c radv: use AHARDWAREBUFFER_USAGE_CAMERA_MASK 2025-07-09 03:47:06 +00:00
radv_android.h radv: use SPDX-License-Identifier 2024-04-08 07:17:31 +00:00
radv_buffer.c Revert "radv,driconf: Add radv_force_64k_sparse_alignment config" 2025-06-13 06:43:47 +00:00
radv_buffer.h radv: switch to device address from vk_buffer 2025-03-06 09:46:01 +00:00
radv_buffer_view.c radv: Remove offset parameter from radv_make_texel_buffer_descriptor. 2025-05-02 09:13:14 +00:00
radv_buffer_view.h radv: Remove offset parameter from radv_make_texel_buffer_descriptor. 2025-05-02 09:13:14 +00:00
radv_check_va.py radv: Add sparse mappings to radv_check_va.py. 2024-11-29 12:57:42 +00:00
radv_cmd_buffer.c radv: fix supporting more tess parameters with TCS for ESO unlinked shaders 2025-11-12 16:21:17 +00:00
radv_cmd_buffer.h radv: implement new input attachment information for dynamic rendering 2025-10-31 07:51:21 +00:00
radv_constants.h radv: re-format using clang-format 2025-09-09 05:48:56 +00:00
radv_cp_dma.c radv: use ac_emit_cp_pfp_sync_me() more 2025-10-16 06:31:37 +00:00
radv_cp_dma.h radv: switch to radv_cmd_stream everywhere 2025-08-08 11:49:23 +00:00
radv_cp_reg_shadowing.c radv: use radv_buffer_get_va() more 2025-10-27 07:56:44 +00:00
radv_cp_reg_shadowing.h radv: switch to radv_cmd_stream everywhere 2025-08-08 11:49:23 +00:00
radv_cs.c amd: don't use non-existent GL1 packet fields on gfx12 2025-10-29 12:50:34 +00:00
radv_cs.h radv: add GFX11 packed context registers helpers 2025-11-05 15:14:58 +00:00
radv_debug.c radv/amdgpu: add a way to identify preamble/postamble when dumping CS 2025-11-12 08:52:17 +00:00
radv_debug.h radv: add RADV_DEBUG=dumpibs to dump command buffers 2025-11-12 08:52:17 +00:00
radv_debug_nir.c treewide: use UTIL_DYNARRAY_INIT 2025-11-04 13:39:48 +00:00
radv_debug_nir.h radv: Add RADV_DEBUG=validatevas for address validation in nir 2025-08-15 10:32:35 +00:00
radv_descriptor_pool.c radv: implement a new descriptor sets allocator 2025-10-24 06:25:17 +00:00
radv_descriptor_pool.h radv: implement a new descriptor sets allocator 2025-10-24 06:25:17 +00:00
radv_descriptor_set.c radv: implement a new descriptor sets allocator 2025-10-24 06:25:17 +00:00
radv_descriptor_set.h radv: implement a new descriptor sets allocator 2025-10-24 06:25:17 +00:00
radv_descriptor_update_template.c radv: reduce the combined image/sampler desc size on GFX11+ 2025-08-14 06:47:30 +00:00
radv_descriptor_update_template.h radv: move descriptor update implementation to radv_descriptor_update_template.c/h 2025-06-27 07:55:37 +00:00
radv_descriptors.c radv: reduce the combined image/sampler desc size on GFX11+ 2025-08-14 06:47:30 +00:00
radv_descriptors.h radv: reduce the combined image/sampler desc size on GFX11+ 2025-08-14 06:47:30 +00:00
radv_device.c radv: move back ac_sqtt_{init,finish}() to the right places 2025-11-07 12:19:38 +01:00
radv_device.h radv: hash keep_executable_info into shader key rather than device cache key 2025-11-06 13:53:06 +00:00
radv_device_memory.c radv: add radv_wait_for_vm_map_updates drirc and enable for Forza Horizon 5 2025-10-27 07:56:45 +00:00
radv_device_memory.h radv: add import and export handle_type in radv_alloc_memory 2025-03-03 08:26:51 +00:00
radv_dgc.c treewide: use nir_store_global alias of nir_build_store_global 2025-10-21 12:37:58 +02:00
radv_dgc.h radv: Remove unneeded forward declaration of qf from dgc header 2025-10-14 12:33:19 +00:00
radv_event.c radv: use SPDX-License-Identifier 2024-04-08 07:17:31 +00:00
radv_event.h radv: use SPDX-License-Identifier 2024-04-08 07:17:31 +00:00
radv_formats.c radv: allow ds<->color copies on compute/transfer queues 2025-10-31 07:51:22 +00:00
radv_formats.h build: avoid redefining unreachable() which is standard in C23 2025-07-31 17:49:42 +00:00
radv_host_image_copy.c radv: implement vkTransitionImageLayout() 2025-07-15 09:12:16 +00:00
radv_image.c ac/surface: pass all ac_compute_surface info via ac_surf_config, not radeon_surf 2025-10-29 12:50:44 +00:00
radv_image.h radv,ac: Split has_tc_compat_zrange_bug into Z and ZS, document it 2025-10-02 08:29:49 +00:00
radv_image_view.c vulkan: Drop the driver_internal from vk_image_view_init/create() 2025-09-05 23:34:14 +00:00
radv_image_view.h radv: add a function to create an image view for HiZ surfaces 2025-08-12 13:48:09 +00:00
radv_instance.c radv: add RADV_DEBUG=dumpibs to dump command buffers 2025-11-12 08:52:17 +00:00
radv_instance.h radv: do not report wave32 in gl_SubgroupSize for Doom Dark Ages 2025-11-04 16:52:13 +00:00
radv_llvm_helper.cpp amd,radeonsi: reduce legacy::PassManager use to only run backend passes 2024-10-05 09:10:06 +00:00
radv_llvm_helper.h radv: use SPDX-License-Identifier 2024-04-08 07:17:31 +00:00
radv_nir_to_llvm.c radv: use CU mode when LDS is used 2025-10-15 13:37:48 +01:00
radv_nir_to_llvm.h radv: use SPDX-License-Identifier 2024-04-08 07:17:31 +00:00
radv_perfcounter.c amd,radv,radeonsi: add ac_emit_cp_spi_config_cntl() 2025-10-23 08:29:27 +00:00
radv_perfcounter.h radv: Remove qf from radv_spm/sqtt/perfcounter where applicable 2025-10-14 12:33:20 +00:00
radv_physical_device.c radv/video: Implement VK_VALVE_video_encode_rgb_conversion 2025-11-12 08:25:36 +00:00
radv_physical_device.h radv: do not report wave32 in gl_SubgroupSize for Doom Dark Ages 2025-11-04 16:52:13 +00:00
radv_pipeline.c radv: Fix PSO history with RT pipelines 2025-11-12 08:00:54 +00:00
radv_pipeline.h radv: rename indirect_descriptor_sets to indirect_descriptors 2025-10-10 13:22:03 +00:00
radv_pipeline_binary.c treewide: use UTIL_DYNARRAY_INIT 2025-11-04 13:39:48 +00:00
radv_pipeline_binary.h radv: add initial support for pipeline binaries 2024-09-10 08:19:52 +00:00
radv_pipeline_cache.c radv: Add RADV_DEBUG=validatevas for address validation in nir 2025-08-15 10:32:35 +00:00
radv_pipeline_cache.h radv: remove unused forwarded declarations of pipeline layout 2025-08-18 07:25:34 +00:00
radv_pipeline_compute.c radv: gather push constant size from shaders for pipelines 2025-10-23 07:25:41 +00:00
radv_pipeline_compute.h radv: rename indirect_descriptor_sets to indirect_descriptors 2025-10-10 13:22:03 +00:00
radv_pipeline_graphics.c radv: remove radv_pipeline_layout::push_constant_size 2025-10-23 07:25:41 +00:00
radv_pipeline_graphics.h radv: pre-compute vgt_outprim_type 2025-09-15 19:10:39 +00:00
radv_pipeline_layout.c radv: remove radv_pipeline_layout::push_constant_size 2025-10-23 07:25:41 +00:00
radv_pipeline_layout.h radv: remove radv_pipeline_layout::push_constant_size 2025-10-23 07:25:41 +00:00
radv_pipeline_rt.c radv: use radv_buffer_get_va() more 2025-10-27 07:56:44 +00:00
radv_pipeline_rt.h all: rename gl_shader_stage to mesa_shader_stage 2025-08-06 10:28:40 +08:00
radv_query.c radv/video: Only use write_memory for encode feedback with full support 2025-11-03 08:39:59 +00:00
radv_query.h radv: re-run clang-format 2025-07-16 09:10:33 +02:00
radv_queue.c amd: constify struct radeon_surf 2025-10-29 12:50:44 +00:00
radv_queue.h radv: replace radeon_cmdbuf by ac_cmdbuf completely 2025-10-08 18:00:15 +00:00
radv_radeon_winsys.h radv/amdgpu: add a way to identify preamble/postamble when dumping CS 2025-11-12 08:52:17 +00:00
radv_rmv.c radv: use radv_buffer_get_va() more 2025-10-27 07:56:44 +00:00
radv_rmv.h radv/rmv: fix image binds logging for disjoint images 2024-04-10 11:23:40 +00:00
radv_rra.c treewide: use UTIL_DYNARRAY_INIT 2025-11-04 13:39:48 +00:00
radv_rra.h radv/rra: Increase rra_validation_context::location 2025-07-22 14:40:33 +00:00
radv_rra_gfx10_3.c radv/rra: Only write used BLAS 2025-07-22 14:40:33 +00:00
radv_rra_gfx12.c radv/rra/gfx12: Properly validate geometry indices 2025-10-21 19:32:54 +00:00
radv_sampler.c radv: Actually fail custom border color sampler creation. 2025-10-10 14:25:54 +00:00
radv_sampler.h radv: fix capture/replay with sampler border color 2025-09-12 06:51:51 +00:00
radv_sdma.c radv: use radv_buffer_get_va() more 2025-10-27 07:56:44 +00:00
radv_sdma.h amd,radv: move SDMA utility helpers to common code 2025-10-21 13:31:20 +02:00
radv_shader.c radv/null_device: don't attempt to upload shaders 2025-11-06 13:53:06 +00:00
radv_shader.h radv: hash keep_executable_info into shader key rather than device cache key 2025-11-06 13:53:06 +00:00
radv_shader_args.c radv,aco: wait for all VMEM loads when the prolog loads large 64-bit attributes 2025-11-05 07:26:45 +00:00
radv_shader_args.h radv: declare a new user SGPR for dynamic descriptors 2025-10-14 15:34:43 +00:00
radv_shader_info.c radv: support more tessellation parameters with TCS for ESO unlinked shaders 2025-11-05 15:49:25 +00:00
radv_shader_info.h radv: support more tessellation parameters with TCS for ESO unlinked shaders 2025-11-05 15:49:25 +00:00
radv_shader_object.c radv: use radv_get_shader_layout() more with ESO 2025-11-03 08:00:35 +00:00
radv_shader_object.h radv: gather push constant size from shaders for ESO 2025-10-23 07:25:41 +00:00
radv_spm.c radv: fix reserving enough space for emitting the SPM setup 2025-10-30 07:36:27 +00:00
radv_spm.h radv: Remove qf from radv_spm/sqtt/perfcounter where applicable 2025-10-14 12:33:20 +00:00
radv_sqtt.c radv: move back ac_sqtt_{init,finish}() to the right places 2025-11-07 12:19:38 +01:00
radv_sqtt.h amd,radv,radeonsi: add ac_emit_cp_spi_config_cntl() 2025-10-23 08:29:27 +00:00
radv_video.c radv/video: Implement VK_VALVE_video_encode_rgb_conversion 2025-11-12 08:25:36 +00:00
radv_video.h radv/video: Support intra only without dpb 2025-11-06 08:41:34 +00:00
radv_video_enc.c radv/video: Implement VK_VALVE_video_encode_rgb_conversion 2025-11-12 08:25:36 +00:00
radv_wsi.c vulkan/wsi: Make get_blit_queue return a struct vk_queue * 2025-08-22 23:05:03 +00:00
radv_wsi.h radv: use SPDX-License-Identifier 2024-04-08 07:17:31 +00:00