From 5922db15bfd7dda2ae35d9913b0590a08d60674d Mon Sep 17 00:00:00 2001 From: Faith Ekstrand Date: Thu, 7 May 2026 22:37:19 -0400 Subject: [PATCH] compiler/rust: Add a nir_shader::get_entrypoint() helper Part-of: --- src/compiler/rust/nir.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/compiler/rust/nir.rs b/src/compiler/rust/nir.rs index 90d99407078..280db7b0b9b 100644 --- a/src/compiler/rust/nir.rs +++ b/src/compiler/rust/nir.rs @@ -635,4 +635,8 @@ impl nir_shader { pub fn iter_variables(&self) -> ExecListIter<'_, nir_variable> { ExecListIter::new(&self.variables, offset_of!(nir_variable, node)) } + + pub fn get_entrypoint(&self) -> Option<&nir_function_impl> { + unsafe { nir_shader_get_entrypoint(self).as_ref() } + } }