mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
pan/bi: Add CSEL.16 packing tests
Passing but let's increase coverage. Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5232>
This commit is contained in:
parent
87ca1c1eea
commit
6f589f4e04
2 changed files with 18 additions and 4 deletions
|
|
@ -511,10 +511,24 @@ bit_step(struct bit_state *s, bi_instruction *ins, bool FMA)
|
|||
|
||||
case BI_CSEL: {
|
||||
bool direct = ins->cond == BI_COND_ALWAYS;
|
||||
bool cond = direct ? srcs[0].u32 :
|
||||
bit_eval_cond(ins->cond, srcs[0], srcs[1], ins->src_types[0], 0, 0);
|
||||
unsigned sz = nir_alu_type_get_type_size(ins->src_types[0]);
|
||||
|
||||
if (sz == 32) {
|
||||
bool cond = direct ? srcs[0].u32 :
|
||||
bit_eval_cond(ins->cond, srcs[0], srcs[1], ins->src_types[0], 0, 0);
|
||||
|
||||
dest = cond ? srcs[2] : srcs[3];
|
||||
} else if (sz == 16) {
|
||||
for (unsigned c = 0; c < 2; ++c) {
|
||||
bool cond = direct ? srcs[0].u16[c] :
|
||||
bit_eval_cond(ins->cond, srcs[0], srcs[1], ins->src_types[0], c, c);
|
||||
|
||||
dest.u16[c] = cond ? srcs[2].u16[c] : srcs[3].u16[c];
|
||||
}
|
||||
} else {
|
||||
unreachable("Remaining types todo");
|
||||
}
|
||||
|
||||
dest = cond ? srcs[2] : srcs[3];
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -585,7 +585,7 @@ bit_packing(struct panfrost_device *dev, enum bit_debug debug)
|
|||
bit_icmp_helper(dev, input, sz, nir_type_int, debug);
|
||||
}
|
||||
|
||||
for (unsigned sz = 32; sz <= 32; sz *= 2)
|
||||
for (unsigned sz = 16; sz <= 32; sz *= 2)
|
||||
bit_csel_helper(dev, sz, (uint32_t *) input32, debug);
|
||||
|
||||
float special[4] = { 0.9 };
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue