About Social Code
aboutsummaryrefslogtreecommitdiff
path: root/src/intel/vulkan/anv_nir_push_descriptor_analysis.c
diff options
context:
space:
mode:
authorYonggang Luo <luoyonggang@gmail.com>2023-06-30 04:22:52 +0800
committerMarge Bot <emma+marge@anholt.net>2023-07-07 14:02:40 +0000
commit7471bc2574dfb0f22555210f1da317572ff30a02 (patch)
tree6d2d4ff4f6e584b67f921d85095abd7a10c9714f /src/intel/vulkan/anv_nir_push_descriptor_analysis.c
parentb6cfb9aa9d8c9d913b8c37f2c202f004725e4aab (diff)
intel/vulkan: Convert to use nir_foreach_function_impl when possible
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24040>
Diffstat (limited to 'src/intel/vulkan/anv_nir_push_descriptor_analysis.c')
-rw-r--r--src/intel/vulkan/anv_nir_push_descriptor_analysis.c21
1 files changed, 6 insertions, 15 deletions
diff --git a/src/intel/vulkan/anv_nir_push_descriptor_analysis.c b/src/intel/vulkan/anv_nir_push_descriptor_analysis.c
index 7367c55cc82..cd5efa19e00 100644
--- a/src/intel/vulkan/anv_nir_push_descriptor_analysis.c
+++ b/src/intel/vulkan/anv_nir_push_descriptor_analysis.c
@@ -75,11 +75,8 @@ anv_nir_compute_used_push_descriptors(nir_shader *shader,
}
}
- nir_foreach_function(function, shader) {
- if (!function->impl)
- continue;
-
- nir_foreach_block(block, function->impl) {
+ nir_foreach_function_impl(impl, shader) {
+ nir_foreach_block(block, impl) {
nir_foreach_instr(instr, block) {
if (instr->type != nir_instr_type_intrinsic)
continue;
@@ -119,11 +116,8 @@ anv_nir_loads_push_desc_buffer(nir_shader *nir,
if (push_set_layout == NULL)
return false;
- nir_foreach_function(function, nir) {
- if (!function->impl)
- continue;
-
- nir_foreach_block(block, function->impl) {
+ nir_foreach_function_impl(impl, nir) {
+ nir_foreach_block(block, impl) {
nir_foreach_instr(instr, block) {
if (instr->type != nir_instr_type_intrinsic)
continue;
@@ -180,11 +174,8 @@ anv_nir_push_desc_ubo_fully_promoted(nir_shader *nir,
ubos_fully_promoted |= BITFIELD_BIT(bind_layout->descriptor_index);
}
- nir_foreach_function(function, nir) {
- if (!function->impl)
- continue;
-
- nir_foreach_block(block, function->impl) {
+ nir_foreach_function_impl(impl, nir) {
+ nir_foreach_block(block, impl) {
nir_foreach_instr(instr, block) {
if (instr->type != nir_instr_type_intrinsic)
continue;