mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 09:28:07 +02:00
pan/bi: Pack st_vary
This should let varying writes go through finally. Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4276>
This commit is contained in:
parent
9213b2520c
commit
0be1116b81
2 changed files with 29 additions and 0 deletions
|
|
@ -593,6 +593,23 @@ bi_pack_add_ld_var_addr(bi_clause *clause, bi_instruction *ins, struct bi_regist
|
|||
RETURN_PACKED(pack);
|
||||
}
|
||||
|
||||
static unsigned
|
||||
bi_pack_add_st_vary(bi_clause *clause, bi_instruction *ins, struct bi_registers *regs)
|
||||
{
|
||||
assert(ins->store_channels >= 1 && ins->store_channels <= 4);
|
||||
|
||||
struct bifrost_st_vary pack = {
|
||||
.src0 = bi_get_src(ins, regs, 1, false),
|
||||
.src1 = bi_get_src(ins, regs, 2, false),
|
||||
.src2 = bi_get_src(ins, regs, 3, false),
|
||||
.channels = MALI_POSITIVE(ins->store_channels),
|
||||
.op = BIFROST_ADD_OP_ST_VAR
|
||||
};
|
||||
|
||||
bi_read_data_register(clause, ins);
|
||||
RETURN_PACKED(pack);
|
||||
}
|
||||
|
||||
static unsigned
|
||||
bi_pack_add_atest(bi_clause *clause, bi_instruction *ins, struct bi_registers *regs)
|
||||
{
|
||||
|
|
@ -663,7 +680,9 @@ bi_pack_add(bi_clause *clause, bi_bundle bundle, struct bi_registers *regs)
|
|||
case BI_FMOV:
|
||||
case BI_SHIFT:
|
||||
case BI_STORE:
|
||||
return BIFROST_ADD_NOP;
|
||||
case BI_STORE_VAR:
|
||||
return bi_pack_add_st_vary(clause, bundle.add, regs);
|
||||
case BI_SPECIAL:
|
||||
case BI_SWIZZLE:
|
||||
case BI_TEX:
|
||||
|
|
|
|||
|
|
@ -121,6 +121,16 @@ struct bifrost_add_2src {
|
|||
unsigned op : 14;
|
||||
} __attribute__((packed));
|
||||
|
||||
#define BIFROST_ADD_OP_ST_VAR (0x19300 >> 8)
|
||||
|
||||
struct bifrost_st_vary {
|
||||
unsigned src0 : 3;
|
||||
unsigned src1 : 3;
|
||||
unsigned src2 : 3;
|
||||
unsigned channels : 2;
|
||||
unsigned op : 9;
|
||||
} __attribute__((packed));
|
||||
|
||||
#define BIFROST_ADD_OP_ATEST (0xc8f)
|
||||
|
||||
struct bifrost_add_atest {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue