diff options
author | Rob Clark <[email protected]> | 2018-05-17 15:04:08 -0400 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2018-06-22 20:54:00 -0700 |
commit | 3d19f116ad59e6f876c6322d8d15c26295fe9a91 (patch) | |
tree | c683db4ea628b22bc344c9d6944a1b5facd99d62 /src/gallium | |
parent | 3e8879be5c28173c11b5268c7f7cb5a4e5b8072b (diff) |
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 <[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/gallium')
-rw-r--r-- | src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/freedreno/ir3/ir3_nir.c | 4 | ||||
-rw-r--r-- | src/gallium/drivers/v3d/v3d_program.c | 1 | ||||
-rw-r--r-- | src/gallium/drivers/vc4/vc4_program.c | 1 |
4 files changed, 3 insertions, 5 deletions
diff --git a/src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c b/src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c index 323d278b431..cfe22c4415a 100644 --- a/src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c +++ b/src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c @@ -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(): */ diff --git a/src/gallium/drivers/freedreno/ir3/ir3_nir.c b/src/gallium/drivers/freedreno/ir3/ir3_nir.c index 52b6168f3a3..6dc8213e5a9 100644 --- a/src/gallium/drivers/freedreno/ir3/ir3_nir.c +++ b/src/gallium/drivers/freedreno/ir3/ir3_nir.c @@ -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 * diff --git a/src/gallium/drivers/v3d/v3d_program.c b/src/gallium/drivers/v3d/v3d_program.c index 55c6dc071a2..ef7dd375bf7 100644 --- a/src/gallium/drivers/v3d/v3d_program.c +++ b/src/gallium/drivers/v3d/v3d_program.c @@ -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; } diff --git a/src/gallium/drivers/vc4/vc4_program.c b/src/gallium/drivers/vc4/vc4_program.c index e4ad329d1b9..367613130bb 100644 --- a/src/gallium/drivers/vc4/vc4_program.c +++ b/src/gallium/drivers/vc4/vc4_program.c @@ -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); |