mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 15:58:05 +02:00
pan/bi: Fix incorrect compilation of fsat(reg.yx)
Future changes to nir_lower_blend cause fsat(reg.yx) instructions to be generated, which correspond to "FCLAMP.v2f16 x.h10" pseudoinstructions. These get their swizzles lowered, but we forgot to clear the swizzle out, so we end up with extra swap (cancelling out the intended swizzle). Fix the lowering logic. Fixes:ac636f5adb("pan/bi: Use FCLAMP pseudo op for clamp prop") Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20683> (cherry picked from commited46c617b0)
This commit is contained in:
parent
116b1de2aa
commit
aec46cecfa
2 changed files with 4 additions and 2 deletions
|
|
@ -4819,7 +4819,7 @@
|
|||
"description": "pan/bi: Fix incorrect compilation of fsat(reg.yx)",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "ac636f5adb57704696c781a17f11609fad9035ec"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -134,8 +134,10 @@ lower_swizzle(bi_context *ctx, bi_instr *ins, unsigned src)
|
|||
bi_index dest = ins->dest[0];
|
||||
bi_index tmp = bi_temp(ctx);
|
||||
|
||||
bi_index swizzled_src = bi_replace_index(ins->src[0], tmp);
|
||||
ins->src[0].swizzle = BI_SWIZZLE_H01;
|
||||
ins->dest[0] = tmp;
|
||||
bi_swz_v2i16_to(&b, dest, bi_replace_index(ins->src[0], tmp));
|
||||
bi_swz_v2i16_to(&b, dest, swizzled_src);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue