diff --git a/src/panfrost/bifrost/bifrost_compile.c b/src/panfrost/bifrost/bifrost_compile.c index 2e70eed58d0..0f466a6cd47 100644 --- a/src/panfrost/bifrost/bifrost_compile.c +++ b/src/panfrost/bifrost/bifrost_compile.c @@ -1651,6 +1651,9 @@ bifrost_compile_shader_nir(nir_shader *nir, panfrost_program *program, ctx->nir = nir; ctx->stage = nir->info.stage; ctx->quirks = bifrost_get_quirks(inputs->gpu_id); + ctx->is_blend = inputs->is_blend; + ctx->blend_desc = inputs->blend.bifrost_blend_desc; + memcpy(ctx->blend_constants, inputs->blend.constants, sizeof(ctx->blend_constants)); list_inithead(&ctx->blocks); /* Lower gl_Position pre-optimisation, but after lowering vars to ssa diff --git a/src/panfrost/bifrost/compiler.h b/src/panfrost/bifrost/compiler.h index 04858bd6731..7b58d092945 100644 --- a/src/panfrost/bifrost/compiler.h +++ b/src/panfrost/bifrost/compiler.h @@ -445,6 +445,15 @@ typedef struct { struct panfrost_sysvals sysvals; uint32_t quirks; + /* Is internally a blend shader? Depends on stage == FRAGMENT */ + bool is_blend; + + /* Blend constants */ + float blend_constants[4]; + + /* Blend tile buffer conversion desc */ + uint64_t blend_desc; + /* During NIR->BIR */ nir_function_impl *impl; bi_block *current_block;