From 13e750aabe73a8e08e26b9b7139e01fd72c1118c Mon Sep 17 00:00:00 2001 From: Christian Gmeiner Date: Wed, 19 Feb 2025 11:18:43 +0100 Subject: [PATCH] nir: Add bool return value to nir_lower_clip_halfz(..) Signed-off-by: Christian Gmeiner Reviewed-by: Alyssa Rosenzweig Part-of: --- src/compiler/nir/nir.h | 2 +- src/compiler/nir/nir_lower_clip_halfz.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h index 45f98a1aa7d..e8938ee8230 100644 --- a/src/compiler/nir/nir.h +++ b/src/compiler/nir/nir.h @@ -4851,7 +4851,7 @@ bool nir_lower_vars_to_scratch(nir_shader *shader, bool nir_lower_scratch_to_var(nir_shader *nir); -void nir_lower_clip_halfz(nir_shader *shader); +bool nir_lower_clip_halfz(nir_shader *shader); void nir_shader_gather_info(nir_shader *shader, nir_function_impl *entrypoint); diff --git a/src/compiler/nir/nir_lower_clip_halfz.c b/src/compiler/nir/nir_lower_clip_halfz.c index f0b78db0b67..eb0dc588263 100644 --- a/src/compiler/nir/nir_lower_clip_halfz.c +++ b/src/compiler/nir/nir_lower_clip_halfz.c @@ -51,15 +51,15 @@ lower_pos_write(nir_builder *b, nir_intrinsic_instr *intr, return true; } -void +bool nir_lower_clip_halfz(nir_shader *shader) { if (shader->info.stage != MESA_SHADER_VERTEX && shader->info.stage != MESA_SHADER_GEOMETRY && shader->info.stage != MESA_SHADER_TESS_EVAL) - return; + return false; - nir_shader_intrinsics_pass(shader, lower_pos_write, - nir_metadata_control_flow, - NULL); + return nir_shader_intrinsics_pass(shader, lower_pos_write, + nir_metadata_control_flow, + NULL); }