pan/bi: Store the architecture in the compiler context

Some instructions differ between v6 and v7 and we'll need to know which
architecture we're compiling for if we want to generate the right
instructions.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7530>
This commit is contained in:
Boris Brezillon 2020-11-12 16:13:08 +01:00
parent 0dd093a89f
commit 9f640c0f3d
2 changed files with 2 additions and 0 deletions

View file

@ -2359,6 +2359,7 @@ bifrost_compile_shader_nir(void *mem_ctx, nir_shader *nir,
ctx->nir = nir;
ctx->stage = nir->info.stage;
ctx->quirks = bifrost_get_quirks(inputs->gpu_id);
ctx->arch = inputs->gpu_id >> 12;
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));

View file

@ -459,6 +459,7 @@ typedef struct {
struct list_head blocks; /* list of bi_block */
struct panfrost_sysvals sysvals;
uint32_t quirks;
unsigned arch;
unsigned tls_size;
/* Is internally a blend shader? Depends on stage == FRAGMENT */