mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-23 22:00:13 +01:00
nir/glsl: Stop carying a pointer to the nir_shader in the visitor
This commit is contained in:
parent
8f3c236674
commit
add8c837b5
1 changed files with 3 additions and 6 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue