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);
}
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;
}
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)
typedef struct {
void *mem_ctx;
- struct gl_shader_program *shader_program;
+ const struct gl_shader_program *shader_program;
gl_shader_stage stage;
} lower_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;
}
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) {