mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 07:18:17 +02:00
r600/sb: Add support for INTERP_X and INTERP_Z ops
v2: Fix parsing the 2-slot instructions Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8563>
This commit is contained in:
parent
f57ae1e69c
commit
ff382c6634
3 changed files with 15 additions and 4 deletions
|
|
@ -385,6 +385,9 @@ int bc_parser::prepare_alu_group(cf_node* cf, alu_group_node *g) {
|
|||
if (ctx.alu_slots(n->bc.op) & AF_4SLOT)
|
||||
n->flags |= NF_ALU_4SLOT;
|
||||
|
||||
if (ctx.alu_slots(n->bc.op) & AF_2SLOT)
|
||||
n->flags |= NF_ALU_2SLOT;
|
||||
|
||||
n->src.resize(src_count);
|
||||
|
||||
unsigned flags = n->bc.op_ptr->flags;
|
||||
|
|
@ -586,12 +589,16 @@ int bc_parser::prepare_alu_group(cf_node* cf, alu_group_node *g) {
|
|||
alu_node *a = static_cast<alu_node*>(*I);
|
||||
unsigned sflags = a->bc.slot_flags;
|
||||
|
||||
if (sflags == AF_4V || (ctx.is_cayman() && sflags == AF_S)) {
|
||||
if (sflags == AF_4V || sflags == AF_2V || (ctx.is_cayman() && sflags == AF_S)) {
|
||||
if (!p)
|
||||
p = sh->create_alu_packed();
|
||||
|
||||
a->remove();
|
||||
p->push_back(a);
|
||||
if (sflags == AF_2V && p->count() == 2) {
|
||||
g->push_front(p);
|
||||
p = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -396,6 +396,8 @@ void dump::dump_flags(node &n) {
|
|||
sblog << "CH_CONS ";
|
||||
if (n.flags & NF_ALU_4SLOT)
|
||||
sblog << "4S ";
|
||||
if (n.flags & NF_ALU_2SLOT)
|
||||
sblog << "2S ";
|
||||
}
|
||||
|
||||
void dump::dump_val(value* v) {
|
||||
|
|
|
|||
|
|
@ -713,7 +713,8 @@ enum node_flags {
|
|||
NF_SCHEDULE_EARLY = (1 << 9),
|
||||
|
||||
// for ALU_PUSH_BEFORE - when set, replace with PUSH + ALU
|
||||
NF_ALU_STACK_WORKAROUND = (1 << 10)
|
||||
NF_ALU_STACK_WORKAROUND = (1 << 10),
|
||||
NF_ALU_2SLOT = (1 << 11),
|
||||
};
|
||||
|
||||
inline node_flags operator |(node_flags l, node_flags r) {
|
||||
|
|
@ -1021,8 +1022,9 @@ public:
|
|||
virtual bool fold_dispatch(expr_handler *ex);
|
||||
|
||||
unsigned forced_bank_swizzle() {
|
||||
return ((bc.op_ptr->flags & AF_INTERP) && (bc.slot_flags == AF_4V)) ?
|
||||
VEC_210 : 0;
|
||||
return ((bc.op_ptr->flags & AF_INTERP) &&
|
||||
((bc.slot_flags == AF_4V) ||
|
||||
(bc.slot_flags == AF_2V))) ? VEC_210 : 0;
|
||||
}
|
||||
|
||||
// return param index + 1 if instruction references interpolation param,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue