mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 19:58:09 +02:00
st,ir3,radeonsi: push lower_deref_instrs back into driver
vc4+vc5 is not really effected by the deref chain to deref instr conversion, so it no longer needs this pass. For others, now that all the passes mesa/st uses are using deref instructions, push the lowering to deref chains back into driver. Signed-off-by: Rob Clark <robdclark@gmail.com> Acked-by: Rob Clark <robdclark@gmail.com> Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Acked-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
parent
3e8879be5c
commit
3d19f116ad
5 changed files with 3 additions and 7 deletions
|
|
@ -206,6 +206,8 @@ compile_init(struct ir3_compiler *compiler,
|
|||
ctx->s = so->shader->nir;
|
||||
}
|
||||
|
||||
NIR_PASS_V(ctx->s, nir_lower_deref_instrs, ~0);
|
||||
|
||||
/* this needs to be the last pass run, so do this here instead of
|
||||
* in ir3_optimize_nir():
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -57,9 +57,7 @@ static const nir_shader_compiler_options options = {
|
|||
struct nir_shader *
|
||||
ir3_tgsi_to_nir(const struct tgsi_token *tokens)
|
||||
{
|
||||
struct nir_shader *shader = tgsi_to_nir(tokens, &options);
|
||||
NIR_PASS_V(shader, nir_lower_deref_instrs, ~0);
|
||||
return shader;
|
||||
return tgsi_to_nir(tokens, &options);
|
||||
}
|
||||
|
||||
const nir_shader_compiler_options *
|
||||
|
|
|
|||
|
|
@ -209,7 +209,6 @@ v3d_shader_state_create(struct pipe_context *pctx,
|
|||
fprintf(stderr, "\n");
|
||||
}
|
||||
s = tgsi_to_nir(cso->tokens, &v3d_nir_options);
|
||||
NIR_PASS_V(s, nir_lower_deref_instrs, ~0);
|
||||
|
||||
so->was_tgsi = true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2480,7 +2480,6 @@ vc4_shader_state_create(struct pipe_context *pctx,
|
|||
fprintf(stderr, "\n");
|
||||
}
|
||||
s = tgsi_to_nir(cso->tokens, &nir_options);
|
||||
NIR_PASS_V(s, nir_lower_deref_instrs, ~0);
|
||||
}
|
||||
|
||||
NIR_PASS_V(s, nir_opt_global_to_local);
|
||||
|
|
|
|||
|
|
@ -841,8 +841,6 @@ st_finalize_nir(struct st_context *st, struct gl_program *prog,
|
|||
NIR_PASS_V(nir, gl_nir_lower_samplers_as_deref, shader_program);
|
||||
else
|
||||
NIR_PASS_V(nir, gl_nir_lower_samplers, shader_program);
|
||||
|
||||
NIR_PASS_V(nir, nir_lower_deref_instrs, (nir_lower_deref_flags)~0);
|
||||
}
|
||||
|
||||
} /* extern "C" */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue