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>
*/
struct ptn_compile {
- struct gl_program *prog;
+ const struct gl_program *prog;
nir_builder build;
bool error;
}
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;
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