pan/bi: Ensure we select b0 with halfswizzle in va_lower_constants

In case of constant lowering with halfswizzle sources, we were selecting
h01 causing an invalid instruction error to be yield later.

This can only be hit by conversion instructions and shouldn't be seen in
the wild (as this should be eliminated before entering the backend).

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Fixes: 7d07fb9a67 ("pan/va: Handle 8-bit lane when lowering constants")
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33867>
This commit is contained in:
Mary Guillemard
2025-03-04 10:12:43 +01:00
committed by Marge Bot
parent 8948b74955
commit 2f1ce296d0

View File

@@ -238,7 +238,8 @@ va_lower_constants(bi_context *ctx, bi_instr *I)
* applying the lane select puts the desired constant (at least) in the
* bottom byte, so we can always select the bottom byte.
*/
if ((info.lane || info.lanes) && I->src[s].swizzle == BI_SWIZZLE_H01) {
if ((info.lane || info.lanes || info.halfswizzle) &&
I->src[s].swizzle == BI_SWIZZLE_H01) {
assert(info.size == VA_SIZE_8);
I->src[s] = bi_byte(I->src[s], 0);
}