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); }