From 93bfa1d7a2e70a72a01c48a04c208845c22f9376 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Wed, 24 Aug 2016 19:09:57 -0700 Subject: 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 Reviewed-by: Jason Ekstrand Reviewed-by: Connor Abbott --- src/intel/vulkan/anv_pipeline.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/intel/vulkan') diff --git a/src/intel/vulkan/anv_pipeline.c b/src/intel/vulkan/anv_pipeline.c index 48d267b9181..88f414e023a 100644 --- a/src/intel/vulkan/anv_pipeline.c +++ b/src/intel/vulkan/anv_pipeline.c @@ -168,7 +168,8 @@ anv_shader_compile_to_nir(struct anv_device *device, nir_propagate_invariant(nir); nir_validate_shader(nir); - nir_lower_io_to_temporaries(entry_point->shader, entry_point, true, false); + nir_lower_io_to_temporaries(entry_point->shader, entry_point->impl, + true, false); nir_lower_system_values(nir); nir_validate_shader(nir); @@ -616,7 +617,7 @@ anv_pipeline_compile_fs(struct anv_pipeline *pipeline, unsigned num_rts = 0; struct anv_pipeline_binding rt_bindings[8]; - nir_function_impl *impl = nir_shader_get_entrypoint(nir)->impl; + nir_function_impl *impl = nir_shader_get_entrypoint(nir); nir_foreach_variable_safe(var, &nir->outputs) { if (var->data.location < FRAG_RESULT_DATA0) continue; -- cgit v1.2.3