mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-07 00:00:12 +01:00
panfrost: Pass is_blit flag around
There are blit shader specific optimizations available. Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9002>
This commit is contained in:
parent
5159f406d8
commit
e279606232
4 changed files with 5 additions and 3 deletions
|
|
@ -2445,6 +2445,7 @@ bifrost_compile_shader_nir(void *mem_ctx, nir_shader *nir,
|
|||
ctx->quirks = bifrost_get_quirks(inputs->gpu_id);
|
||||
ctx->arch = inputs->gpu_id >> 12;
|
||||
ctx->is_blend = inputs->is_blend;
|
||||
ctx->is_blit = inputs->is_blit;
|
||||
ctx->blend_desc = inputs->blend.bifrost_blend_desc;
|
||||
ctx->push = &program->push;
|
||||
memcpy(ctx->blend_constants, inputs->blend.constants, sizeof(ctx->blend_constants));
|
||||
|
|
|
|||
|
|
@ -503,8 +503,8 @@ typedef struct {
|
|||
unsigned arch;
|
||||
unsigned tls_size;
|
||||
|
||||
/* Is internally a blend shader? Depends on stage == FRAGMENT */
|
||||
bool is_blend;
|
||||
/* Is internally a blend/blit shader? Depends on stage == FRAGMENT */
|
||||
bool is_blend, is_blit;
|
||||
|
||||
/* Blend constants */
|
||||
float blend_constants[4];
|
||||
|
|
|
|||
|
|
@ -104,6 +104,7 @@ panfrost_build_blit_shader(struct panfrost_device *dev,
|
|||
|
||||
struct panfrost_compile_inputs inputs = {
|
||||
.gpu_id = dev->gpu_id,
|
||||
.is_blit = true,
|
||||
};
|
||||
|
||||
panfrost_program *program =
|
||||
|
|
|
|||
|
|
@ -145,7 +145,7 @@ typedef struct {
|
|||
|
||||
struct panfrost_compile_inputs {
|
||||
unsigned gpu_id;
|
||||
bool is_blend;
|
||||
bool is_blend, is_blit;
|
||||
struct {
|
||||
unsigned rt;
|
||||
unsigned nr_samples;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue