compiler/rust: Add a nir_shader::get_entrypoint() helper

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41896>
This commit is contained in:
Faith Ekstrand 2026-05-07 22:37:19 -04:00 committed by Marge Bot
parent 8b71407672
commit 5922db15bf

View file

@ -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() }
}
}