Module: Mesa Branch: main Commit: 81ec1fa0b5b924902b05531817a8b7b38e449bf1 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=81ec1fa0b5b924902b05531817a8b7b38e449bf1
Author: Eric Engestrom <[email protected]> Date: Mon Dec 4 18:34:33 2023 +0000 nvk: use `||` instead of `|` between bools We have to split each call into its own variable, because simply replacing `|` with `||` would short-circuit the right side when the left side succeeds. Fixes: dadf9d59e6f9e0c4a7a7 ("nvk: Add support for variable pointers") Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26509> --- src/nouveau/vulkan/nvk_nir_lower_descriptors.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/nouveau/vulkan/nvk_nir_lower_descriptors.c b/src/nouveau/vulkan/nvk_nir_lower_descriptors.c index 2fb268e21c7..52e88ef49c2 100644 --- a/src/nouveau/vulkan/nvk_nir_lower_descriptors.c +++ b/src/nouveau/vulkan/nvk_nir_lower_descriptors.c @@ -669,12 +669,15 @@ nvk_nir_lower_descriptors(nir_shader *nir, * are left and lowers them to slightly less efficient but variable- * pointers-correct versions. */ - return nir_shader_instructions_pass(nir, try_lower_descriptors_instr, - nir_metadata_block_index | - nir_metadata_dominance, - (void *)&ctx) | - nir_shader_instructions_pass(nir, lower_ssbo_descriptor_instr, - nir_metadata_block_index | - nir_metadata_dominance, - (void *)&ctx); + bool pass_lower_descriptors = + nir_shader_instructions_pass(nir, try_lower_descriptors_instr, + nir_metadata_block_index | + nir_metadata_dominance, + (void *)&ctx); + bool pass_lower_ssbo = + nir_shader_instructions_pass(nir, lower_ssbo_descriptor_instr, + nir_metadata_block_index | + nir_metadata_dominance, + (void *)&ctx); + return pass_lower_descriptors || pass_lower_ssbo; }
