mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-27 10:30:08 +01:00
nak: Simplify 16-bit vector selection to not use try_from
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com> Reviewed-by: M Henning <drawoc@darkrefraction.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32679>
This commit is contained in:
parent
979dfaf0bb
commit
631bea2e02
1 changed files with 2 additions and 3 deletions
|
|
@ -590,10 +590,9 @@ impl<'a> ShaderFromNir<'a> {
|
|||
let sc = dc * 2 + w;
|
||||
if sc < srcs.len() {
|
||||
let (ssa, byte) = srcs[sc];
|
||||
let w_u8 = u8::try_from(w).unwrap();
|
||||
psrc[w] = ssa.into();
|
||||
psel[w * 2 + 0] = (w_u8 * 4) + byte;
|
||||
psel[w * 2 + 1] = (w_u8 * 4) + byte + 1;
|
||||
psel[w * 2 + 0] = (w as u8 * 4) + byte;
|
||||
psel[w * 2 + 1] = (w as u8 * 4) + byte + 1;
|
||||
}
|
||||
}
|
||||
comps.push(b.prmt(psrc[0], psrc[1], psel)[0]);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue