mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-26 12:50:10 +01:00
pan/bi: Allow lane selections on component 4 and above
The lane selection only cares about intra-32b swizzling. Add a modulo on the test to allow selecting lanes when the swizzle is above 4 (needed for MKVEC.v4i8 lane selection). 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:
parent
38bebba18a
commit
ed057ca3d7
1 changed files with 1 additions and 1 deletions
|
|
@ -76,7 +76,7 @@ def pack_widen(mod, opts, body, pack_exprs):
|
|||
sz = 16 if op[0] == 'h' else 8
|
||||
|
||||
# Condition on the swizzle
|
||||
conds = ['ins->swizzle[{}][{}] == {}'.format(marg, idx, lane) for idx, lane in enumerate(op[1:])]
|
||||
conds = ['(ins->swizzle[{}][{}] % 4) == {}'.format(marg, idx, lane) for idx, lane in enumerate(op[1:])]
|
||||
cond = " && ".join(conds)
|
||||
|
||||
body.append('{}if ({}_sz == {} && {}) {}_temp = {};'.format(t_else, mod, sz, cond, mod, i))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue