From: Jason Ekstrand Date: Fri, 25 Mar 2016 17:05:36 +0000 (-0700) Subject: nir/glsl: Stop carying a pointer to the nir_shader in the visitor X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=add8c837b5ec7e8ef6a0eefe4bd673f944210fdb;p=mesa.git nir/glsl: Stop carying a pointer to the nir_shader in the visitor --- diff --git a/src/compiler/nir/glsl_to_nir.cpp b/src/compiler/nir/glsl_to_nir.cpp index 7b8b4668848..2a469ec7355 100644 --- a/src/compiler/nir/glsl_to_nir.cpp +++ b/src/compiler/nir/glsl_to_nir.cpp @@ -46,7 +46,7 @@ namespace { class nir_visitor : public ir_visitor { public: - nir_visitor(nir_shader *shader, gl_shader *sh); + nir_visitor(nir_shader *shader); ~nir_visitor(); virtual void visit(ir_variable *); @@ -85,8 +85,6 @@ private: bool supports_ints; - struct gl_shader *sh; - nir_shader *shader; nir_function_impl *impl; nir_builder b; @@ -140,7 +138,7 @@ glsl_to_nir(const struct gl_shader_program *shader_prog, nir_shader *shader = nir_shader_create(NULL, stage, options); - nir_visitor v1(shader, sh); + nir_visitor v1(shader); nir_function_visitor v2(&v1); v2.run(sh->ir); visit_exec_list(sh->ir, &v1); @@ -215,11 +213,10 @@ glsl_to_nir(const struct gl_shader_program *shader_prog, return shader; } -nir_visitor::nir_visitor(nir_shader *shader, gl_shader *sh) +nir_visitor::nir_visitor(nir_shader *shader) { this->supports_ints = shader->options->native_integers; this->shader = shader; - this->sh = sh; this->is_global = true; this->var_table = _mesa_hash_table_create(NULL, _mesa_hash_pointer, _mesa_key_pointer_equal);