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;