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 <kenneth@whitecape.org> Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user