From 2648ccb341ae04c4b1346fc5d1cf7a3e0cf5d497 Mon Sep 17 00:00:00 2001 From: Christian Gmeiner Date: Sun, 13 Mar 2022 12:40:24 +0100 Subject: [PATCH] nir: Use const for nir_shader_get_entrypoint(..) nir_shader_get_entrypoint(..) should not modify the passed nir_shader object. Enforce this by marking shader paramenter as const. Signed-off-by: Christian Gmeiner Reviewed-by: Rob Clark Reviewed-by: Mihai Preda Reviewed-by: Jason Ekstrand Part-of: --- src/compiler/nir/nir.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h index 1ac1415d1a6..60f6786c77f 100644 --- a/src/compiler/nir/nir.h +++ b/src/compiler/nir/nir.h @@ -3640,7 +3640,7 @@ typedef struct nir_shader { foreach_list_typed(nir_function, func, node, &(shader)->functions) static inline nir_function_impl * -nir_shader_get_entrypoint(nir_shader *shader) +nir_shader_get_entrypoint(const nir_shader *shader) { nir_function *func = NULL; -- 2.34.1