diff options
author | Jason Ekstrand <[email protected]> | 2018-03-19 10:50:40 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2018-06-22 20:15:54 -0700 |
commit | 74212c2414ce04c1331f6c79d74bcc75ea5d4726 (patch) | |
tree | 84b4493870a2f29c4011b16ae62d9eca2204180b /src/mesa/drivers/dri | |
parent | 8b7aa66169f9d675f83c483b3c7af38007e7e056 (diff) |
anv,i965,radv,st,ir3: Call nir_lower_deref_instrs
This inserts a call to nir_lower_deref_instrs at every call site of
glsl_to_nir, spirv_to_nir, and prog_to_nir.
Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]>
Acked-by: Rob Clark <[email protected]>
Acked-by: Bas Nieuwenhuizen <[email protected]>
Acked-by: Dave Airlie <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_program.c | 8 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_tcs.c | 1 |
2 files changed, 7 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_program.c b/src/mesa/drivers/dri/i965/brw_program.c index 959c6122f57..faf706c7d15 100644 --- a/src/mesa/drivers/dri/i965/brw_program.c +++ b/src/mesa/drivers/dri/i965/brw_program.c @@ -77,10 +77,13 @@ brw_create_nir(struct brw_context *brw, /* First, lower the GLSL/Mesa IR or SPIR-V to NIR */ if (shader_prog) { - if (shader_prog->data->spirv) + if (shader_prog->data->spirv) { nir = _mesa_spirv_to_nir(ctx, shader_prog, stage, options); - else + nir_lower_deref_instrs(nir, ~0); + } else { nir = glsl_to_nir(shader_prog, stage, options); + nir_lower_deref_instrs(nir, ~0); + } assert (nir); nir_remove_dead_variables(nir, nir_var_shader_in | nir_var_shader_out); @@ -90,6 +93,7 @@ brw_create_nir(struct brw_context *brw, nir_shader_get_entrypoint(nir), true, false); } else { nir = prog_to_nir(prog, options); + nir_lower_deref_instrs(nir, ~0); NIR_PASS_V(nir, nir_lower_regs_to_ssa); /* turn registers into SSA */ } nir_validate_shader(nir); diff --git a/src/mesa/drivers/dri/i965/brw_tcs.c b/src/mesa/drivers/dri/i965/brw_tcs.c index 931ef64166c..277c5e4c3e8 100644 --- a/src/mesa/drivers/dri/i965/brw_tcs.c +++ b/src/mesa/drivers/dri/i965/brw_tcs.c @@ -109,6 +109,7 @@ create_passthrough_tcs(void *mem_ctx, const struct brw_compiler *compiler, } nir_validate_shader(nir); + nir_lower_deref_instrs(nir, ~0); nir = brw_preprocess_nir(compiler, nir); |