From d0f39a2fcd82da9b1e293ddfd2f5ea6e78d28df8 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Tue, 7 Apr 2015 15:07:33 -0700 Subject: [PATCH] nir: Constify prog_to_nir's gl_program pointer. prog_to_nir should not modify the incoming Mesa IR program - just translate it. Signed-off-by: Kenneth Graunke Reviewed-by: Jason Ekstrand Reviewed-by: Ian Romanick --- src/mesa/program/prog_to_nir.c | 4 ++-- src/mesa/program/prog_to_nir.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mesa/program/prog_to_nir.c b/src/mesa/program/prog_to_nir.c index b298d076e5d..c738f5073b8 100644 --- a/src/mesa/program/prog_to_nir.c +++ b/src/mesa/program/prog_to_nir.c @@ -43,7 +43,7 @@ */ struct ptn_compile { - struct gl_program *prog; + const struct gl_program *prog; nir_builder build; bool error; @@ -1052,7 +1052,7 @@ setup_registers_and_variables(struct ptn_compile *c) } struct nir_shader * -prog_to_nir(struct gl_program *prog, const nir_shader_compiler_options *options) +prog_to_nir(const struct gl_program *prog, const nir_shader_compiler_options *options) { struct ptn_compile *c; struct nir_shader *s; diff --git a/src/mesa/program/prog_to_nir.h b/src/mesa/program/prog_to_nir.h index 3c9b66401d4..34e4cd10461 100644 --- a/src/mesa/program/prog_to_nir.h +++ b/src/mesa/program/prog_to_nir.h @@ -28,7 +28,7 @@ extern "C" { #endif -struct nir_shader *prog_to_nir(struct gl_program *prog, +struct nir_shader *prog_to_nir(const struct gl_program *prog, const nir_shader_compiler_options *options); #ifdef __cplusplus -- 2.30.2