summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/panfrost/pan_assemble.c
diff options
context:
space:
mode:
authorTimur Kristóf <[email protected]>2019-03-05 18:59:47 +0100
committerEric Anholt <[email protected]>2019-03-05 19:13:27 +0000
commit9a834447d652ea50864bb6c32f4ff99ac10d39bf (patch)
treeb60582e7bb504b2e2bad847f6494b418db9e83ea /src/gallium/drivers/panfrost/pan_assemble.c
parente582e761b7f49d1c0b100289b62442e6295cefef (diff)
tgsi_to_nir: Produce optimized NIR for a given pipe_screen.
With this patch, tgsi_to_nir will output NIR that is tailored to the given pipe, by reading its capabilities and adjusting the NIR code to those capabilities similarly to how glsl_to_nir works. It also adds an optimization loop that brings the output NIR in line with what glsl_to_nir outputs. This is necessary for the same reason why glsl_to_nir has its own optimization loop: currently not every driver does these optimizations yet. For uses which cannot pass a pipe_screen we also keep a variant called tgsi_to_nir_noscreen which keeps the old behavior. Signed-Off-By: Timur Kristóf <[email protected]> Tested-by: Andre Heider <[email protected]> Tested-by: Rob Clark <[email protected]> Acked-By: Eric Anholt <[email protected]>
Diffstat (limited to 'src/gallium/drivers/panfrost/pan_assemble.c')
-rw-r--r--src/gallium/drivers/panfrost/pan_assemble.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/panfrost/pan_assemble.c b/src/gallium/drivers/panfrost/pan_assemble.c
index 4cbbecce0f7..f3b339d8184 100644
--- a/src/gallium/drivers/panfrost/pan_assemble.c
+++ b/src/gallium/drivers/panfrost/pan_assemble.c
@@ -48,7 +48,7 @@ panfrost_shader_compile(struct panfrost_context *ctx, struct mali_shader_meta *m
} else {
assert (cso->type == PIPE_SHADER_IR_TGSI);
//tgsi_dump(cso->tokens, 0);
- s = tgsi_to_nir(cso->tokens, &midgard_nir_options);
+ s = tgsi_to_nir(cso->tokens, &ctx->base.screen);
}
s->info.stage = type == JOB_TYPE_VERTEX ? MESA_SHADER_VERTEX : MESA_SHADER_FRAGMENT;