pan/bi: Lower swizzles on CLPER

Needed for vectorized FP16 derivatives.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10392>
This commit is contained in:
Alyssa Rosenzweig 2021-04-09 16:24:54 -04:00 committed by Marge Bot
parent 998cbe13d4
commit 2a0060e63d
1 changed files with 8 additions and 0 deletions

View File

@ -35,11 +35,19 @@ bi_lower_swizzle_16(bi_context *ctx, bi_instr *ins, unsigned src)
{
/* TODO: Use the opcode table and be a lot more methodical about this... */
switch (ins->op) {
/* Some instructions used with 16-bit data never have swizzles */
case BI_OPCODE_CSEL_V2F16:
case BI_OPCODE_CSEL_V2I16:
case BI_OPCODE_CSEL_V2S16:
case BI_OPCODE_CSEL_V2U16:
/* Despite ostensibly being 32-bit instructions, CLPER does not
* inherently interpret the data, so it can be used for v2f16
* derivatives, which might require swizzle lowering */
case BI_OPCODE_CLPER_V6_I32:
case BI_OPCODE_CLPER_V7_I32:
break;
case BI_OPCODE_IADD_V2S16:
case BI_OPCODE_IADD_V2U16:
case BI_OPCODE_ISUB_V2S16: