diff options
author | Kenneth Graunke <kenneth@whitecape.org> | 2016-08-24 19:09:57 -0700 |
---|---|---|
committer | Kenneth Graunke <kenneth@whitecape.org> | 2016-08-25 19:18:24 -0700 |
commit | 93bfa1d7a2e70a72a01c48a04c208845c22f9376 (patch) | |
tree | e15311ebb02be905f41d94d09afb5e5c1ac5ca65 /src/compiler/nir/nir_lower_io_to_temporaries.c | |
parent | 8479b03c5826f32355775d865d99d69c829e65bb (diff) | |
download | external_mesa3d-93bfa1d7a2e70a72a01c48a04c208845c22f9376.zip external_mesa3d-93bfa1d7a2e70a72a01c48a04c208845c22f9376.tar.gz external_mesa3d-93bfa1d7a2e70a72a01c48a04c208845c22f9376.tar.bz2 |
nir: Change nir_shader_get_entrypoint to return an impl.
Jason suggested adding an assert(function->impl) here. All callers
of this function actually want ->impl, so I decided just to change
the API.
We also change the nir_lower_io_to_temporaries API here. All but one
caller passed nir_shader_get_entrypoint(), and with the previous commit,
it now uses a nir_function_impl internally. Folding this change in
avoids the need to change it and change it back.
v2: Fix one call I missed in ir3_compiler (caught by Eric).
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Diffstat (limited to 'src/compiler/nir/nir_lower_io_to_temporaries.c')
-rw-r--r-- | src/compiler/nir/nir_lower_io_to_temporaries.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/nir/nir_lower_io_to_temporaries.c b/src/compiler/nir/nir_lower_io_to_temporaries.c index 8cbf683..4f615d3 100644 --- a/src/compiler/nir/nir_lower_io_to_temporaries.c +++ b/src/compiler/nir/nir_lower_io_to_temporaries.c @@ -148,7 +148,7 @@ create_shadow_temp(struct lower_io_state *state, nir_variable *var) } void -nir_lower_io_to_temporaries(nir_shader *shader, nir_function *entrypoint, +nir_lower_io_to_temporaries(nir_shader *shader, nir_function_impl *entrypoint, bool outputs, bool inputs) { struct lower_io_state state; @@ -157,7 +157,7 @@ nir_lower_io_to_temporaries(nir_shader *shader, nir_function *entrypoint, return; state.shader = shader; - state.entrypoint = entrypoint->impl; + state.entrypoint = entrypoint; if (inputs) exec_list_move_nodes_to(&shader->inputs, &state.old_inputs); |