diff options
author | Kenneth Graunke <[email protected]> | 2015-04-07 15:50:54 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2015-04-10 02:16:33 -0700 |
commit | 500da98e0b96d211eab27629696ef50c47caaff9 (patch) | |
tree | effda7d8f46f8f801353dea0789c92ce8cc1ef4a /src/glsl/nir | |
parent | 709b88ccd8009d98142616cb53c2ad66ddcd52a9 (diff) |
nir: Constify nir_lower_sampler's gl_shader_program pointer.
Now that we're not generating linker errors, we don't actually modify
this.
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/glsl/nir')
-rw-r--r-- | src/glsl/nir/nir.h | 2 | ||||
-rw-r--r-- | src/glsl/nir/nir_lower_samplers.cpp | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/glsl/nir/nir.h b/src/glsl/nir/nir.h index 679911ca8e3..e844e4daef8 100644 --- a/src/glsl/nir/nir.h +++ b/src/glsl/nir/nir.h @@ -1611,7 +1611,7 @@ void nir_lower_alu_to_scalar(nir_shader *shader); void nir_lower_phis_to_scalar(nir_shader *shader); void nir_lower_samplers(nir_shader *shader, - struct gl_shader_program *shader_program, + const struct gl_shader_program *shader_program, gl_shader_stage stage); void nir_lower_system_values(nir_shader *shader); diff --git a/src/glsl/nir/nir_lower_samplers.cpp b/src/glsl/nir/nir_lower_samplers.cpp index 90e023aab3d..cf8ab832516 100644 --- a/src/glsl/nir/nir_lower_samplers.cpp +++ b/src/glsl/nir/nir_lower_samplers.cpp @@ -36,7 +36,7 @@ extern "C" { } static unsigned -get_sampler_index(struct gl_shader_program *shader_program, +get_sampler_index(const struct gl_shader_program *shader_program, gl_shader_stage stage, const char *name) { unsigned location; @@ -54,7 +54,7 @@ get_sampler_index(struct gl_shader_program *shader_program, } static void -lower_sampler(nir_tex_instr *instr, struct gl_shader_program *shader_program, +lower_sampler(nir_tex_instr *instr, const struct gl_shader_program *shader_program, gl_shader_stage stage, void *mem_ctx) { if (instr->sampler == NULL) @@ -133,7 +133,7 @@ lower_sampler(nir_tex_instr *instr, struct gl_shader_program *shader_program, typedef struct { void *mem_ctx; - struct gl_shader_program *shader_program; + const struct gl_shader_program *shader_program; gl_shader_stage stage; } lower_state; @@ -154,7 +154,7 @@ lower_block_cb(nir_block *block, void *_state) } static void -lower_impl(nir_function_impl *impl, struct gl_shader_program *shader_program, +lower_impl(nir_function_impl *impl, const struct gl_shader_program *shader_program, gl_shader_stage stage) { lower_state state; @@ -167,7 +167,7 @@ lower_impl(nir_function_impl *impl, struct gl_shader_program *shader_program, } extern "C" void -nir_lower_samplers(nir_shader *shader, struct gl_shader_program *shader_program, +nir_lower_samplers(nir_shader *shader, const struct gl_shader_program *shader_program, gl_shader_stage stage) { nir_foreach_overload(shader, overload) { |