summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2016-08-24 19:15:53 -0700
committerKenneth Graunke <[email protected]>2016-08-25 19:18:11 -0700
commit8479b03c5826f32355775d865d99d69c829e65bb (patch)
tree5104c8650c6e8862e62007f2ae55854f37f252ea /src
parentda85b5a9f1b22a8f6cae1a3b335dc5f31011bcb1 (diff)
nir: Make nir_lower_io_to_temporaries store an impl internally.
This changes the pass internals to work with a nir_function_impl directly rather than a nir_function. The next patch will change the API. v2: Rebase after framebuffer fetch landed. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Connor Abbott <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/compiler/nir/nir_lower_io_to_temporaries.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/compiler/nir/nir_lower_io_to_temporaries.c b/src/compiler/nir/nir_lower_io_to_temporaries.c
index c8f94ff6eb5..8cbf6838ee8 100644
--- a/src/compiler/nir/nir_lower_io_to_temporaries.c
+++ b/src/compiler/nir/nir_lower_io_to_temporaries.c
@@ -34,7 +34,7 @@
struct lower_io_state {
nir_shader *shader;
- nir_function *entrypoint;
+ nir_function_impl *entrypoint;
struct exec_list old_outputs;
struct exec_list old_inputs;
};
@@ -93,7 +93,7 @@ emit_output_copies_impl(struct lower_io_state *state, nir_function_impl *impl)
}
}
}
- } else if (impl->function == state->entrypoint) {
+ } else if (impl == state->entrypoint) {
nir_cursor cursor = nir_before_block(nir_start_block(impl));
emit_copies(cursor, state->shader, &state->old_outputs,
&state->shader->outputs);
@@ -114,7 +114,7 @@ emit_output_copies_impl(struct lower_io_state *state, nir_function_impl *impl)
static void
emit_input_copies_impl(struct lower_io_state *state, nir_function_impl *impl)
{
- if (impl->function == state->entrypoint) {
+ if (impl == state->entrypoint) {
nir_cursor cursor = nir_before_block(nir_start_block(impl));
emit_copies(cursor, state->shader, &state->old_inputs,
&state->shader->inputs);
@@ -157,7 +157,7 @@ nir_lower_io_to_temporaries(nir_shader *shader, nir_function *entrypoint,
return;
state.shader = shader;
- state.entrypoint = entrypoint;
+ state.entrypoint = entrypoint->impl;
if (inputs)
exec_list_move_nodes_to(&shader->inputs, &state.old_inputs);