Mesa (main): pan/bi: Track whether the malloc IDVS flow is used
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Apr 7 14:34:59 UTC 2022
Module: Mesa
Branch: main
Commit: a1d5bf0a7a7b9422fe94920fe7eaa8fd68886005
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=a1d5bf0a7a7b9422fe94920fe7eaa8fd68886005
Author: Alyssa Rosenzweig <alyssa at collabora.com>
Date: Thu Mar 24 16:39:52 2022 -0400
pan/bi: Track whether the malloc IDVS flow is used
This affects what instructions the fragment shader uses. Will be used for the
legacy geometry flow in blit shaders. Whether that is a good idea remains to be
seen, admittedly.
Signed-off-by: Alyssa Rosenzweig <alyssa at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15793>
---
src/panfrost/bifrost/bifrost_compile.c | 1 +
src/panfrost/bifrost/compiler.h | 6 ++++++
2 files changed, 7 insertions(+)
diff --git a/src/panfrost/bifrost/bifrost_compile.c b/src/panfrost/bifrost/bifrost_compile.c
index 9942ff6567b..8308ef633fc 100644
--- a/src/panfrost/bifrost/bifrost_compile.c
+++ b/src/panfrost/bifrost/bifrost_compile.c
@@ -4336,6 +4336,7 @@ bi_compile_variant_nir(nir_shader *nir,
ctx->arch = inputs->gpu_id >> 12;
ctx->info = info;
ctx->idvs = idvs;
+ ctx->malloc_idvs = (ctx->arch >= 9) && !inputs->no_idvs;
if (idvs != BI_IDVS_NONE) {
/* Specializing shaders for IDVS is destructive, so we need to
diff --git a/src/panfrost/bifrost/compiler.h b/src/panfrost/bifrost/compiler.h
index 920e18900f0..04a3838a4d7 100644
--- a/src/panfrost/bifrost/compiler.h
+++ b/src/panfrost/bifrost/compiler.h
@@ -728,6 +728,12 @@ typedef struct {
unsigned arch;
enum bi_idvs_mode idvs;
+ /* In any graphics shader, whether the "IDVS with memory
+ * allocation" flow is used. This affects how varyings are loaded and
+ * stored. Ignore for compute.
+ */
+ bool malloc_idvs;
+
/* During NIR->BIR */
bi_block *current_block;
bi_block *after_block;
More information about the mesa-commit
mailing list