/**
 * This file is automatically generated. Do not edit manually.
 * To regenerate, run: make fate-sws-uops-macros GEN=1
 */

#ifndef SWSCALE_UOPS_MACROS_H
#define SWSCALE_UOPS_MACROS_H

/**
 * Boilerplate helper macros, for template-based backends. These will be
 * instantiated like this, with parameters in struct order:
 *   MACRO(__VA_ARGS__, NAME, UOP, TYPE, MASK, [PARAMS,])
 * The _STRUCT variants pass all arguments in C struct syntax, while the
 * plain variants give them as separate C values (e.g. for use in calls)
 */
#define SWS_GLUE3(x, y, z) x ## _ ## y ## _ ## z
#define SWS_FOR(TYPE, UOP, MACRO, ...) \
    SWS_GLUE3(SWS_FOR, TYPE, UOP)(MACRO, __VA_ARGS__)
#define SWS_FOR_STRUCT(TYPE, UOP, MACRO, ...) \
    SWS_GLUE3(SWS_FOR_STRUCT, TYPE, UOP)(MACRO, __VA_ARGS__)

#define SWS_FOR_U8_READ_PLANAR(MACRO, ...) \
    MACRO(__VA_ARGS__, u8_read_planar_x                        , SWS_PIXEL_U8 , SWS_UOP_READ_PLANAR     , 0x1) \
    MACRO(__VA_ARGS__, u8_read_planar_xy                       , SWS_PIXEL_U8 , SWS_UOP_READ_PLANAR     , 0x3) \
    MACRO(__VA_ARGS__, u8_read_planar_xyz                      , SWS_PIXEL_U8 , SWS_UOP_READ_PLANAR     , 0x7) \
    MACRO(__VA_ARGS__, u8_read_planar_xyzw                     , SWS_PIXEL_U8 , SWS_UOP_READ_PLANAR     , 0xf)
#define SWS_FOR_STRUCT_U8_READ_PLANAR(MACRO, ...) \
    MACRO(__VA_ARGS__, u8_read_planar_x                        , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_READ_PLANAR     , .mask = 0x1) \
    MACRO(__VA_ARGS__, u8_read_planar_xy                       , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_READ_PLANAR     , .mask = 0x3) \
    MACRO(__VA_ARGS__, u8_read_planar_xyz                      , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_READ_PLANAR     , .mask = 0x7) \
    MACRO(__VA_ARGS__, u8_read_planar_xyzw                     , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_READ_PLANAR     , .mask = 0xf)
#define SWS_FOR_U8_READ_PLANAR_FH(MACRO, ...) \
    MACRO(__VA_ARGS__, u8_read_planar_fh_x_f32                 , SWS_PIXEL_U8 , SWS_UOP_READ_PLANAR_FH  , 0x1, SWS_PIXEL_F32) \
    MACRO(__VA_ARGS__, u8_read_planar_fh_xy_f32                , SWS_PIXEL_U8 , SWS_UOP_READ_PLANAR_FH  , 0x3, SWS_PIXEL_F32) \
    MACRO(__VA_ARGS__, u8_read_planar_fh_xyz_f32               , SWS_PIXEL_U8 , SWS_UOP_READ_PLANAR_FH  , 0x7, SWS_PIXEL_F32) \
    MACRO(__VA_ARGS__, u8_read_planar_fh_xyzw_f32              , SWS_PIXEL_U8 , SWS_UOP_READ_PLANAR_FH  , 0xf, SWS_PIXEL_F32)
#define SWS_FOR_STRUCT_U8_READ_PLANAR_FH(MACRO, ...) \
    MACRO(__VA_ARGS__, u8_read_planar_fh_x_f32                 , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_READ_PLANAR_FH  , .mask = 0x1, .par.filter.type = SWS_PIXEL_F32) \
    MACRO(__VA_ARGS__, u8_read_planar_fh_xy_f32                , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_READ_PLANAR_FH  , .mask = 0x3, .par.filter.type = SWS_PIXEL_F32) \
    MACRO(__VA_ARGS__, u8_read_planar_fh_xyz_f32               , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_READ_PLANAR_FH  , .mask = 0x7, .par.filter.type = SWS_PIXEL_F32) \
    MACRO(__VA_ARGS__, u8_read_planar_fh_xyzw_f32              , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_READ_PLANAR_FH  , .mask = 0xf, .par.filter.type = SWS_PIXEL_F32)
#define SWS_FOR_U8_READ_PLANAR_FV(MACRO, ...) \
    MACRO(__VA_ARGS__, u8_read_planar_fv_x_f32                 , SWS_PIXEL_U8 , SWS_UOP_READ_PLANAR_FV  , 0x1, SWS_PIXEL_F32) \
    MACRO(__VA_ARGS__, u8_read_planar_fv_xy_f32                , SWS_PIXEL_U8 , SWS_UOP_READ_PLANAR_FV  , 0x3, SWS_PIXEL_F32) \
    MACRO(__VA_ARGS__, u8_read_planar_fv_xyz_f32               , SWS_PIXEL_U8 , SWS_UOP_READ_PLANAR_FV  , 0x7, SWS_PIXEL_F32) \
    MACRO(__VA_ARGS__, u8_read_planar_fv_xyzw_f32              , SWS_PIXEL_U8 , SWS_UOP_READ_PLANAR_FV  , 0xf, SWS_PIXEL_F32)
#define SWS_FOR_STRUCT_U8_READ_PLANAR_FV(MACRO, ...) \
    MACRO(__VA_ARGS__, u8_read_planar_fv_x_f32                 , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_READ_PLANAR_FV  , .mask = 0x1, .par.filter.type = SWS_PIXEL_F32) \
    MACRO(__VA_ARGS__, u8_read_planar_fv_xy_f32                , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_READ_PLANAR_FV  , .mask = 0x3, .par.filter.type = SWS_PIXEL_F32) \
    MACRO(__VA_ARGS__, u8_read_planar_fv_xyz_f32               , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_READ_PLANAR_FV  , .mask = 0x7, .par.filter.type = SWS_PIXEL_F32) \
    MACRO(__VA_ARGS__, u8_read_planar_fv_xyzw_f32              , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_READ_PLANAR_FV  , .mask = 0xf, .par.filter.type = SWS_PIXEL_F32)
#define SWS_FOR_U8_READ_PLANAR_FV_FMA(MACRO, ...) \
    MACRO(__VA_ARGS__, u8_read_planar_fv_fma_x_f32             , SWS_PIXEL_U8 , SWS_UOP_READ_PLANAR_FV_FMA, 0x1, SWS_PIXEL_F32) \
    MACRO(__VA_ARGS__, u8_read_planar_fv_fma_xy_f32            , SWS_PIXEL_U8 , SWS_UOP_READ_PLANAR_FV_FMA, 0x3, SWS_PIXEL_F32) \
    MACRO(__VA_ARGS__, u8_read_planar_fv_fma_xyz_f32           , SWS_PIXEL_U8 , SWS_UOP_READ_PLANAR_FV_FMA, 0x7, SWS_PIXEL_F32) \
    MACRO(__VA_ARGS__, u8_read_planar_fv_fma_xyzw_f32          , SWS_PIXEL_U8 , SWS_UOP_READ_PLANAR_FV_FMA, 0xf, SWS_PIXEL_F32)
#define SWS_FOR_STRUCT_U8_READ_PLANAR_FV_FMA(MACRO, ...) \
    MACRO(__VA_ARGS__, u8_read_planar_fv_fma_x_f32             , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_READ_PLANAR_FV_FMA, .mask = 0x1, .par.filter.type = SWS_PIXEL_F32) \
    MACRO(__VA_ARGS__, u8_read_planar_fv_fma_xy_f32            , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_READ_PLANAR_FV_FMA, .mask = 0x3, .par.filter.type = SWS_PIXEL_F32) \
    MACRO(__VA_ARGS__, u8_read_planar_fv_fma_xyz_f32           , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_READ_PLANAR_FV_FMA, .mask = 0x7, .par.filter.type = SWS_PIXEL_F32) \
    MACRO(__VA_ARGS__, u8_read_planar_fv_fma_xyzw_f32          , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_READ_PLANAR_FV_FMA, .mask = 0xf, .par.filter.type = SWS_PIXEL_F32)
#define SWS_FOR_U8_READ_PACKED(MACRO, ...) \
    MACRO(__VA_ARGS__, u8_read_packed_xy                       , SWS_PIXEL_U8 , SWS_UOP_READ_PACKED     , 0x3) \
    MACRO(__VA_ARGS__, u8_read_packed_xyz                      , SWS_PIXEL_U8 , SWS_UOP_READ_PACKED     , 0x7) \
    MACRO(__VA_ARGS__, u8_read_packed_xyzw                     , SWS_PIXEL_U8 , SWS_UOP_READ_PACKED     , 0xf)
#define SWS_FOR_STRUCT_U8_READ_PACKED(MACRO, ...) \
    MACRO(__VA_ARGS__, u8_read_packed_xy                       , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_READ_PACKED     , .mask = 0x3) \
    MACRO(__VA_ARGS__, u8_read_packed_xyz                      , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_READ_PACKED     , .mask = 0x7) \
    MACRO(__VA_ARGS__, u8_read_packed_xyzw                     , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_READ_PACKED     , .mask = 0xf)
#define SWS_FOR_U8_READ_NIBBLE(MACRO, ...) \
    MACRO(__VA_ARGS__, u8_read_nibble_x                        , SWS_PIXEL_U8 , SWS_UOP_READ_NIBBLE     , 0x1)
#define SWS_FOR_STRUCT_U8_READ_NIBBLE(MACRO, ...) \
    MACRO(__VA_ARGS__, u8_read_nibble_x                        , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_READ_NIBBLE     , .mask = 0x1)
#define SWS_FOR_U8_READ_BIT(MACRO, ...) \
    MACRO(__VA_ARGS__, u8_read_bit_x                           , SWS_PIXEL_U8 , SWS_UOP_READ_BIT        , 0x1)
#define SWS_FOR_STRUCT_U8_READ_BIT(MACRO, ...) \
    MACRO(__VA_ARGS__, u8_read_bit_x                           , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_READ_BIT        , .mask = 0x1)
#define SWS_FOR_U8_WRITE_PLANAR(MACRO, ...) \
    MACRO(__VA_ARGS__, u8_write_planar_x                       , SWS_PIXEL_U8 , SWS_UOP_WRITE_PLANAR    , 0x1) \
    MACRO(__VA_ARGS__, u8_write_planar_xy                      , SWS_PIXEL_U8 , SWS_UOP_WRITE_PLANAR    , 0x3) \
    MACRO(__VA_ARGS__, u8_write_planar_xyz                     , SWS_PIXEL_U8 , SWS_UOP_WRITE_PLANAR    , 0x7) \
    MACRO(__VA_ARGS__, u8_write_planar_xyzw                    , SWS_PIXEL_U8 , SWS_UOP_WRITE_PLANAR    , 0xf)
#define SWS_FOR_STRUCT_U8_WRITE_PLANAR(MACRO, ...) \
    MACRO(__VA_ARGS__, u8_write_planar_x                       , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_WRITE_PLANAR    , .mask = 0x1) \
    MACRO(__VA_ARGS__, u8_write_planar_xy                      , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_WRITE_PLANAR    , .mask = 0x3) \
    MACRO(__VA_ARGS__, u8_write_planar_xyz                     , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_WRITE_PLANAR    , .mask = 0x7) \
    MACRO(__VA_ARGS__, u8_write_planar_xyzw                    , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_WRITE_PLANAR    , .mask = 0xf)
#define SWS_FOR_U8_WRITE_PACKED(MACRO, ...) \
    MACRO(__VA_ARGS__, u8_write_packed_xy                      , SWS_PIXEL_U8 , SWS_UOP_WRITE_PACKED    , 0x3) \
    MACRO(__VA_ARGS__, u8_write_packed_xyz                     , SWS_PIXEL_U8 , SWS_UOP_WRITE_PACKED    , 0x7) \
    MACRO(__VA_ARGS__, u8_write_packed_xyzw                    , SWS_PIXEL_U8 , SWS_UOP_WRITE_PACKED    , 0xf)
#define SWS_FOR_STRUCT_U8_WRITE_PACKED(MACRO, ...) \
    MACRO(__VA_ARGS__, u8_write_packed_xy                      , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_WRITE_PACKED    , .mask = 0x3) \
    MACRO(__VA_ARGS__, u8_write_packed_xyz                     , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_WRITE_PACKED    , .mask = 0x7) \
    MACRO(__VA_ARGS__, u8_write_packed_xyzw                    , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_WRITE_PACKED    , .mask = 0xf)
#define SWS_FOR_U8_WRITE_NIBBLE(MACRO, ...) \
    MACRO(__VA_ARGS__, u8_write_nibble_x                       , SWS_PIXEL_U8 , SWS_UOP_WRITE_NIBBLE    , 0x1)
#define SWS_FOR_STRUCT_U8_WRITE_NIBBLE(MACRO, ...) \
    MACRO(__VA_ARGS__, u8_write_nibble_x                       , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_WRITE_NIBBLE    , .mask = 0x1)
#define SWS_FOR_U8_WRITE_BIT(MACRO, ...) \
    MACRO(__VA_ARGS__, u8_write_bit_x                          , SWS_PIXEL_U8 , SWS_UOP_WRITE_BIT       , 0x1)
#define SWS_FOR_STRUCT_U8_WRITE_BIT(MACRO, ...) \
    MACRO(__VA_ARGS__, u8_write_bit_x                          , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_WRITE_BIT       , .mask = 0x1)
#define SWS_FOR_U8_PERMUTE(MACRO, ...) \
    MACRO(__VA_ARGS__, u8_permute_x_y                          , SWS_PIXEL_U8 , SWS_UOP_PERMUTE         , 0x1, 1, 0, 2, 3) \
    MACRO(__VA_ARGS__, u8_permute_x_z                          , SWS_PIXEL_U8 , SWS_UOP_PERMUTE         , 0x1, 2, 1, 0, 3) \
    MACRO(__VA_ARGS__, u8_permute_x_w                          , SWS_PIXEL_U8 , SWS_UOP_PERMUTE         , 0x1, 3, 1, 2, 0) \
    MACRO(__VA_ARGS__, u8_permute_y_w                          , SWS_PIXEL_U8 , SWS_UOP_PERMUTE         , 0x2, 0, 3, 2, 1) \
    MACRO(__VA_ARGS__, u8_permute_y_x                          , SWS_PIXEL_U8 , SWS_UOP_PERMUTE         , 0x2, 1, 0, 2, 3) \
    MACRO(__VA_ARGS__, u8_permute_xy_yx                        , SWS_PIXEL_U8 , SWS_UOP_PERMUTE         , 0x3, 1, 0, 2, 3) \
    MACRO(__VA_ARGS__, u8_permute_xy_yw                        , SWS_PIXEL_U8 , SWS_UOP_PERMUTE         , 0x3, 1, 3, 2, 0) \
    MACRO(__VA_ARGS__, u8_permute_xy_zw                        , SWS_PIXEL_U8 , SWS_UOP_PERMUTE         , 0x3, 2, 3, 0, 1) \
    MACRO(__VA_ARGS__, u8_permute_xy_wx                        , SWS_PIXEL_U8 , SWS_UOP_PERMUTE         , 0x3, 3, 0, 2, 1) \
    MACRO(__VA_ARGS__, u8_permute_z_x                          , SWS_PIXEL_U8 , SWS_UOP_PERMUTE         , 0x4, 1, 2, 0, 3) \
    MACRO(__VA_ARGS__, u8_permute_xz_zx                        , SWS_PIXEL_U8 , SWS_UOP_PERMUTE         , 0x5, 2, 1, 0, 3) \
    MACRO(__VA_ARGS__, u8_permute_yz_zy                        , SWS_PIXEL_U8 , SWS_UOP_PERMUTE         , 0x6, 0, 2, 1, 3) \
    MACRO(__VA_ARGS__, u8_permute_xyz_yzx                      , SWS_PIXEL_U8 , SWS_UOP_PERMUTE         , 0x7, 1, 2, 0, 3) \
    MACRO(__VA_ARGS__, u8_permute_xyz_yzw                      , SWS_PIXEL_U8 , SWS_UOP_PERMUTE         , 0x7, 1, 2, 3, 0) \
    MACRO(__VA_ARGS__, u8_permute_xyz_zxy                      , SWS_PIXEL_U8 , SWS_UOP_PERMUTE         , 0x7, 2, 0, 1, 3) \
    MACRO(__VA_ARGS__, u8_permute_xyz_zwy                      , SWS_PIXEL_U8 , SWS_UOP_PERMUTE         , 0x7, 2, 3, 1, 0) \
    MACRO(__VA_ARGS__, u8_permute_xyz_wzy                      , SWS_PIXEL_U8 , SWS_UOP_PERMUTE         , 0x7, 3, 2, 1, 0) \
    MACRO(__VA_ARGS__, u8_permute_w_x                          , SWS_PIXEL_U8 , SWS_UOP_PERMUTE         , 0x8, 3, 1, 2, 0) \
    MACRO(__VA_ARGS__, u8_permute_yw_wy                        , SWS_PIXEL_U8 , SWS_UOP_PERMUTE         , 0xa, 0, 3, 2, 1) \
    MACRO(__VA_ARGS__, u8_permute_zw_xz                        , SWS_PIXEL_U8 , SWS_UOP_PERMUTE         , 0xc, 3, 1, 0, 2) \
    MACRO(__VA_ARGS__, u8_permute_xzw_zwx                      , SWS_PIXEL_U8 , SWS_UOP_PERMUTE         , 0xd, 2, 1, 3, 0) \
    MACRO(__VA_ARGS__, u8_permute_xzw_wxz                      , SWS_PIXEL_U8 , SWS_UOP_PERMUTE         , 0xd, 3, 1, 0, 2) \
    MACRO(__VA_ARGS__, u8_permute_yzw_zwy                      , SWS_PIXEL_U8 , SWS_UOP_PERMUTE         , 0xe, 0, 2, 3, 1) \
    MACRO(__VA_ARGS__, u8_permute_yzw_xyz                      , SWS_PIXEL_U8 , SWS_UOP_PERMUTE         , 0xe, 3, 0, 1, 2) \
    MACRO(__VA_ARGS__, u8_permute_yzw_zxy                      , SWS_PIXEL_U8 , SWS_UOP_PERMUTE         , 0xe, 3, 2, 0, 1) \
    MACRO(__VA_ARGS__, u8_permute_yzw_zyx                      , SWS_PIXEL_U8 , SWS_UOP_PERMUTE         , 0xe, 3, 2, 1, 0) \
    MACRO(__VA_ARGS__, u8_permute_xyzw_yzwx                    , SWS_PIXEL_U8 , SWS_UOP_PERMUTE         , 0xf, 1, 2, 3, 0) \
    MACRO(__VA_ARGS__, u8_permute_xyzw_wxyz                    , SWS_PIXEL_U8 , SWS_UOP_PERMUTE         , 0xf, 3, 0, 1, 2) \
    MACRO(__VA_ARGS__, u8_permute_xyzw_wzxy                    , SWS_PIXEL_U8 , SWS_UOP_PERMUTE         , 0xf, 3, 2, 0, 1) \
    MACRO(__VA_ARGS__, u8_permute_xyzw_wzyx                    , SWS_PIXEL_U8 , SWS_UOP_PERMUTE         , 0xf, 3, 2, 1, 0)
#define SWS_FOR_STRUCT_U8_PERMUTE(MACRO, ...) \
    MACRO(__VA_ARGS__, u8_permute_x_y                          , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_PERMUTE         , .mask = 0x1, .par.swizzle.in = {1, 0, 2, 3}) \
    MACRO(__VA_ARGS__, u8_permute_x_z                          , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_PERMUTE         , .mask = 0x1, .par.swizzle.in = {2, 1, 0, 3}) \
    MACRO(__VA_ARGS__, u8_permute_x_w                          , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_PERMUTE         , .mask = 0x1, .par.swizzle.in = {3, 1, 2, 0}) \
    MACRO(__VA_ARGS__, u8_permute_y_w                          , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_PERMUTE         , .mask = 0x2, .par.swizzle.in = {0, 3, 2, 1}) \
    MACRO(__VA_ARGS__, u8_permute_y_x                          , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_PERMUTE         , .mask = 0x2, .par.swizzle.in = {1, 0, 2, 3}) \
    MACRO(__VA_ARGS__, u8_permute_xy_yx                        , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_PERMUTE         , .mask = 0x3, .par.swizzle.in = {1, 0, 2, 3}) \
    MACRO(__VA_ARGS__, u8_permute_xy_yw                        , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_PERMUTE         , .mask = 0x3, .par.swizzle.in = {1, 3, 2, 0}) \
    MACRO(__VA_ARGS__, u8_permute_xy_zw                        , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_PERMUTE         , .mask = 0x3, .par.swizzle.in = {2, 3, 0, 1}) \
    MACRO(__VA_ARGS__, u8_permute_xy_wx                        , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_PERMUTE         , .mask = 0x3, .par.swizzle.in = {3, 0, 2, 1}) \
    MACRO(__VA_ARGS__, u8_permute_z_x                          , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_PERMUTE         , .mask = 0x4, .par.swizzle.in = {1, 2, 0, 3}) \
    MACRO(__VA_ARGS__, u8_permute_xz_zx                        , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_PERMUTE         , .mask = 0x5, .par.swizzle.in = {2, 1, 0, 3}) \
    MACRO(__VA_ARGS__, u8_permute_yz_zy                        , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_PERMUTE         , .mask = 0x6, .par.swizzle.in = {0, 2, 1, 3}) \
    MACRO(__VA_ARGS__, u8_permute_xyz_yzx                      , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_PERMUTE         , .mask = 0x7, .par.swizzle.in = {1, 2, 0, 3}) \
    MACRO(__VA_ARGS__, u8_permute_xyz_yzw                      , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_PERMUTE         , .mask = 0x7, .par.swizzle.in = {1, 2, 3, 0}) \
    MACRO(__VA_ARGS__, u8_permute_xyz_zxy                      , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_PERMUTE         , .mask = 0x7, .par.swizzle.in = {2, 0, 1, 3}) \
    MACRO(__VA_ARGS__, u8_permute_xyz_zwy                      , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_PERMUTE         , .mask = 0x7, .par.swizzle.in = {2, 3, 1, 0}) \
    MACRO(__VA_ARGS__, u8_permute_xyz_wzy                      , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_PERMUTE         , .mask = 0x7, .par.swizzle.in = {3, 2, 1, 0}) \
    MACRO(__VA_ARGS__, u8_permute_w_x                          , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_PERMUTE         , .mask = 0x8, .par.swizzle.in = {3, 1, 2, 0}) \
    MACRO(__VA_ARGS__, u8_permute_yw_wy                        , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_PERMUTE         , .mask = 0xa, .par.swizzle.in = {0, 3, 2, 1}) \
    MACRO(__VA_ARGS__, u8_permute_zw_xz                        , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_PERMUTE         , .mask = 0xc, .par.swizzle.in = {3, 1, 0, 2}) \
    MACRO(__VA_ARGS__, u8_permute_xzw_zwx                      , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_PERMUTE         , .mask = 0xd, .par.swizzle.in = {2, 1, 3, 0}) \
    MACRO(__VA_ARGS__, u8_permute_xzw_wxz                      , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_PERMUTE         , .mask = 0xd, .par.swizzle.in = {3, 1, 0, 2}) \
    MACRO(__VA_ARGS__, u8_permute_yzw_zwy                      , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_PERMUTE         , .mask = 0xe, .par.swizzle.in = {0, 2, 3, 1}) \
    MACRO(__VA_ARGS__, u8_permute_yzw_xyz                      , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_PERMUTE         , .mask = 0xe, .par.swizzle.in = {3, 0, 1, 2}) \
    MACRO(__VA_ARGS__, u8_permute_yzw_zxy                      , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_PERMUTE         , .mask = 0xe, .par.swizzle.in = {3, 2, 0, 1}) \
    MACRO(__VA_ARGS__, u8_permute_yzw_zyx                      , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_PERMUTE         , .mask = 0xe, .par.swizzle.in = {3, 2, 1, 0}) \
    MACRO(__VA_ARGS__, u8_permute_xyzw_yzwx                    , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_PERMUTE         , .mask = 0xf, .par.swizzle.in = {1, 2, 3, 0}) \
    MACRO(__VA_ARGS__, u8_permute_xyzw_wxyz                    , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_PERMUTE         , .mask = 0xf, .par.swizzle.in = {3, 0, 1, 2}) \
    MACRO(__VA_ARGS__, u8_permute_xyzw_wzxy                    , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_PERMUTE         , .mask = 0xf, .par.swizzle.in = {3, 2, 0, 1}) \
    MACRO(__VA_ARGS__, u8_permute_xyzw_wzyx                    , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_PERMUTE         , .mask = 0xf, .par.swizzle.in = {3, 2, 1, 0})
#define SWS_FOR_U8_COPY(MACRO, ...) \
    MACRO(__VA_ARGS__, u8_copy_yz_xx                           , SWS_PIXEL_U8 , SWS_UOP_COPY            , 0x6, 0, 0, 0, 3) \
    MACRO(__VA_ARGS__, u8_copy_yzw_xxx                         , SWS_PIXEL_U8 , SWS_UOP_COPY            , 0xe, 0, 0, 0, 0) \
    MACRO(__VA_ARGS__, u8_copy_yzw_xxy                         , SWS_PIXEL_U8 , SWS_UOP_COPY            , 0xe, 0, 0, 0, 1) \
    MACRO(__VA_ARGS__, u8_copy_xyzw_yxxx                       , SWS_PIXEL_U8 , SWS_UOP_COPY            , 0xf, 1, 0, 0, 0)
#define SWS_FOR_STRUCT_U8_COPY(MACRO, ...) \
    MACRO(__VA_ARGS__, u8_copy_yz_xx                           , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_COPY            , .mask = 0x6, .par.swizzle.in = {0, 0, 0, 3}) \
    MACRO(__VA_ARGS__, u8_copy_yzw_xxx                         , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_COPY            , .mask = 0xe, .par.swizzle.in = {0, 0, 0, 0}) \
    MACRO(__VA_ARGS__, u8_copy_yzw_xxy                         , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_COPY            , .mask = 0xe, .par.swizzle.in = {0, 0, 0, 1}) \
    MACRO(__VA_ARGS__, u8_copy_xyzw_yxxx                       , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_COPY            , .mask = 0xf, .par.swizzle.in = {1, 0, 0, 0})
#define SWS_FOR_U8_MOVE(MACRO, ...) \
    MACRO(__VA_ARGS__, u8_move_x_y                             , SWS_PIXEL_U8 , SWS_UOP_MOVE            , 0x0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0) \
    MACRO(__VA_ARGS__, u8_move_x_z                             , SWS_PIXEL_U8 , SWS_UOP_MOVE            , 0x0, 1, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0) \
    MACRO(__VA_ARGS__, u8_move_x_w                             , SWS_PIXEL_U8 , SWS_UOP_MOVE            , 0x0, 1, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0) \
    MACRO(__VA_ARGS__, u8_move_y_x                             , SWS_PIXEL_U8 , SWS_UOP_MOVE            , 0x0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) \
    MACRO(__VA_ARGS__, u8_move_y_w                             , SWS_PIXEL_U8 , SWS_UOP_MOVE            , 0x0, 1, 1, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0) \
    MACRO(__VA_ARGS__, u8_move_z_x                             , SWS_PIXEL_U8 , SWS_UOP_MOVE            , 0x0, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) \
    MACRO(__VA_ARGS__, u8_move_w_x                             , SWS_PIXEL_U8 , SWS_UOP_MOVE            , 0x0, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) \
    MACRO(__VA_ARGS__, u8_move_xy_yw                           , SWS_PIXEL_U8 , SWS_UOP_MOVE            , 0x0, 2, 0, 1, 0, 0, 0, 0, 1, 3, 0, 0, 0, 0) \
    MACRO(__VA_ARGS__, u8_move_xy_zw                           , SWS_PIXEL_U8 , SWS_UOP_MOVE            , 0x0, 2, 0, 1, 0, 0, 0, 0, 2, 3, 0, 0, 0, 0) \
    MACRO(__VA_ARGS__, u8_move_yx_xw                           , SWS_PIXEL_U8 , SWS_UOP_MOVE            , 0x0, 2, 1, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0) \
    MACRO(__VA_ARGS__, u8_move_yz_xx                           , SWS_PIXEL_U8 , SWS_UOP_MOVE            , 0x0, 2, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) \
    MACRO(__VA_ARGS__, u8_move_wz_zx                           , SWS_PIXEL_U8 , SWS_UOP_MOVE            , 0x0, 2, 3, 2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0) \
    MACRO(__VA_ARGS__, u8_move_xyz_yzw                         , SWS_PIXEL_U8 , SWS_UOP_MOVE            , 0x0, 3, 0, 1, 2, 0, 0, 0, 1, 2, 3, 0, 0, 0) \
    MACRO(__VA_ARGS__, u8_move_xzy_zyw                         , SWS_PIXEL_U8 , SWS_UOP_MOVE            , 0x0, 3, 0, 2, 1, 0, 0, 0, 2, 1, 3, 0, 0, 0) \
    MACRO(__VA_ARGS__, u8_move_yzw_xxx                         , SWS_PIXEL_U8 , SWS_UOP_MOVE            , 0x0, 3, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0) \
    MACRO(__VA_ARGS__, u8_move_zwy_xyx                         , SWS_PIXEL_U8 , SWS_UOP_MOVE            , 0x0, 3, 2, 3, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0) \
    MACRO(__VA_ARGS__, u8_move_wyz_yzx                         , SWS_PIXEL_U8 , SWS_UOP_MOVE            , 0x0, 3, 3, 1, 2, 0, 0, 0, 1, 2, 0, 0, 0, 0) \
    MACRO(__VA_ARGS__, u8_move_wzy_zyx                         , SWS_PIXEL_U8 , SWS_UOP_MOVE            , 0x0, 3, 3, 2, 1, 0, 0, 0, 2, 1, 0, 0, 0, 0) \
    MACRO(__VA_ARGS__, u8_move_txy_xyt                         , SWS_PIXEL_U8 , SWS_UOP_MOVE            , 0x0, 3, -1, 0, 1, 0, 0, 0, 0, 1, -1, 0, 0, 0) \
    MACRO(__VA_ARGS__, u8_move_txz_xzt                         , SWS_PIXEL_U8 , SWS_UOP_MOVE            , 0x0, 3, -1, 0, 2, 0, 0, 0, 0, 2, -1, 0, 0, 0) \
    MACRO(__VA_ARGS__, u8_move_tyz_yzt                         , SWS_PIXEL_U8 , SWS_UOP_MOVE            , 0x0, 3, -1, 1, 2, 0, 0, 0, 1, 2, -1, 0, 0, 0) \
    MACRO(__VA_ARGS__, u8_move_tyw_ywt                         , SWS_PIXEL_U8 , SWS_UOP_MOVE            , 0x0, 3, -1, 1, 3, 0, 0, 0, 1, 3, -1, 0, 0, 0) \
    MACRO(__VA_ARGS__, u8_move_xtyz_wyzt                       , SWS_PIXEL_U8 , SWS_UOP_MOVE            , 0x0, 4, 0, -1, 1, 2, 0, 0, 3, 1, 2, -1, 0, 0) \
    MACRO(__VA_ARGS__, u8_move_zxyw_xyzz                       , SWS_PIXEL_U8 , SWS_UOP_MOVE            , 0x0, 4, 2, 0, 1, 3, 0, 0, 0, 1, 2, 2, 0, 0) \
    MACRO(__VA_ARGS__, u8_move_wtyz_xyzt                       , SWS_PIXEL_U8 , SWS_UOP_MOVE            , 0x0, 4, 3, -1, 1, 2, 0, 0, 0, 1, 2, -1, 0, 0) \
    MACRO(__VA_ARGS__, u8_move_txyz_xyzt                       , SWS_PIXEL_U8 , SWS_UOP_MOVE            , 0x0, 4, -1, 0, 1, 2, 0, 0, 0, 1, 2, -1, 0, 0) \
    MACRO(__VA_ARGS__, u8_move_txzy_xzyt                       , SWS_PIXEL_U8 , SWS_UOP_MOVE            , 0x0, 4, -1, 0, 2, 1, 0, 0, 0, 2, 1, -1, 0, 0) \
    MACRO(__VA_ARGS__, u8_move_txzw_xzwt                       , SWS_PIXEL_U8 , SWS_UOP_MOVE            , 0x0, 4, -1, 0, 2, 3, 0, 0, 0, 2, 3, -1, 0, 0) \
    MACRO(__VA_ARGS__, u8_move_txwz_xwzt                       , SWS_PIXEL_U8 , SWS_UOP_MOVE            , 0x0, 4, -1, 0, 3, 2, 0, 0, 0, 3, 2, -1, 0, 0) \
    MACRO(__VA_ARGS__, u8_move_tyzw_yzwt                       , SWS_PIXEL_U8 , SWS_UOP_MOVE            , 0x0, 4, -1, 1, 2, 3, 0, 0, 1, 2, 3, -1, 0, 0) \
    MACRO(__VA_ARGS__, u8_move_txyzw_xyzwt                     , SWS_PIXEL_U8 , SWS_UOP_MOVE            , 0x0, 5, -1, 0, 1, 2, 3, 0, 0, 1, 2, 3, -1, 0) \
    MACRO(__VA_ARGS__, u8_move_txwyz_xwyzt                     , SWS_PIXEL_U8 , SWS_UOP_MOVE            , 0x0, 5, -1, 0, 3, 1, 2, 0, 0, 3, 1, 2, -1, 0) \
    MACRO(__VA_ARGS__, u8_move_txwzy_xwzyt                     , SWS_PIXEL_U8 , SWS_UOP_MOVE            , 0x0, 5, -1, 0, 3, 2, 1, 0, 0, 3, 2, 1, -1, 0) \
    MACRO(__VA_ARGS__, u8_move_txwtyz_xwtyzt                   , SWS_PIXEL_U8 , SWS_UOP_MOVE            , 0x0, 6, -1, 0, 3, -1, 1, 2, 0, 3, -1, 1, 2, -1)
#define SWS_FOR_STRUCT_U8_MOVE(MACRO, ...) \
    MACRO(__VA_ARGS__, u8_move_x_y                             , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 1, .par.move.dst = {0, 0, 0, 0, 0, 0}, .par.move.src = {1, 0, 0, 0, 0, 0}) \
    MACRO(__VA_ARGS__, u8_move_x_z                             , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 1, .par.move.dst = {0, 0, 0, 0, 0, 0}, .par.move.src = {2, 0, 0, 0, 0, 0}) \
    MACRO(__VA_ARGS__, u8_move_x_w                             , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 1, .par.move.dst = {0, 0, 0, 0, 0, 0}, .par.move.src = {3, 0, 0, 0, 0, 0}) \
    MACRO(__VA_ARGS__, u8_move_y_x                             , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 1, .par.move.dst = {1, 0, 0, 0, 0, 0}, .par.move.src = {0, 0, 0, 0, 0, 0}) \
    MACRO(__VA_ARGS__, u8_move_y_w                             , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 1, .par.move.dst = {1, 0, 0, 0, 0, 0}, .par.move.src = {3, 0, 0, 0, 0, 0}) \
    MACRO(__VA_ARGS__, u8_move_z_x                             , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 1, .par.move.dst = {2, 0, 0, 0, 0, 0}, .par.move.src = {0, 0, 0, 0, 0, 0}) \
    MACRO(__VA_ARGS__, u8_move_w_x                             , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 1, .par.move.dst = {3, 0, 0, 0, 0, 0}, .par.move.src = {0, 0, 0, 0, 0, 0}) \
    MACRO(__VA_ARGS__, u8_move_xy_yw                           , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 2, .par.move.dst = {0, 1, 0, 0, 0, 0}, .par.move.src = {1, 3, 0, 0, 0, 0}) \
    MACRO(__VA_ARGS__, u8_move_xy_zw                           , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 2, .par.move.dst = {0, 1, 0, 0, 0, 0}, .par.move.src = {2, 3, 0, 0, 0, 0}) \
    MACRO(__VA_ARGS__, u8_move_yx_xw                           , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 2, .par.move.dst = {1, 0, 0, 0, 0, 0}, .par.move.src = {0, 3, 0, 0, 0, 0}) \
    MACRO(__VA_ARGS__, u8_move_yz_xx                           , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 2, .par.move.dst = {1, 2, 0, 0, 0, 0}, .par.move.src = {0, 0, 0, 0, 0, 0}) \
    MACRO(__VA_ARGS__, u8_move_wz_zx                           , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 2, .par.move.dst = {3, 2, 0, 0, 0, 0}, .par.move.src = {2, 0, 0, 0, 0, 0}) \
    MACRO(__VA_ARGS__, u8_move_xyz_yzw                         , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 3, .par.move.dst = {0, 1, 2, 0, 0, 0}, .par.move.src = {1, 2, 3, 0, 0, 0}) \
    MACRO(__VA_ARGS__, u8_move_xzy_zyw                         , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 3, .par.move.dst = {0, 2, 1, 0, 0, 0}, .par.move.src = {2, 1, 3, 0, 0, 0}) \
    MACRO(__VA_ARGS__, u8_move_yzw_xxx                         , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 3, .par.move.dst = {1, 2, 3, 0, 0, 0}, .par.move.src = {0, 0, 0, 0, 0, 0}) \
    MACRO(__VA_ARGS__, u8_move_zwy_xyx                         , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 3, .par.move.dst = {2, 3, 1, 0, 0, 0}, .par.move.src = {0, 1, 0, 0, 0, 0}) \
    MACRO(__VA_ARGS__, u8_move_wyz_yzx                         , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 3, .par.move.dst = {3, 1, 2, 0, 0, 0}, .par.move.src = {1, 2, 0, 0, 0, 0}) \
    MACRO(__VA_ARGS__, u8_move_wzy_zyx                         , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 3, .par.move.dst = {3, 2, 1, 0, 0, 0}, .par.move.src = {2, 1, 0, 0, 0, 0}) \
    MACRO(__VA_ARGS__, u8_move_txy_xyt                         , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 3, .par.move.dst = {-1, 0, 1, 0, 0, 0}, .par.move.src = {0, 1, -1, 0, 0, 0}) \
    MACRO(__VA_ARGS__, u8_move_txz_xzt                         , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 3, .par.move.dst = {-1, 0, 2, 0, 0, 0}, .par.move.src = {0, 2, -1, 0, 0, 0}) \
    MACRO(__VA_ARGS__, u8_move_tyz_yzt                         , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 3, .par.move.dst = {-1, 1, 2, 0, 0, 0}, .par.move.src = {1, 2, -1, 0, 0, 0}) \
    MACRO(__VA_ARGS__, u8_move_tyw_ywt                         , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 3, .par.move.dst = {-1, 1, 3, 0, 0, 0}, .par.move.src = {1, 3, -1, 0, 0, 0}) \
    MACRO(__VA_ARGS__, u8_move_xtyz_wyzt                       , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 4, .par.move.dst = {0, -1, 1, 2, 0, 0}, .par.move.src = {3, 1, 2, -1, 0, 0}) \
    MACRO(__VA_ARGS__, u8_move_zxyw_xyzz                       , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 4, .par.move.dst = {2, 0, 1, 3, 0, 0}, .par.move.src = {0, 1, 2, 2, 0, 0}) \
    MACRO(__VA_ARGS__, u8_move_wtyz_xyzt                       , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 4, .par.move.dst = {3, -1, 1, 2, 0, 0}, .par.move.src = {0, 1, 2, -1, 0, 0}) \
    MACRO(__VA_ARGS__, u8_move_txyz_xyzt                       , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 4, .par.move.dst = {-1, 0, 1, 2, 0, 0}, .par.move.src = {0, 1, 2, -1, 0, 0}) \
    MACRO(__VA_ARGS__, u8_move_txzy_xzyt                       , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 4, .par.move.dst = {-1, 0, 2, 1, 0, 0}, .par.move.src = {0, 2, 1, -1, 0, 0}) \
    MACRO(__VA_ARGS__, u8_move_txzw_xzwt                       , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 4, .par.move.dst = {-1, 0, 2, 3, 0, 0}, .par.move.src = {0, 2, 3, -1, 0, 0}) \
    MACRO(__VA_ARGS__, u8_move_txwz_xwzt                       , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 4, .par.move.dst = {-1, 0, 3, 2, 0, 0}, .par.move.src = {0, 3, 2, -1, 0, 0}) \
    MACRO(__VA_ARGS__, u8_move_tyzw_yzwt                       , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 4, .par.move.dst = {-1, 1, 2, 3, 0, 0}, .par.move.src = {1, 2, 3, -1, 0, 0}) \
    MACRO(__VA_ARGS__, u8_move_txyzw_xyzwt                     , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 5, .par.move.dst = {-1, 0, 1, 2, 3, 0}, .par.move.src = {0, 1, 2, 3, -1, 0}) \
    MACRO(__VA_ARGS__, u8_move_txwyz_xwyzt                     , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 5, .par.move.dst = {-1, 0, 3, 1, 2, 0}, .par.move.src = {0, 3, 1, 2, -1, 0}) \
    MACRO(__VA_ARGS__, u8_move_txwzy_xwzyt                     , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 5, .par.move.dst = {-1, 0, 3, 2, 1, 0}, .par.move.src = {0, 3, 2, 1, -1, 0}) \
    MACRO(__VA_ARGS__, u8_move_txwtyz_xwtyzt                   , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 6, .par.move.dst = {-1, 0, 3, -1, 1, 2}, .par.move.src = {0, 3, -1, 1, 2, -1})
#define SWS_FOR_U8_SWAP_BYTES(MACRO, ...)
#define SWS_FOR_STRUCT_U8_SWAP_BYTES(MACRO, ...)
#define SWS_FOR_U8_EXPAND_BIT(MACRO, ...) \
    MACRO(__VA_ARGS__, u8_expand_bit_x                         , SWS_PIXEL_U8 , SWS_UOP_EXPAND_BIT      , 0x1)
#define SWS_FOR_STRUCT_U8_EXPAND_BIT(MACRO, ...) \
    MACRO(__VA_ARGS__, u8_expand_bit_x                         , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_EXPAND_BIT      , .mask = 0x1)
#define SWS_FOR_U8_EXPAND_PAIR(MACRO, ...) \
    MACRO(__VA_ARGS__, u8_expand_pair_x                        , SWS_PIXEL_U8 , SWS_UOP_EXPAND_PAIR     , 0x1) \
    MACRO(__VA_ARGS__, u8_expand_pair_xy                       , SWS_PIXEL_U8 , SWS_UOP_EXPAND_PAIR     , 0x3) \
    MACRO(__VA_ARGS__, u8_expand_pair_xyz                      , SWS_PIXEL_U8 , SWS_UOP_EXPAND_PAIR     , 0x7) \
    MACRO(__VA_ARGS__, u8_expand_pair_yzw                      , SWS_PIXEL_U8 , SWS_UOP_EXPAND_PAIR     , 0xe) \
    MACRO(__VA_ARGS__, u8_expand_pair_xyzw                     , SWS_PIXEL_U8 , SWS_UOP_EXPAND_PAIR     , 0xf)
#define SWS_FOR_STRUCT_U8_EXPAND_PAIR(MACRO, ...) \
    MACRO(__VA_ARGS__, u8_expand_pair_x                        , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_EXPAND_PAIR     , .mask = 0x1) \
    MACRO(__VA_ARGS__, u8_expand_pair_xy                       , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_EXPAND_PAIR     , .mask = 0x3) \
    MACRO(__VA_ARGS__, u8_expand_pair_xyz                      , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_EXPAND_PAIR     , .mask = 0x7) \
    MACRO(__VA_ARGS__, u8_expand_pair_yzw                      , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_EXPAND_PAIR     , .mask = 0xe) \
    MACRO(__VA_ARGS__, u8_expand_pair_xyzw                     , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_EXPAND_PAIR     , .mask = 0xf)
#define SWS_FOR_U8_EXPAND_QUAD(MACRO, ...)
#define SWS_FOR_STRUCT_U8_EXPAND_QUAD(MACRO, ...)
#define SWS_FOR_U8_TO_U8(MACRO, ...)
#define SWS_FOR_STRUCT_U8_TO_U8(MACRO, ...)
#define SWS_FOR_U8_TO_U16(MACRO, ...) \
    MACRO(__VA_ARGS__, u8_to_u16_x                             , SWS_PIXEL_U8 , SWS_UOP_TO_U16          , 0x1) \
    MACRO(__VA_ARGS__, u8_to_u16_xyz                           , SWS_PIXEL_U8 , SWS_UOP_TO_U16          , 0x7) \
    MACRO(__VA_ARGS__, u8_to_u16_yzw                           , SWS_PIXEL_U8 , SWS_UOP_TO_U16          , 0xe)
#define SWS_FOR_STRUCT_U8_TO_U16(MACRO, ...) \
    MACRO(__VA_ARGS__, u8_to_u16_x                             , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_TO_U16          , .mask = 0x1) \
    MACRO(__VA_ARGS__, u8_to_u16_xyz                           , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_TO_U16          , .mask = 0x7) \
    MACRO(__VA_ARGS__, u8_to_u16_yzw                           , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_TO_U16          , .mask = 0xe)
#define SWS_FOR_U8_TO_U32(MACRO, ...) \
    MACRO(__VA_ARGS__, u8_to_u32_x                             , SWS_PIXEL_U8 , SWS_UOP_TO_U32          , 0x1) \
    MACRO(__VA_ARGS__, u8_to_u32_xyz                           , SWS_PIXEL_U8 , SWS_UOP_TO_U32          , 0x7)
#define SWS_FOR_STRUCT_U8_TO_U32(MACRO, ...) \
    MACRO(__VA_ARGS__, u8_to_u32_x                             , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_TO_U32          , .mask = 0x1) \
    MACRO(__VA_ARGS__, u8_to_u32_xyz                           , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_TO_U32          , .mask = 0x7)
#define SWS_FOR_U8_TO_F32(MACRO, ...) \
    MACRO(__VA_ARGS__, u8_to_f32_x                             , SWS_PIXEL_U8 , SWS_UOP_TO_F32          , 0x1) \
    MACRO(__VA_ARGS__, u8_to_f32_y                             , SWS_PIXEL_U8 , SWS_UOP_TO_F32          , 0x2) \
    MACRO(__VA_ARGS__, u8_to_f32_xy                            , SWS_PIXEL_U8 , SWS_UOP_TO_F32          , 0x3) \
    MACRO(__VA_ARGS__, u8_to_f32_z                             , SWS_PIXEL_U8 , SWS_UOP_TO_F32          , 0x4) \
    MACRO(__VA_ARGS__, u8_to_f32_xyz                           , SWS_PIXEL_U8 , SWS_UOP_TO_F32          , 0x7) \
    MACRO(__VA_ARGS__, u8_to_f32_yw                            , SWS_PIXEL_U8 , SWS_UOP_TO_F32          , 0xa) \
    MACRO(__VA_ARGS__, u8_to_f32_zw                            , SWS_PIXEL_U8 , SWS_UOP_TO_F32          , 0xc) \
    MACRO(__VA_ARGS__, u8_to_f32_yzw                           , SWS_PIXEL_U8 , SWS_UOP_TO_F32          , 0xe) \
    MACRO(__VA_ARGS__, u8_to_f32_xyzw                          , SWS_PIXEL_U8 , SWS_UOP_TO_F32          , 0xf)
#define SWS_FOR_STRUCT_U8_TO_F32(MACRO, ...) \
    MACRO(__VA_ARGS__, u8_to_f32_x                             , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_TO_F32          , .mask = 0x1) \
    MACRO(__VA_ARGS__, u8_to_f32_y                             , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_TO_F32          , .mask = 0x2) \
    MACRO(__VA_ARGS__, u8_to_f32_xy                            , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_TO_F32          , .mask = 0x3) \
    MACRO(__VA_ARGS__, u8_to_f32_z                             , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_TO_F32          , .mask = 0x4) \
    MACRO(__VA_ARGS__, u8_to_f32_xyz                           , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_TO_F32          , .mask = 0x7) \
    MACRO(__VA_ARGS__, u8_to_f32_yw                            , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_TO_F32          , .mask = 0xa) \
    MACRO(__VA_ARGS__, u8_to_f32_zw                            , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_TO_F32          , .mask = 0xc) \
    MACRO(__VA_ARGS__, u8_to_f32_yzw                           , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_TO_F32          , .mask = 0xe) \
    MACRO(__VA_ARGS__, u8_to_f32_xyzw                          , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_TO_F32          , .mask = 0xf)
#define SWS_FOR_U8_SCALE(MACRO, ...) \
    MACRO(__VA_ARGS__, u8_scale_xyz                            , SWS_PIXEL_U8 , SWS_UOP_SCALE           , 0x7)
#define SWS_FOR_STRUCT_U8_SCALE(MACRO, ...) \
    MACRO(__VA_ARGS__, u8_scale_xyz                            , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_SCALE           , .mask = 0x7)
#define SWS_FOR_U8_ADD(MACRO, ...)
#define SWS_FOR_STRUCT_U8_ADD(MACRO, ...)
#define SWS_FOR_U8_MIN(MACRO, ...)
#define SWS_FOR_STRUCT_U8_MIN(MACRO, ...)
#define SWS_FOR_U8_MAX(MACRO, ...)
#define SWS_FOR_STRUCT_U8_MAX(MACRO, ...)
#define SWS_FOR_U8_UNPACK(MACRO, ...) \
    MACRO(__VA_ARGS__, u8_unpack_xyz_121                       , SWS_PIXEL_U8 , SWS_UOP_UNPACK          , 0x7, 1, 2, 1, 0) \
    MACRO(__VA_ARGS__, u8_unpack_xyz_233                       , SWS_PIXEL_U8 , SWS_UOP_UNPACK          , 0x7, 2, 3, 3, 0) \
    MACRO(__VA_ARGS__, u8_unpack_xyz_332                       , SWS_PIXEL_U8 , SWS_UOP_UNPACK          , 0x7, 3, 3, 2, 0)
#define SWS_FOR_STRUCT_U8_UNPACK(MACRO, ...) \
    MACRO(__VA_ARGS__, u8_unpack_xyz_121                       , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_UNPACK          , .mask = 0x7, .par.pack.pattern = {1, 2, 1, 0}) \
    MACRO(__VA_ARGS__, u8_unpack_xyz_233                       , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_UNPACK          , .mask = 0x7, .par.pack.pattern = {2, 3, 3, 0}) \
    MACRO(__VA_ARGS__, u8_unpack_xyz_332                       , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_UNPACK          , .mask = 0x7, .par.pack.pattern = {3, 3, 2, 0})
#define SWS_FOR_U8_PACK(MACRO, ...) \
    MACRO(__VA_ARGS__, u8_pack_xyz_121                         , SWS_PIXEL_U8 , SWS_UOP_PACK            , 0x7, 1, 2, 1, 0) \
    MACRO(__VA_ARGS__, u8_pack_xyz_233                         , SWS_PIXEL_U8 , SWS_UOP_PACK            , 0x7, 2, 3, 3, 0) \
    MACRO(__VA_ARGS__, u8_pack_xyz_332                         , SWS_PIXEL_U8 , SWS_UOP_PACK            , 0x7, 3, 3, 2, 0)
#define SWS_FOR_STRUCT_U8_PACK(MACRO, ...) \
    MACRO(__VA_ARGS__, u8_pack_xyz_121                         , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_PACK            , .mask = 0x7, .par.pack.pattern = {1, 2, 1, 0}) \
    MACRO(__VA_ARGS__, u8_pack_xyz_233                         , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_PACK            , .mask = 0x7, .par.pack.pattern = {2, 3, 3, 0}) \
    MACRO(__VA_ARGS__, u8_pack_xyz_332                         , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_PACK            , .mask = 0x7, .par.pack.pattern = {3, 3, 2, 0})
#define SWS_FOR_U8_LSHIFT(MACRO, ...)
#define SWS_FOR_STRUCT_U8_LSHIFT(MACRO, ...)
#define SWS_FOR_U8_RSHIFT(MACRO, ...)
#define SWS_FOR_STRUCT_U8_RSHIFT(MACRO, ...)
#define SWS_FOR_U8_CLEAR(MACRO, ...) \
    MACRO(__VA_ARGS__, u8_clear_x_0                            , SWS_PIXEL_U8 , SWS_UOP_CLEAR           , 0x1, 0x00000, 0x00001) \
    MACRO(__VA_ARGS__, u8_clear_x_1                            , SWS_PIXEL_U8 , SWS_UOP_CLEAR           , 0x1, 0x00001, 0x00000) \
    MACRO(__VA_ARGS__, u8_clear_y_1                            , SWS_PIXEL_U8 , SWS_UOP_CLEAR           , 0x2, 0x00002, 0x00000) \
    MACRO(__VA_ARGS__, u8_clear_xy_xx                          , SWS_PIXEL_U8 , SWS_UOP_CLEAR           , 0x3, 0x00000, 0x00000) \
    MACRO(__VA_ARGS__, u8_clear_xz_xx                          , SWS_PIXEL_U8 , SWS_UOP_CLEAR           , 0x5, 0x00000, 0x00000) \
    MACRO(__VA_ARGS__, u8_clear_yz_xx                          , SWS_PIXEL_U8 , SWS_UOP_CLEAR           , 0x6, 0x00000, 0x00000) \
    MACRO(__VA_ARGS__, u8_clear_w_0                            , SWS_PIXEL_U8 , SWS_UOP_CLEAR           , 0x8, 0x00000, 0x00008) \
    MACRO(__VA_ARGS__, u8_clear_w_1                            , SWS_PIXEL_U8 , SWS_UOP_CLEAR           , 0x8, 0x00008, 0x00000) \
    MACRO(__VA_ARGS__, u8_clear_xyw_xx0                        , SWS_PIXEL_U8 , SWS_UOP_CLEAR           , 0xb, 0x00000, 0x00008) \
    MACRO(__VA_ARGS__, u8_clear_xyw_xx1                        , SWS_PIXEL_U8 , SWS_UOP_CLEAR           , 0xb, 0x00008, 0x00000) \
    MACRO(__VA_ARGS__, u8_clear_zw_xx                          , SWS_PIXEL_U8 , SWS_UOP_CLEAR           , 0xc, 0x00000, 0x00000) \
    MACRO(__VA_ARGS__, u8_clear_xzw_1xx                        , SWS_PIXEL_U8 , SWS_UOP_CLEAR           , 0xd, 0x00001, 0x00000) \
    MACRO(__VA_ARGS__, u8_clear_xzw_xx1                        , SWS_PIXEL_U8 , SWS_UOP_CLEAR           , 0xd, 0x00008, 0x00000) \
    MACRO(__VA_ARGS__, u8_clear_yzw_xx1                        , SWS_PIXEL_U8 , SWS_UOP_CLEAR           , 0xe, 0x00008, 0x00000)
#define SWS_FOR_STRUCT_U8_CLEAR(MACRO, ...) \
    MACRO(__VA_ARGS__, u8_clear_x_0                            , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_CLEAR           , .mask = 0x1, .par.clear.one = 0x0, .par.clear.zero = 0x1) \
    MACRO(__VA_ARGS__, u8_clear_x_1                            , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_CLEAR           , .mask = 0x1, .par.clear.one = 0x1, .par.clear.zero = 0x0) \
    MACRO(__VA_ARGS__, u8_clear_y_1                            , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_CLEAR           , .mask = 0x2, .par.clear.one = 0x2, .par.clear.zero = 0x0) \
    MACRO(__VA_ARGS__, u8_clear_xy_xx                          , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_CLEAR           , .mask = 0x3, .par.clear.one = 0x0, .par.clear.zero = 0x0) \
    MACRO(__VA_ARGS__, u8_clear_xz_xx                          , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_CLEAR           , .mask = 0x5, .par.clear.one = 0x0, .par.clear.zero = 0x0) \
    MACRO(__VA_ARGS__, u8_clear_yz_xx                          , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_CLEAR           , .mask = 0x6, .par.clear.one = 0x0, .par.clear.zero = 0x0) \
    MACRO(__VA_ARGS__, u8_clear_w_0                            , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_CLEAR           , .mask = 0x8, .par.clear.one = 0x0, .par.clear.zero = 0x8) \
    MACRO(__VA_ARGS__, u8_clear_w_1                            , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_CLEAR           , .mask = 0x8, .par.clear.one = 0x8, .par.clear.zero = 0x0) \
    MACRO(__VA_ARGS__, u8_clear_xyw_xx0                        , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_CLEAR           , .mask = 0xb, .par.clear.one = 0x0, .par.clear.zero = 0x8) \
    MACRO(__VA_ARGS__, u8_clear_xyw_xx1                        , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_CLEAR           , .mask = 0xb, .par.clear.one = 0x8, .par.clear.zero = 0x0) \
    MACRO(__VA_ARGS__, u8_clear_zw_xx                          , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_CLEAR           , .mask = 0xc, .par.clear.one = 0x0, .par.clear.zero = 0x0) \
    MACRO(__VA_ARGS__, u8_clear_xzw_1xx                        , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_CLEAR           , .mask = 0xd, .par.clear.one = 0x1, .par.clear.zero = 0x0) \
    MACRO(__VA_ARGS__, u8_clear_xzw_xx1                        , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_CLEAR           , .mask = 0xd, .par.clear.one = 0x8, .par.clear.zero = 0x0) \
    MACRO(__VA_ARGS__, u8_clear_yzw_xx1                        , .type = SWS_PIXEL_U8 , .uop = SWS_UOP_CLEAR           , .mask = 0xe, .par.clear.one = 0x8, .par.clear.zero = 0x0)
#define SWS_FOR_U8_LINEAR(MACRO, ...)
#define SWS_FOR_STRUCT_U8_LINEAR(MACRO, ...)
#define SWS_FOR_U8_LINEAR_FMA(MACRO, ...)
#define SWS_FOR_STRUCT_U8_LINEAR_FMA(MACRO, ...)
#define SWS_FOR_U8_DITHER(MACRO, ...)
#define SWS_FOR_STRUCT_U8_DITHER(MACRO, ...)
#define SWS_FOR_U16_READ_PLANAR(MACRO, ...) \
    MACRO(__VA_ARGS__, u16_read_planar_x                       , SWS_PIXEL_U16, SWS_UOP_READ_PLANAR     , 0x1) \
    MACRO(__VA_ARGS__, u16_read_planar_xy                      , SWS_PIXEL_U16, SWS_UOP_READ_PLANAR     , 0x3) \
    MACRO(__VA_ARGS__, u16_read_planar_xyz                     , SWS_PIXEL_U16, SWS_UOP_READ_PLANAR     , 0x7) \
    MACRO(__VA_ARGS__, u16_read_planar_xyzw                    , SWS_PIXEL_U16, SWS_UOP_READ_PLANAR     , 0xf)
#define SWS_FOR_STRUCT_U16_READ_PLANAR(MACRO, ...) \
    MACRO(__VA_ARGS__, u16_read_planar_x                       , .type = SWS_PIXEL_U16, .uop = SWS_UOP_READ_PLANAR     , .mask = 0x1) \
    MACRO(__VA_ARGS__, u16_read_planar_xy                      , .type = SWS_PIXEL_U16, .uop = SWS_UOP_READ_PLANAR     , .mask = 0x3) \
    MACRO(__VA_ARGS__, u16_read_planar_xyz                     , .type = SWS_PIXEL_U16, .uop = SWS_UOP_READ_PLANAR     , .mask = 0x7) \
    MACRO(__VA_ARGS__, u16_read_planar_xyzw                    , .type = SWS_PIXEL_U16, .uop = SWS_UOP_READ_PLANAR     , .mask = 0xf)
#define SWS_FOR_U16_READ_PLANAR_FH(MACRO, ...) \
    MACRO(__VA_ARGS__, u16_read_planar_fh_x_f32                , SWS_PIXEL_U16, SWS_UOP_READ_PLANAR_FH  , 0x1, SWS_PIXEL_F32) \
    MACRO(__VA_ARGS__, u16_read_planar_fh_xy_f32               , SWS_PIXEL_U16, SWS_UOP_READ_PLANAR_FH  , 0x3, SWS_PIXEL_F32) \
    MACRO(__VA_ARGS__, u16_read_planar_fh_xyz_f32              , SWS_PIXEL_U16, SWS_UOP_READ_PLANAR_FH  , 0x7, SWS_PIXEL_F32) \
    MACRO(__VA_ARGS__, u16_read_planar_fh_xyzw_f32             , SWS_PIXEL_U16, SWS_UOP_READ_PLANAR_FH  , 0xf, SWS_PIXEL_F32)
#define SWS_FOR_STRUCT_U16_READ_PLANAR_FH(MACRO, ...) \
    MACRO(__VA_ARGS__, u16_read_planar_fh_x_f32                , .type = SWS_PIXEL_U16, .uop = SWS_UOP_READ_PLANAR_FH  , .mask = 0x1, .par.filter.type = SWS_PIXEL_F32) \
    MACRO(__VA_ARGS__, u16_read_planar_fh_xy_f32               , .type = SWS_PIXEL_U16, .uop = SWS_UOP_READ_PLANAR_FH  , .mask = 0x3, .par.filter.type = SWS_PIXEL_F32) \
    MACRO(__VA_ARGS__, u16_read_planar_fh_xyz_f32              , .type = SWS_PIXEL_U16, .uop = SWS_UOP_READ_PLANAR_FH  , .mask = 0x7, .par.filter.type = SWS_PIXEL_F32) \
    MACRO(__VA_ARGS__, u16_read_planar_fh_xyzw_f32             , .type = SWS_PIXEL_U16, .uop = SWS_UOP_READ_PLANAR_FH  , .mask = 0xf, .par.filter.type = SWS_PIXEL_F32)
#define SWS_FOR_U16_READ_PLANAR_FV(MACRO, ...) \
    MACRO(__VA_ARGS__, u16_read_planar_fv_x_f32                , SWS_PIXEL_U16, SWS_UOP_READ_PLANAR_FV  , 0x1, SWS_PIXEL_F32) \
    MACRO(__VA_ARGS__, u16_read_planar_fv_xy_f32               , SWS_PIXEL_U16, SWS_UOP_READ_PLANAR_FV  , 0x3, SWS_PIXEL_F32) \
    MACRO(__VA_ARGS__, u16_read_planar_fv_xyz_f32              , SWS_PIXEL_U16, SWS_UOP_READ_PLANAR_FV  , 0x7, SWS_PIXEL_F32) \
    MACRO(__VA_ARGS__, u16_read_planar_fv_xyzw_f32             , SWS_PIXEL_U16, SWS_UOP_READ_PLANAR_FV  , 0xf, SWS_PIXEL_F32)
#define SWS_FOR_STRUCT_U16_READ_PLANAR_FV(MACRO, ...) \
    MACRO(__VA_ARGS__, u16_read_planar_fv_x_f32                , .type = SWS_PIXEL_U16, .uop = SWS_UOP_READ_PLANAR_FV  , .mask = 0x1, .par.filter.type = SWS_PIXEL_F32) \
    MACRO(__VA_ARGS__, u16_read_planar_fv_xy_f32               , .type = SWS_PIXEL_U16, .uop = SWS_UOP_READ_PLANAR_FV  , .mask = 0x3, .par.filter.type = SWS_PIXEL_F32) \
    MACRO(__VA_ARGS__, u16_read_planar_fv_xyz_f32              , .type = SWS_PIXEL_U16, .uop = SWS_UOP_READ_PLANAR_FV  , .mask = 0x7, .par.filter.type = SWS_PIXEL_F32) \
    MACRO(__VA_ARGS__, u16_read_planar_fv_xyzw_f32             , .type = SWS_PIXEL_U16, .uop = SWS_UOP_READ_PLANAR_FV  , .mask = 0xf, .par.filter.type = SWS_PIXEL_F32)
#define SWS_FOR_U16_READ_PLANAR_FV_FMA(MACRO, ...) \
    MACRO(__VA_ARGS__, u16_read_planar_fv_fma_x_f32            , SWS_PIXEL_U16, SWS_UOP_READ_PLANAR_FV_FMA, 0x1, SWS_PIXEL_F32) \
    MACRO(__VA_ARGS__, u16_read_planar_fv_fma_xy_f32           , SWS_PIXEL_U16, SWS_UOP_READ_PLANAR_FV_FMA, 0x3, SWS_PIXEL_F32) \
    MACRO(__VA_ARGS__, u16_read_planar_fv_fma_xyz_f32          , SWS_PIXEL_U16, SWS_UOP_READ_PLANAR_FV_FMA, 0x7, SWS_PIXEL_F32) \
    MACRO(__VA_ARGS__, u16_read_planar_fv_fma_xyzw_f32         , SWS_PIXEL_U16, SWS_UOP_READ_PLANAR_FV_FMA, 0xf, SWS_PIXEL_F32)
#define SWS_FOR_STRUCT_U16_READ_PLANAR_FV_FMA(MACRO, ...) \
    MACRO(__VA_ARGS__, u16_read_planar_fv_fma_x_f32            , .type = SWS_PIXEL_U16, .uop = SWS_UOP_READ_PLANAR_FV_FMA, .mask = 0x1, .par.filter.type = SWS_PIXEL_F32) \
    MACRO(__VA_ARGS__, u16_read_planar_fv_fma_xy_f32           , .type = SWS_PIXEL_U16, .uop = SWS_UOP_READ_PLANAR_FV_FMA, .mask = 0x3, .par.filter.type = SWS_PIXEL_F32) \
    MACRO(__VA_ARGS__, u16_read_planar_fv_fma_xyz_f32          , .type = SWS_PIXEL_U16, .uop = SWS_UOP_READ_PLANAR_FV_FMA, .mask = 0x7, .par.filter.type = SWS_PIXEL_F32) \
    MACRO(__VA_ARGS__, u16_read_planar_fv_fma_xyzw_f32         , .type = SWS_PIXEL_U16, .uop = SWS_UOP_READ_PLANAR_FV_FMA, .mask = 0xf, .par.filter.type = SWS_PIXEL_F32)
#define SWS_FOR_U16_READ_PACKED(MACRO, ...) \
    MACRO(__VA_ARGS__, u16_read_packed_xy                      , SWS_PIXEL_U16, SWS_UOP_READ_PACKED     , 0x3) \
    MACRO(__VA_ARGS__, u16_read_packed_xyz                     , SWS_PIXEL_U16, SWS_UOP_READ_PACKED     , 0x7) \
    MACRO(__VA_ARGS__, u16_read_packed_xyzw                    , SWS_PIXEL_U16, SWS_UOP_READ_PACKED     , 0xf)
#define SWS_FOR_STRUCT_U16_READ_PACKED(MACRO, ...) \
    MACRO(__VA_ARGS__, u16_read_packed_xy                      , .type = SWS_PIXEL_U16, .uop = SWS_UOP_READ_PACKED     , .mask = 0x3) \
    MACRO(__VA_ARGS__, u16_read_packed_xyz                     , .type = SWS_PIXEL_U16, .uop = SWS_UOP_READ_PACKED     , .mask = 0x7) \
    MACRO(__VA_ARGS__, u16_read_packed_xyzw                    , .type = SWS_PIXEL_U16, .uop = SWS_UOP_READ_PACKED     , .mask = 0xf)
#define SWS_FOR_U16_READ_NIBBLE(MACRO, ...)
#define SWS_FOR_STRUCT_U16_READ_NIBBLE(MACRO, ...)
#define SWS_FOR_U16_READ_BIT(MACRO, ...)
#define SWS_FOR_STRUCT_U16_READ_BIT(MACRO, ...)
#define SWS_FOR_U16_WRITE_PLANAR(MACRO, ...) \
    MACRO(__VA_ARGS__, u16_write_planar_x                      , SWS_PIXEL_U16, SWS_UOP_WRITE_PLANAR    , 0x1) \
    MACRO(__VA_ARGS__, u16_write_planar_xy                     , SWS_PIXEL_U16, SWS_UOP_WRITE_PLANAR    , 0x3) \
    MACRO(__VA_ARGS__, u16_write_planar_xyz                    , SWS_PIXEL_U16, SWS_UOP_WRITE_PLANAR    , 0x7) \
    MACRO(__VA_ARGS__, u16_write_planar_xyzw                   , SWS_PIXEL_U16, SWS_UOP_WRITE_PLANAR    , 0xf)
#define SWS_FOR_STRUCT_U16_WRITE_PLANAR(MACRO, ...) \
    MACRO(__VA_ARGS__, u16_write_planar_x                      , .type = SWS_PIXEL_U16, .uop = SWS_UOP_WRITE_PLANAR    , .mask = 0x1) \
    MACRO(__VA_ARGS__, u16_write_planar_xy                     , .type = SWS_PIXEL_U16, .uop = SWS_UOP_WRITE_PLANAR    , .mask = 0x3) \
    MACRO(__VA_ARGS__, u16_write_planar_xyz                    , .type = SWS_PIXEL_U16, .uop = SWS_UOP_WRITE_PLANAR    , .mask = 0x7) \
    MACRO(__VA_ARGS__, u16_write_planar_xyzw                   , .type = SWS_PIXEL_U16, .uop = SWS_UOP_WRITE_PLANAR    , .mask = 0xf)
#define SWS_FOR_U16_WRITE_PACKED(MACRO, ...) \
    MACRO(__VA_ARGS__, u16_write_packed_xy                     , SWS_PIXEL_U16, SWS_UOP_WRITE_PACKED    , 0x3) \
    MACRO(__VA_ARGS__, u16_write_packed_xyz                    , SWS_PIXEL_U16, SWS_UOP_WRITE_PACKED    , 0x7) \
    MACRO(__VA_ARGS__, u16_write_packed_xyzw                   , SWS_PIXEL_U16, SWS_UOP_WRITE_PACKED    , 0xf)
#define SWS_FOR_STRUCT_U16_WRITE_PACKED(MACRO, ...) \
    MACRO(__VA_ARGS__, u16_write_packed_xy                     , .type = SWS_PIXEL_U16, .uop = SWS_UOP_WRITE_PACKED    , .mask = 0x3) \
    MACRO(__VA_ARGS__, u16_write_packed_xyz                    , .type = SWS_PIXEL_U16, .uop = SWS_UOP_WRITE_PACKED    , .mask = 0x7) \
    MACRO(__VA_ARGS__, u16_write_packed_xyzw                   , .type = SWS_PIXEL_U16, .uop = SWS_UOP_WRITE_PACKED    , .mask = 0xf)
#define SWS_FOR_U16_WRITE_NIBBLE(MACRO, ...)
#define SWS_FOR_STRUCT_U16_WRITE_NIBBLE(MACRO, ...)
#define SWS_FOR_U16_WRITE_BIT(MACRO, ...)
#define SWS_FOR_STRUCT_U16_WRITE_BIT(MACRO, ...)
#define SWS_FOR_U16_PERMUTE(MACRO, ...) \
    MACRO(__VA_ARGS__, u16_permute_x_y                         , SWS_PIXEL_U16, SWS_UOP_PERMUTE         , 0x1, 1, 0, 2, 3) \
    MACRO(__VA_ARGS__, u16_permute_x_z                         , SWS_PIXEL_U16, SWS_UOP_PERMUTE         , 0x1, 2, 1, 0, 3) \
    MACRO(__VA_ARGS__, u16_permute_x_w                         , SWS_PIXEL_U16, SWS_UOP_PERMUTE         , 0x1, 3, 1, 2, 0) \
    MACRO(__VA_ARGS__, u16_permute_y_w                         , SWS_PIXEL_U16, SWS_UOP_PERMUTE         , 0x2, 0, 3, 2, 1) \
    MACRO(__VA_ARGS__, u16_permute_y_x                         , SWS_PIXEL_U16, SWS_UOP_PERMUTE         , 0x2, 1, 0, 2, 3) \
    MACRO(__VA_ARGS__, u16_permute_xy_yx                       , SWS_PIXEL_U16, SWS_UOP_PERMUTE         , 0x3, 1, 0, 2, 3) \
    MACRO(__VA_ARGS__, u16_permute_xy_wx                       , SWS_PIXEL_U16, SWS_UOP_PERMUTE         , 0x3, 3, 0, 2, 1) \
    MACRO(__VA_ARGS__, u16_permute_xz_zx                       , SWS_PIXEL_U16, SWS_UOP_PERMUTE         , 0x5, 2, 1, 0, 3) \
    MACRO(__VA_ARGS__, u16_permute_xz_zw                       , SWS_PIXEL_U16, SWS_UOP_PERMUTE         , 0x5, 2, 1, 3, 0) \
    MACRO(__VA_ARGS__, u16_permute_xyz_yzx                     , SWS_PIXEL_U16, SWS_UOP_PERMUTE         , 0x7, 1, 2, 0, 3) \
    MACRO(__VA_ARGS__, u16_permute_xyz_yzw                     , SWS_PIXEL_U16, SWS_UOP_PERMUTE         , 0x7, 1, 2, 3, 0) \
    MACRO(__VA_ARGS__, u16_permute_xyz_zxy                     , SWS_PIXEL_U16, SWS_UOP_PERMUTE         , 0x7, 2, 0, 1, 3) \
    MACRO(__VA_ARGS__, u16_permute_xyz_zwy                     , SWS_PIXEL_U16, SWS_UOP_PERMUTE         , 0x7, 2, 3, 1, 0) \
    MACRO(__VA_ARGS__, u16_permute_xyz_wzy                     , SWS_PIXEL_U16, SWS_UOP_PERMUTE         , 0x7, 3, 2, 1, 0) \
    MACRO(__VA_ARGS__, u16_permute_w_x                         , SWS_PIXEL_U16, SWS_UOP_PERMUTE         , 0x8, 3, 1, 2, 0) \
    MACRO(__VA_ARGS__, u16_permute_zw_xz                       , SWS_PIXEL_U16, SWS_UOP_PERMUTE         , 0xc, 3, 1, 0, 2) \
    MACRO(__VA_ARGS__, u16_permute_yzw_zwy                     , SWS_PIXEL_U16, SWS_UOP_PERMUTE         , 0xe, 0, 2, 3, 1) \
    MACRO(__VA_ARGS__, u16_permute_yzw_xyz                     , SWS_PIXEL_U16, SWS_UOP_PERMUTE         , 0xe, 3, 0, 1, 2) \
    MACRO(__VA_ARGS__, u16_permute_yzw_zyx                     , SWS_PIXEL_U16, SWS_UOP_PERMUTE         , 0xe, 3, 2, 1, 0) \
    MACRO(__VA_ARGS__, u16_permute_xyzw_yzwx                   , SWS_PIXEL_U16, SWS_UOP_PERMUTE         , 0xf, 1, 2, 3, 0) \
    MACRO(__VA_ARGS__, u16_permute_xyzw_wxyz                   , SWS_PIXEL_U16, SWS_UOP_PERMUTE         , 0xf, 3, 0, 1, 2) \
    MACRO(__VA_ARGS__, u16_permute_xyzw_wzyx                   , SWS_PIXEL_U16, SWS_UOP_PERMUTE         , 0xf, 3, 2, 1, 0)
#define SWS_FOR_STRUCT_U16_PERMUTE(MACRO, ...) \
    MACRO(__VA_ARGS__, u16_permute_x_y                         , .type = SWS_PIXEL_U16, .uop = SWS_UOP_PERMUTE         , .mask = 0x1, .par.swizzle.in = {1, 0, 2, 3}) \
    MACRO(__VA_ARGS__, u16_permute_x_z                         , .type = SWS_PIXEL_U16, .uop = SWS_UOP_PERMUTE         , .mask = 0x1, .par.swizzle.in = {2, 1, 0, 3}) \
    MACRO(__VA_ARGS__, u16_permute_x_w                         , .type = SWS_PIXEL_U16, .uop = SWS_UOP_PERMUTE         , .mask = 0x1, .par.swizzle.in = {3, 1, 2, 0}) \
    MACRO(__VA_ARGS__, u16_permute_y_w                         , .type = SWS_PIXEL_U16, .uop = SWS_UOP_PERMUTE         , .mask = 0x2, .par.swizzle.in = {0, 3, 2, 1}) \
    MACRO(__VA_ARGS__, u16_permute_y_x                         , .type = SWS_PIXEL_U16, .uop = SWS_UOP_PERMUTE         , .mask = 0x2, .par.swizzle.in = {1, 0, 2, 3}) \
    MACRO(__VA_ARGS__, u16_permute_xy_yx                       , .type = SWS_PIXEL_U16, .uop = SWS_UOP_PERMUTE         , .mask = 0x3, .par.swizzle.in = {1, 0, 2, 3}) \
    MACRO(__VA_ARGS__, u16_permute_xy_wx                       , .type = SWS_PIXEL_U16, .uop = SWS_UOP_PERMUTE         , .mask = 0x3, .par.swizzle.in = {3, 0, 2, 1}) \
    MACRO(__VA_ARGS__, u16_permute_xz_zx                       , .type = SWS_PIXEL_U16, .uop = SWS_UOP_PERMUTE         , .mask = 0x5, .par.swizzle.in = {2, 1, 0, 3}) \
    MACRO(__VA_ARGS__, u16_permute_xz_zw                       , .type = SWS_PIXEL_U16, .uop = SWS_UOP_PERMUTE         , .mask = 0x5, .par.swizzle.in = {2, 1, 3, 0}) \
    MACRO(__VA_ARGS__, u16_permute_xyz_yzx                     , .type = SWS_PIXEL_U16, .uop = SWS_UOP_PERMUTE         , .mask = 0x7, .par.swizzle.in = {1, 2, 0, 3}) \
    MACRO(__VA_ARGS__, u16_permute_xyz_yzw                     , .type = SWS_PIXEL_U16, .uop = SWS_UOP_PERMUTE         , .mask = 0x7, .par.swizzle.in = {1, 2, 3, 0}) \
    MACRO(__VA_ARGS__, u16_permute_xyz_zxy                     , .type = SWS_PIXEL_U16, .uop = SWS_UOP_PERMUTE         , .mask = 0x7, .par.swizzle.in = {2, 0, 1, 3}) \
    MACRO(__VA_ARGS__, u16_permute_xyz_zwy                     , .type = SWS_PIXEL_U16, .uop = SWS_UOP_PERMUTE         , .mask = 0x7, .par.swizzle.in = {2, 3, 1, 0}) \
    MACRO(__VA_ARGS__, u16_permute_xyz_wzy                     , .type = SWS_PIXEL_U16, .uop = SWS_UOP_PERMUTE         , .mask = 0x7, .par.swizzle.in = {3, 2, 1, 0}) \
    MACRO(__VA_ARGS__, u16_permute_w_x                         , .type = SWS_PIXEL_U16, .uop = SWS_UOP_PERMUTE         , .mask = 0x8, .par.swizzle.in = {3, 1, 2, 0}) \
    MACRO(__VA_ARGS__, u16_permute_zw_xz                       , .type = SWS_PIXEL_U16, .uop = SWS_UOP_PERMUTE         , .mask = 0xc, .par.swizzle.in = {3, 1, 0, 2}) \
    MACRO(__VA_ARGS__, u16_permute_yzw_zwy                     , .type = SWS_PIXEL_U16, .uop = SWS_UOP_PERMUTE         , .mask = 0xe, .par.swizzle.in = {0, 2, 3, 1}) \
    MACRO(__VA_ARGS__, u16_permute_yzw_xyz                     , .type = SWS_PIXEL_U16, .uop = SWS_UOP_PERMUTE         , .mask = 0xe, .par.swizzle.in = {3, 0, 1, 2}) \
    MACRO(__VA_ARGS__, u16_permute_yzw_zyx                     , .type = SWS_PIXEL_U16, .uop = SWS_UOP_PERMUTE         , .mask = 0xe, .par.swizzle.in = {3, 2, 1, 0}) \
    MACRO(__VA_ARGS__, u16_permute_xyzw_yzwx                   , .type = SWS_PIXEL_U16, .uop = SWS_UOP_PERMUTE         , .mask = 0xf, .par.swizzle.in = {1, 2, 3, 0}) \
    MACRO(__VA_ARGS__, u16_permute_xyzw_wxyz                   , .type = SWS_PIXEL_U16, .uop = SWS_UOP_PERMUTE         , .mask = 0xf, .par.swizzle.in = {3, 0, 1, 2}) \
    MACRO(__VA_ARGS__, u16_permute_xyzw_wzyx                   , .type = SWS_PIXEL_U16, .uop = SWS_UOP_PERMUTE         , .mask = 0xf, .par.swizzle.in = {3, 2, 1, 0})
#define SWS_FOR_U16_COPY(MACRO, ...) \
    MACRO(__VA_ARGS__, u16_copy_yz_xx                          , SWS_PIXEL_U16, SWS_UOP_COPY            , 0x6, 0, 0, 0, 3) \
    MACRO(__VA_ARGS__, u16_copy_yzw_xxy                        , SWS_PIXEL_U16, SWS_UOP_COPY            , 0xe, 0, 0, 0, 1)
#define SWS_FOR_STRUCT_U16_COPY(MACRO, ...) \
    MACRO(__VA_ARGS__, u16_copy_yz_xx                          , .type = SWS_PIXEL_U16, .uop = SWS_UOP_COPY            , .mask = 0x6, .par.swizzle.in = {0, 0, 0, 3}) \
    MACRO(__VA_ARGS__, u16_copy_yzw_xxy                        , .type = SWS_PIXEL_U16, .uop = SWS_UOP_COPY            , .mask = 0xe, .par.swizzle.in = {0, 0, 0, 1})
#define SWS_FOR_U16_MOVE(MACRO, ...) \
    MACRO(__VA_ARGS__, u16_move_x_y                            , SWS_PIXEL_U16, SWS_UOP_MOVE            , 0x0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0) \
    MACRO(__VA_ARGS__, u16_move_x_z                            , SWS_PIXEL_U16, SWS_UOP_MOVE            , 0x0, 1, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0) \
    MACRO(__VA_ARGS__, u16_move_x_w                            , SWS_PIXEL_U16, SWS_UOP_MOVE            , 0x0, 1, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0) \
    MACRO(__VA_ARGS__, u16_move_y_x                            , SWS_PIXEL_U16, SWS_UOP_MOVE            , 0x0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) \
    MACRO(__VA_ARGS__, u16_move_y_w                            , SWS_PIXEL_U16, SWS_UOP_MOVE            , 0x0, 1, 1, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0) \
    MACRO(__VA_ARGS__, u16_move_w_x                            , SWS_PIXEL_U16, SWS_UOP_MOVE            , 0x0, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) \
    MACRO(__VA_ARGS__, u16_move_xz_zw                          , SWS_PIXEL_U16, SWS_UOP_MOVE            , 0x0, 2, 0, 2, 0, 0, 0, 0, 2, 3, 0, 0, 0, 0) \
    MACRO(__VA_ARGS__, u16_move_yx_xw                          , SWS_PIXEL_U16, SWS_UOP_MOVE            , 0x0, 2, 1, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0) \
    MACRO(__VA_ARGS__, u16_move_yz_xx                          , SWS_PIXEL_U16, SWS_UOP_MOVE            , 0x0, 2, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) \
    MACRO(__VA_ARGS__, u16_move_wz_zx                          , SWS_PIXEL_U16, SWS_UOP_MOVE            , 0x0, 2, 3, 2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0) \
    MACRO(__VA_ARGS__, u16_move_xyz_yzw                        , SWS_PIXEL_U16, SWS_UOP_MOVE            , 0x0, 3, 0, 1, 2, 0, 0, 0, 1, 2, 3, 0, 0, 0) \
    MACRO(__VA_ARGS__, u16_move_xzy_zyw                        , SWS_PIXEL_U16, SWS_UOP_MOVE            , 0x0, 3, 0, 2, 1, 0, 0, 0, 2, 1, 3, 0, 0, 0) \
    MACRO(__VA_ARGS__, u16_move_zwy_xyx                        , SWS_PIXEL_U16, SWS_UOP_MOVE            , 0x0, 3, 2, 3, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0) \
    MACRO(__VA_ARGS__, u16_move_wzy_zyx                        , SWS_PIXEL_U16, SWS_UOP_MOVE            , 0x0, 3, 3, 2, 1, 0, 0, 0, 2, 1, 0, 0, 0, 0) \
    MACRO(__VA_ARGS__, u16_move_txy_xyt                        , SWS_PIXEL_U16, SWS_UOP_MOVE            , 0x0, 3, -1, 0, 1, 0, 0, 0, 0, 1, -1, 0, 0, 0) \
    MACRO(__VA_ARGS__, u16_move_txz_xzt                        , SWS_PIXEL_U16, SWS_UOP_MOVE            , 0x0, 3, -1, 0, 2, 0, 0, 0, 0, 2, -1, 0, 0, 0) \
    MACRO(__VA_ARGS__, u16_move_xtyz_wyzt                      , SWS_PIXEL_U16, SWS_UOP_MOVE            , 0x0, 4, 0, -1, 1, 2, 0, 0, 3, 1, 2, -1, 0, 0) \
    MACRO(__VA_ARGS__, u16_move_wtyz_xyzt                      , SWS_PIXEL_U16, SWS_UOP_MOVE            , 0x0, 4, 3, -1, 1, 2, 0, 0, 0, 1, 2, -1, 0, 0) \
    MACRO(__VA_ARGS__, u16_move_txyz_xyzt                      , SWS_PIXEL_U16, SWS_UOP_MOVE            , 0x0, 4, -1, 0, 1, 2, 0, 0, 0, 1, 2, -1, 0, 0) \
    MACRO(__VA_ARGS__, u16_move_txzy_xzyt                      , SWS_PIXEL_U16, SWS_UOP_MOVE            , 0x0, 4, -1, 0, 2, 1, 0, 0, 0, 2, 1, -1, 0, 0) \
    MACRO(__VA_ARGS__, u16_move_tyzw_yzwt                      , SWS_PIXEL_U16, SWS_UOP_MOVE            , 0x0, 4, -1, 1, 2, 3, 0, 0, 1, 2, 3, -1, 0, 0) \
    MACRO(__VA_ARGS__, u16_move_txyzw_xyzwt                    , SWS_PIXEL_U16, SWS_UOP_MOVE            , 0x0, 5, -1, 0, 1, 2, 3, 0, 0, 1, 2, 3, -1, 0) \
    MACRO(__VA_ARGS__, u16_move_txwzy_xwzyt                    , SWS_PIXEL_U16, SWS_UOP_MOVE            , 0x0, 5, -1, 0, 3, 2, 1, 0, 0, 3, 2, 1, -1, 0) \
    MACRO(__VA_ARGS__, u16_move_txwtyz_xwtyzt                  , SWS_PIXEL_U16, SWS_UOP_MOVE            , 0x0, 6, -1, 0, 3, -1, 1, 2, 0, 3, -1, 1, 2, -1)
#define SWS_FOR_STRUCT_U16_MOVE(MACRO, ...) \
    MACRO(__VA_ARGS__, u16_move_x_y                            , .type = SWS_PIXEL_U16, .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 1, .par.move.dst = {0, 0, 0, 0, 0, 0}, .par.move.src = {1, 0, 0, 0, 0, 0}) \
    MACRO(__VA_ARGS__, u16_move_x_z                            , .type = SWS_PIXEL_U16, .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 1, .par.move.dst = {0, 0, 0, 0, 0, 0}, .par.move.src = {2, 0, 0, 0, 0, 0}) \
    MACRO(__VA_ARGS__, u16_move_x_w                            , .type = SWS_PIXEL_U16, .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 1, .par.move.dst = {0, 0, 0, 0, 0, 0}, .par.move.src = {3, 0, 0, 0, 0, 0}) \
    MACRO(__VA_ARGS__, u16_move_y_x                            , .type = SWS_PIXEL_U16, .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 1, .par.move.dst = {1, 0, 0, 0, 0, 0}, .par.move.src = {0, 0, 0, 0, 0, 0}) \
    MACRO(__VA_ARGS__, u16_move_y_w                            , .type = SWS_PIXEL_U16, .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 1, .par.move.dst = {1, 0, 0, 0, 0, 0}, .par.move.src = {3, 0, 0, 0, 0, 0}) \
    MACRO(__VA_ARGS__, u16_move_w_x                            , .type = SWS_PIXEL_U16, .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 1, .par.move.dst = {3, 0, 0, 0, 0, 0}, .par.move.src = {0, 0, 0, 0, 0, 0}) \
    MACRO(__VA_ARGS__, u16_move_xz_zw                          , .type = SWS_PIXEL_U16, .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 2, .par.move.dst = {0, 2, 0, 0, 0, 0}, .par.move.src = {2, 3, 0, 0, 0, 0}) \
    MACRO(__VA_ARGS__, u16_move_yx_xw                          , .type = SWS_PIXEL_U16, .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 2, .par.move.dst = {1, 0, 0, 0, 0, 0}, .par.move.src = {0, 3, 0, 0, 0, 0}) \
    MACRO(__VA_ARGS__, u16_move_yz_xx                          , .type = SWS_PIXEL_U16, .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 2, .par.move.dst = {1, 2, 0, 0, 0, 0}, .par.move.src = {0, 0, 0, 0, 0, 0}) \
    MACRO(__VA_ARGS__, u16_move_wz_zx                          , .type = SWS_PIXEL_U16, .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 2, .par.move.dst = {3, 2, 0, 0, 0, 0}, .par.move.src = {2, 0, 0, 0, 0, 0}) \
    MACRO(__VA_ARGS__, u16_move_xyz_yzw                        , .type = SWS_PIXEL_U16, .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 3, .par.move.dst = {0, 1, 2, 0, 0, 0}, .par.move.src = {1, 2, 3, 0, 0, 0}) \
    MACRO(__VA_ARGS__, u16_move_xzy_zyw                        , .type = SWS_PIXEL_U16, .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 3, .par.move.dst = {0, 2, 1, 0, 0, 0}, .par.move.src = {2, 1, 3, 0, 0, 0}) \
    MACRO(__VA_ARGS__, u16_move_zwy_xyx                        , .type = SWS_PIXEL_U16, .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 3, .par.move.dst = {2, 3, 1, 0, 0, 0}, .par.move.src = {0, 1, 0, 0, 0, 0}) \
    MACRO(__VA_ARGS__, u16_move_wzy_zyx                        , .type = SWS_PIXEL_U16, .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 3, .par.move.dst = {3, 2, 1, 0, 0, 0}, .par.move.src = {2, 1, 0, 0, 0, 0}) \
    MACRO(__VA_ARGS__, u16_move_txy_xyt                        , .type = SWS_PIXEL_U16, .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 3, .par.move.dst = {-1, 0, 1, 0, 0, 0}, .par.move.src = {0, 1, -1, 0, 0, 0}) \
    MACRO(__VA_ARGS__, u16_move_txz_xzt                        , .type = SWS_PIXEL_U16, .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 3, .par.move.dst = {-1, 0, 2, 0, 0, 0}, .par.move.src = {0, 2, -1, 0, 0, 0}) \
    MACRO(__VA_ARGS__, u16_move_xtyz_wyzt                      , .type = SWS_PIXEL_U16, .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 4, .par.move.dst = {0, -1, 1, 2, 0, 0}, .par.move.src = {3, 1, 2, -1, 0, 0}) \
    MACRO(__VA_ARGS__, u16_move_wtyz_xyzt                      , .type = SWS_PIXEL_U16, .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 4, .par.move.dst = {3, -1, 1, 2, 0, 0}, .par.move.src = {0, 1, 2, -1, 0, 0}) \
    MACRO(__VA_ARGS__, u16_move_txyz_xyzt                      , .type = SWS_PIXEL_U16, .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 4, .par.move.dst = {-1, 0, 1, 2, 0, 0}, .par.move.src = {0, 1, 2, -1, 0, 0}) \
    MACRO(__VA_ARGS__, u16_move_txzy_xzyt                      , .type = SWS_PIXEL_U16, .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 4, .par.move.dst = {-1, 0, 2, 1, 0, 0}, .par.move.src = {0, 2, 1, -1, 0, 0}) \
    MACRO(__VA_ARGS__, u16_move_tyzw_yzwt                      , .type = SWS_PIXEL_U16, .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 4, .par.move.dst = {-1, 1, 2, 3, 0, 0}, .par.move.src = {1, 2, 3, -1, 0, 0}) \
    MACRO(__VA_ARGS__, u16_move_txyzw_xyzwt                    , .type = SWS_PIXEL_U16, .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 5, .par.move.dst = {-1, 0, 1, 2, 3, 0}, .par.move.src = {0, 1, 2, 3, -1, 0}) \
    MACRO(__VA_ARGS__, u16_move_txwzy_xwzyt                    , .type = SWS_PIXEL_U16, .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 5, .par.move.dst = {-1, 0, 3, 2, 1, 0}, .par.move.src = {0, 3, 2, 1, -1, 0}) \
    MACRO(__VA_ARGS__, u16_move_txwtyz_xwtyzt                  , .type = SWS_PIXEL_U16, .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 6, .par.move.dst = {-1, 0, 3, -1, 1, 2}, .par.move.src = {0, 3, -1, 1, 2, -1})
#define SWS_FOR_U16_SWAP_BYTES(MACRO, ...) \
    MACRO(__VA_ARGS__, u16_swap_bytes_x                        , SWS_PIXEL_U16, SWS_UOP_SWAP_BYTES      , 0x1) \
    MACRO(__VA_ARGS__, u16_swap_bytes_y                        , SWS_PIXEL_U16, SWS_UOP_SWAP_BYTES      , 0x2) \
    MACRO(__VA_ARGS__, u16_swap_bytes_xy                       , SWS_PIXEL_U16, SWS_UOP_SWAP_BYTES      , 0x3) \
    MACRO(__VA_ARGS__, u16_swap_bytes_xyz                      , SWS_PIXEL_U16, SWS_UOP_SWAP_BYTES      , 0x7) \
    MACRO(__VA_ARGS__, u16_swap_bytes_xw                       , SWS_PIXEL_U16, SWS_UOP_SWAP_BYTES      , 0x9) \
    MACRO(__VA_ARGS__, u16_swap_bytes_yzw                      , SWS_PIXEL_U16, SWS_UOP_SWAP_BYTES      , 0xe) \
    MACRO(__VA_ARGS__, u16_swap_bytes_xyzw                     , SWS_PIXEL_U16, SWS_UOP_SWAP_BYTES      , 0xf)
#define SWS_FOR_STRUCT_U16_SWAP_BYTES(MACRO, ...) \
    MACRO(__VA_ARGS__, u16_swap_bytes_x                        , .type = SWS_PIXEL_U16, .uop = SWS_UOP_SWAP_BYTES      , .mask = 0x1) \
    MACRO(__VA_ARGS__, u16_swap_bytes_y                        , .type = SWS_PIXEL_U16, .uop = SWS_UOP_SWAP_BYTES      , .mask = 0x2) \
    MACRO(__VA_ARGS__, u16_swap_bytes_xy                       , .type = SWS_PIXEL_U16, .uop = SWS_UOP_SWAP_BYTES      , .mask = 0x3) \
    MACRO(__VA_ARGS__, u16_swap_bytes_xyz                      , .type = SWS_PIXEL_U16, .uop = SWS_UOP_SWAP_BYTES      , .mask = 0x7) \
    MACRO(__VA_ARGS__, u16_swap_bytes_xw                       , .type = SWS_PIXEL_U16, .uop = SWS_UOP_SWAP_BYTES      , .mask = 0x9) \
    MACRO(__VA_ARGS__, u16_swap_bytes_yzw                      , .type = SWS_PIXEL_U16, .uop = SWS_UOP_SWAP_BYTES      , .mask = 0xe) \
    MACRO(__VA_ARGS__, u16_swap_bytes_xyzw                     , .type = SWS_PIXEL_U16, .uop = SWS_UOP_SWAP_BYTES      , .mask = 0xf)
#define SWS_FOR_U16_EXPAND_BIT(MACRO, ...) \
    MACRO(__VA_ARGS__, u16_expand_bit_x                        , SWS_PIXEL_U16, SWS_UOP_EXPAND_BIT      , 0x1)
#define SWS_FOR_STRUCT_U16_EXPAND_BIT(MACRO, ...) \
    MACRO(__VA_ARGS__, u16_expand_bit_x                        , .type = SWS_PIXEL_U16, .uop = SWS_UOP_EXPAND_BIT      , .mask = 0x1)
#define SWS_FOR_U16_EXPAND_PAIR(MACRO, ...)
#define SWS_FOR_STRUCT_U16_EXPAND_PAIR(MACRO, ...)
#define SWS_FOR_U16_EXPAND_QUAD(MACRO, ...)
#define SWS_FOR_STRUCT_U16_EXPAND_QUAD(MACRO, ...)
#define SWS_FOR_U16_TO_U8(MACRO, ...) \
    MACRO(__VA_ARGS__, u16_to_u8_xyz                           , SWS_PIXEL_U16, SWS_UOP_TO_U8           , 0x7)
#define SWS_FOR_STRUCT_U16_TO_U8(MACRO, ...) \
    MACRO(__VA_ARGS__, u16_to_u8_xyz                           , .type = SWS_PIXEL_U16, .uop = SWS_UOP_TO_U8           , .mask = 0x7)
#define SWS_FOR_U16_TO_U16(MACRO, ...)
#define SWS_FOR_STRUCT_U16_TO_U16(MACRO, ...)
#define SWS_FOR_U16_TO_U32(MACRO, ...) \
    MACRO(__VA_ARGS__, u16_to_u32_x                            , SWS_PIXEL_U16, SWS_UOP_TO_U32          , 0x1) \
    MACRO(__VA_ARGS__, u16_to_u32_xyz                          , SWS_PIXEL_U16, SWS_UOP_TO_U32          , 0x7)
#define SWS_FOR_STRUCT_U16_TO_U32(MACRO, ...) \
    MACRO(__VA_ARGS__, u16_to_u32_x                            , .type = SWS_PIXEL_U16, .uop = SWS_UOP_TO_U32          , .mask = 0x1) \
    MACRO(__VA_ARGS__, u16_to_u32_xyz                          , .type = SWS_PIXEL_U16, .uop = SWS_UOP_TO_U32          , .mask = 0x7)
#define SWS_FOR_U16_TO_F32(MACRO, ...) \
    MACRO(__VA_ARGS__, u16_to_f32_x                            , SWS_PIXEL_U16, SWS_UOP_TO_F32          , 0x1) \
    MACRO(__VA_ARGS__, u16_to_f32_y                            , SWS_PIXEL_U16, SWS_UOP_TO_F32          , 0x2) \
    MACRO(__VA_ARGS__, u16_to_f32_xy                           , SWS_PIXEL_U16, SWS_UOP_TO_F32          , 0x3) \
    MACRO(__VA_ARGS__, u16_to_f32_xyz                          , SWS_PIXEL_U16, SWS_UOP_TO_F32          , 0x7) \
    MACRO(__VA_ARGS__, u16_to_f32_yzw                          , SWS_PIXEL_U16, SWS_UOP_TO_F32          , 0xe) \
    MACRO(__VA_ARGS__, u16_to_f32_xyzw                         , SWS_PIXEL_U16, SWS_UOP_TO_F32          , 0xf)
#define SWS_FOR_STRUCT_U16_TO_F32(MACRO, ...) \
    MACRO(__VA_ARGS__, u16_to_f32_x                            , .type = SWS_PIXEL_U16, .uop = SWS_UOP_TO_F32          , .mask = 0x1) \
    MACRO(__VA_ARGS__, u16_to_f32_y                            , .type = SWS_PIXEL_U16, .uop = SWS_UOP_TO_F32          , .mask = 0x2) \
    MACRO(__VA_ARGS__, u16_to_f32_xy                           , .type = SWS_PIXEL_U16, .uop = SWS_UOP_TO_F32          , .mask = 0x3) \
    MACRO(__VA_ARGS__, u16_to_f32_xyz                          , .type = SWS_PIXEL_U16, .uop = SWS_UOP_TO_F32          , .mask = 0x7) \
    MACRO(__VA_ARGS__, u16_to_f32_yzw                          , .type = SWS_PIXEL_U16, .uop = SWS_UOP_TO_F32          , .mask = 0xe) \
    MACRO(__VA_ARGS__, u16_to_f32_xyzw                         , .type = SWS_PIXEL_U16, .uop = SWS_UOP_TO_F32          , .mask = 0xf)
#define SWS_FOR_U16_SCALE(MACRO, ...) \
    MACRO(__VA_ARGS__, u16_scale_x                             , SWS_PIXEL_U16, SWS_UOP_SCALE           , 0x1) \
    MACRO(__VA_ARGS__, u16_scale_xyz                           , SWS_PIXEL_U16, SWS_UOP_SCALE           , 0x7)
#define SWS_FOR_STRUCT_U16_SCALE(MACRO, ...) \
    MACRO(__VA_ARGS__, u16_scale_x                             , .type = SWS_PIXEL_U16, .uop = SWS_UOP_SCALE           , .mask = 0x1) \
    MACRO(__VA_ARGS__, u16_scale_xyz                           , .type = SWS_PIXEL_U16, .uop = SWS_UOP_SCALE           , .mask = 0x7)
#define SWS_FOR_U16_ADD(MACRO, ...)
#define SWS_FOR_STRUCT_U16_ADD(MACRO, ...)
#define SWS_FOR_U16_MIN(MACRO, ...)
#define SWS_FOR_STRUCT_U16_MIN(MACRO, ...)
#define SWS_FOR_U16_MAX(MACRO, ...)
#define SWS_FOR_STRUCT_U16_MAX(MACRO, ...)
#define SWS_FOR_U16_UNPACK(MACRO, ...) \
    MACRO(__VA_ARGS__, u16_unpack_xyz_444                      , SWS_PIXEL_U16, SWS_UOP_UNPACK          , 0x7, 4, 4, 4, 0) \
    MACRO(__VA_ARGS__, u16_unpack_xyz_555                      , SWS_PIXEL_U16, SWS_UOP_UNPACK          , 0x7, 5, 5, 5, 0) \
    MACRO(__VA_ARGS__, u16_unpack_xyz_565                      , SWS_PIXEL_U16, SWS_UOP_UNPACK          , 0x7, 5, 6, 5, 0)
#define SWS_FOR_STRUCT_U16_UNPACK(MACRO, ...) \
    MACRO(__VA_ARGS__, u16_unpack_xyz_444                      , .type = SWS_PIXEL_U16, .uop = SWS_UOP_UNPACK          , .mask = 0x7, .par.pack.pattern = {4, 4, 4, 0}) \
    MACRO(__VA_ARGS__, u16_unpack_xyz_555                      , .type = SWS_PIXEL_U16, .uop = SWS_UOP_UNPACK          , .mask = 0x7, .par.pack.pattern = {5, 5, 5, 0}) \
    MACRO(__VA_ARGS__, u16_unpack_xyz_565                      , .type = SWS_PIXEL_U16, .uop = SWS_UOP_UNPACK          , .mask = 0x7, .par.pack.pattern = {5, 6, 5, 0})
#define SWS_FOR_U16_PACK(MACRO, ...) \
    MACRO(__VA_ARGS__, u16_pack_xyz_444                        , SWS_PIXEL_U16, SWS_UOP_PACK            , 0x7, 4, 4, 4, 0) \
    MACRO(__VA_ARGS__, u16_pack_xyz_555                        , SWS_PIXEL_U16, SWS_UOP_PACK            , 0x7, 5, 5, 5, 0) \
    MACRO(__VA_ARGS__, u16_pack_xyz_565                        , SWS_PIXEL_U16, SWS_UOP_PACK            , 0x7, 5, 6, 5, 0)
#define SWS_FOR_STRUCT_U16_PACK(MACRO, ...) \
    MACRO(__VA_ARGS__, u16_pack_xyz_444                        , .type = SWS_PIXEL_U16, .uop = SWS_UOP_PACK            , .mask = 0x7, .par.pack.pattern = {4, 4, 4, 0}) \
    MACRO(__VA_ARGS__, u16_pack_xyz_555                        , .type = SWS_PIXEL_U16, .uop = SWS_UOP_PACK            , .mask = 0x7, .par.pack.pattern = {5, 5, 5, 0}) \
    MACRO(__VA_ARGS__, u16_pack_xyz_565                        , .type = SWS_PIXEL_U16, .uop = SWS_UOP_PACK            , .mask = 0x7, .par.pack.pattern = {5, 6, 5, 0})
#define SWS_FOR_U16_LSHIFT(MACRO, ...) \
    MACRO(__VA_ARGS__, u16_lshift_x_4                          , SWS_PIXEL_U16, SWS_UOP_LSHIFT          , 0x1, 4) \
    MACRO(__VA_ARGS__, u16_lshift_x_6                          , SWS_PIXEL_U16, SWS_UOP_LSHIFT          , 0x1, 6) \
    MACRO(__VA_ARGS__, u16_lshift_xyz_1                        , SWS_PIXEL_U16, SWS_UOP_LSHIFT          , 0x7, 1) \
    MACRO(__VA_ARGS__, u16_lshift_xyz_2                        , SWS_PIXEL_U16, SWS_UOP_LSHIFT          , 0x7, 2) \
    MACRO(__VA_ARGS__, u16_lshift_xyz_3                        , SWS_PIXEL_U16, SWS_UOP_LSHIFT          , 0x7, 3) \
    MACRO(__VA_ARGS__, u16_lshift_xyz_4                        , SWS_PIXEL_U16, SWS_UOP_LSHIFT          , 0x7, 4) \
    MACRO(__VA_ARGS__, u16_lshift_xyz_5                        , SWS_PIXEL_U16, SWS_UOP_LSHIFT          , 0x7, 5) \
    MACRO(__VA_ARGS__, u16_lshift_xyz_6                        , SWS_PIXEL_U16, SWS_UOP_LSHIFT          , 0x7, 6) \
    MACRO(__VA_ARGS__, u16_lshift_xyz_7                        , SWS_PIXEL_U16, SWS_UOP_LSHIFT          , 0x7, 7) \
    MACRO(__VA_ARGS__, u16_lshift_xyz_8                        , SWS_PIXEL_U16, SWS_UOP_LSHIFT          , 0x7, 8) \
    MACRO(__VA_ARGS__, u16_lshift_yzw_1                        , SWS_PIXEL_U16, SWS_UOP_LSHIFT          , 0xe, 1) \
    MACRO(__VA_ARGS__, u16_lshift_yzw_2                        , SWS_PIXEL_U16, SWS_UOP_LSHIFT          , 0xe, 2) \
    MACRO(__VA_ARGS__, u16_lshift_yzw_4                        , SWS_PIXEL_U16, SWS_UOP_LSHIFT          , 0xe, 4) \
    MACRO(__VA_ARGS__, u16_lshift_yzw_6                        , SWS_PIXEL_U16, SWS_UOP_LSHIFT          , 0xe, 6) \
    MACRO(__VA_ARGS__, u16_lshift_yzw_8                        , SWS_PIXEL_U16, SWS_UOP_LSHIFT          , 0xe, 8)
#define SWS_FOR_STRUCT_U16_LSHIFT(MACRO, ...) \
    MACRO(__VA_ARGS__, u16_lshift_x_4                          , .type = SWS_PIXEL_U16, .uop = SWS_UOP_LSHIFT          , .mask = 0x1, .par.shift.amount = 4) \
    MACRO(__VA_ARGS__, u16_lshift_x_6                          , .type = SWS_PIXEL_U16, .uop = SWS_UOP_LSHIFT          , .mask = 0x1, .par.shift.amount = 6) \
    MACRO(__VA_ARGS__, u16_lshift_xyz_1                        , .type = SWS_PIXEL_U16, .uop = SWS_UOP_LSHIFT          , .mask = 0x7, .par.shift.amount = 1) \
    MACRO(__VA_ARGS__, u16_lshift_xyz_2                        , .type = SWS_PIXEL_U16, .uop = SWS_UOP_LSHIFT          , .mask = 0x7, .par.shift.amount = 2) \
    MACRO(__VA_ARGS__, u16_lshift_xyz_3                        , .type = SWS_PIXEL_U16, .uop = SWS_UOP_LSHIFT          , .mask = 0x7, .par.shift.amount = 3) \
    MACRO(__VA_ARGS__, u16_lshift_xyz_4                        , .type = SWS_PIXEL_U16, .uop = SWS_UOP_LSHIFT          , .mask = 0x7, .par.shift.amount = 4) \
    MACRO(__VA_ARGS__, u16_lshift_xyz_5                        , .type = SWS_PIXEL_U16, .uop = SWS_UOP_LSHIFT          , .mask = 0x7, .par.shift.amount = 5) \
    MACRO(__VA_ARGS__, u16_lshift_xyz_6                        , .type = SWS_PIXEL_U16, .uop = SWS_UOP_LSHIFT          , .mask = 0x7, .par.shift.amount = 6) \
    MACRO(__VA_ARGS__, u16_lshift_xyz_7                        , .type = SWS_PIXEL_U16, .uop = SWS_UOP_LSHIFT          , .mask = 0x7, .par.shift.amount = 7) \
    MACRO(__VA_ARGS__, u16_lshift_xyz_8                        , .type = SWS_PIXEL_U16, .uop = SWS_UOP_LSHIFT          , .mask = 0x7, .par.shift.amount = 8) \
    MACRO(__VA_ARGS__, u16_lshift_yzw_1                        , .type = SWS_PIXEL_U16, .uop = SWS_UOP_LSHIFT          , .mask = 0xe, .par.shift.amount = 1) \
    MACRO(__VA_ARGS__, u16_lshift_yzw_2                        , .type = SWS_PIXEL_U16, .uop = SWS_UOP_LSHIFT          , .mask = 0xe, .par.shift.amount = 2) \
    MACRO(__VA_ARGS__, u16_lshift_yzw_4                        , .type = SWS_PIXEL_U16, .uop = SWS_UOP_LSHIFT          , .mask = 0xe, .par.shift.amount = 4) \
    MACRO(__VA_ARGS__, u16_lshift_yzw_6                        , .type = SWS_PIXEL_U16, .uop = SWS_UOP_LSHIFT          , .mask = 0xe, .par.shift.amount = 6) \
    MACRO(__VA_ARGS__, u16_lshift_yzw_8                        , .type = SWS_PIXEL_U16, .uop = SWS_UOP_LSHIFT          , .mask = 0xe, .par.shift.amount = 8)
#define SWS_FOR_U16_RSHIFT(MACRO, ...) \
    MACRO(__VA_ARGS__, u16_rshift_x_4                          , SWS_PIXEL_U16, SWS_UOP_RSHIFT          , 0x1, 4) \
    MACRO(__VA_ARGS__, u16_rshift_x_6                          , SWS_PIXEL_U16, SWS_UOP_RSHIFT          , 0x1, 6) \
    MACRO(__VA_ARGS__, u16_rshift_y_4                          , SWS_PIXEL_U16, SWS_UOP_RSHIFT          , 0x2, 4) \
    MACRO(__VA_ARGS__, u16_rshift_xyz_4                        , SWS_PIXEL_U16, SWS_UOP_RSHIFT          , 0x7, 4) \
    MACRO(__VA_ARGS__, u16_rshift_xyz_6                        , SWS_PIXEL_U16, SWS_UOP_RSHIFT          , 0x7, 6)
#define SWS_FOR_STRUCT_U16_RSHIFT(MACRO, ...) \
    MACRO(__VA_ARGS__, u16_rshift_x_4                          , .type = SWS_PIXEL_U16, .uop = SWS_UOP_RSHIFT          , .mask = 0x1, .par.shift.amount = 4) \
    MACRO(__VA_ARGS__, u16_rshift_x_6                          , .type = SWS_PIXEL_U16, .uop = SWS_UOP_RSHIFT          , .mask = 0x1, .par.shift.amount = 6) \
    MACRO(__VA_ARGS__, u16_rshift_y_4                          , .type = SWS_PIXEL_U16, .uop = SWS_UOP_RSHIFT          , .mask = 0x2, .par.shift.amount = 4) \
    MACRO(__VA_ARGS__, u16_rshift_xyz_4                        , .type = SWS_PIXEL_U16, .uop = SWS_UOP_RSHIFT          , .mask = 0x7, .par.shift.amount = 4) \
    MACRO(__VA_ARGS__, u16_rshift_xyz_6                        , .type = SWS_PIXEL_U16, .uop = SWS_UOP_RSHIFT          , .mask = 0x7, .par.shift.amount = 6)
#define SWS_FOR_U16_CLEAR(MACRO, ...) \
    MACRO(__VA_ARGS__, u16_clear_x_1                           , SWS_PIXEL_U16, SWS_UOP_CLEAR           , 0x1, 0x00001, 0x00000) \
    MACRO(__VA_ARGS__, u16_clear_y_1                           , SWS_PIXEL_U16, SWS_UOP_CLEAR           , 0x2, 0x00002, 0x00000) \
    MACRO(__VA_ARGS__, u16_clear_yz_xx                         , SWS_PIXEL_U16, SWS_UOP_CLEAR           , 0x6, 0x00000, 0x00000) \
    MACRO(__VA_ARGS__, u16_clear_w_x                           , SWS_PIXEL_U16, SWS_UOP_CLEAR           , 0x8, 0x00000, 0x00000) \
    MACRO(__VA_ARGS__, u16_clear_w_0                           , SWS_PIXEL_U16, SWS_UOP_CLEAR           , 0x8, 0x00000, 0x00008) \
    MACRO(__VA_ARGS__, u16_clear_w_1                           , SWS_PIXEL_U16, SWS_UOP_CLEAR           , 0x8, 0x00008, 0x00000) \
    MACRO(__VA_ARGS__, u16_clear_zw_xx                         , SWS_PIXEL_U16, SWS_UOP_CLEAR           , 0xc, 0x00000, 0x00000) \
    MACRO(__VA_ARGS__, u16_clear_xzw_xx0                       , SWS_PIXEL_U16, SWS_UOP_CLEAR           , 0xd, 0x00000, 0x00008) \
    MACRO(__VA_ARGS__, u16_clear_xzw_1xx                       , SWS_PIXEL_U16, SWS_UOP_CLEAR           , 0xd, 0x00001, 0x00000) \
    MACRO(__VA_ARGS__, u16_clear_yzw_xxx                       , SWS_PIXEL_U16, SWS_UOP_CLEAR           , 0xe, 0x00000, 0x00000) \
    MACRO(__VA_ARGS__, u16_clear_yzw_xx1                       , SWS_PIXEL_U16, SWS_UOP_CLEAR           , 0xe, 0x00008, 0x00000)
#define SWS_FOR_STRUCT_U16_CLEAR(MACRO, ...) \
    MACRO(__VA_ARGS__, u16_clear_x_1                           , .type = SWS_PIXEL_U16, .uop = SWS_UOP_CLEAR           , .mask = 0x1, .par.clear.one = 0x1, .par.clear.zero = 0x0) \
    MACRO(__VA_ARGS__, u16_clear_y_1                           , .type = SWS_PIXEL_U16, .uop = SWS_UOP_CLEAR           , .mask = 0x2, .par.clear.one = 0x2, .par.clear.zero = 0x0) \
    MACRO(__VA_ARGS__, u16_clear_yz_xx                         , .type = SWS_PIXEL_U16, .uop = SWS_UOP_CLEAR           , .mask = 0x6, .par.clear.one = 0x0, .par.clear.zero = 0x0) \
    MACRO(__VA_ARGS__, u16_clear_w_x                           , .type = SWS_PIXEL_U16, .uop = SWS_UOP_CLEAR           , .mask = 0x8, .par.clear.one = 0x0, .par.clear.zero = 0x0) \
    MACRO(__VA_ARGS__, u16_clear_w_0                           , .type = SWS_PIXEL_U16, .uop = SWS_UOP_CLEAR           , .mask = 0x8, .par.clear.one = 0x0, .par.clear.zero = 0x8) \
    MACRO(__VA_ARGS__, u16_clear_w_1                           , .type = SWS_PIXEL_U16, .uop = SWS_UOP_CLEAR           , .mask = 0x8, .par.clear.one = 0x8, .par.clear.zero = 0x0) \
    MACRO(__VA_ARGS__, u16_clear_zw_xx                         , .type = SWS_PIXEL_U16, .uop = SWS_UOP_CLEAR           , .mask = 0xc, .par.clear.one = 0x0, .par.clear.zero = 0x0) \
    MACRO(__VA_ARGS__, u16_clear_xzw_xx0                       , .type = SWS_PIXEL_U16, .uop = SWS_UOP_CLEAR           , .mask = 0xd, .par.clear.one = 0x0, .par.clear.zero = 0x8) \
    MACRO(__VA_ARGS__, u16_clear_xzw_1xx                       , .type = SWS_PIXEL_U16, .uop = SWS_UOP_CLEAR           , .mask = 0xd, .par.clear.one = 0x1, .par.clear.zero = 0x0) \
    MACRO(__VA_ARGS__, u16_clear_yzw_xxx                       , .type = SWS_PIXEL_U16, .uop = SWS_UOP_CLEAR           , .mask = 0xe, .par.clear.one = 0x0, .par.clear.zero = 0x0) \
    MACRO(__VA_ARGS__, u16_clear_yzw_xx1                       , .type = SWS_PIXEL_U16, .uop = SWS_UOP_CLEAR           , .mask = 0xe, .par.clear.one = 0x8, .par.clear.zero = 0x0)
#define SWS_FOR_U16_LINEAR(MACRO, ...)
#define SWS_FOR_STRUCT_U16_LINEAR(MACRO, ...)
#define SWS_FOR_U16_LINEAR_FMA(MACRO, ...)
#define SWS_FOR_STRUCT_U16_LINEAR_FMA(MACRO, ...)
#define SWS_FOR_U16_DITHER(MACRO, ...)
#define SWS_FOR_STRUCT_U16_DITHER(MACRO, ...)
#define SWS_FOR_U32_READ_PLANAR(MACRO, ...) \
    MACRO(__VA_ARGS__, u32_read_planar_x                       , SWS_PIXEL_U32, SWS_UOP_READ_PLANAR     , 0x1) \
    MACRO(__VA_ARGS__, u32_read_planar_xy                      , SWS_PIXEL_U32, SWS_UOP_READ_PLANAR     , 0x3) \
    MACRO(__VA_ARGS__, u32_read_planar_xyz                     , SWS_PIXEL_U32, SWS_UOP_READ_PLANAR     , 0x7) \
    MACRO(__VA_ARGS__, u32_read_planar_xyzw                    , SWS_PIXEL_U32, SWS_UOP_READ_PLANAR     , 0xf)
#define SWS_FOR_STRUCT_U32_READ_PLANAR(MACRO, ...) \
    MACRO(__VA_ARGS__, u32_read_planar_x                       , .type = SWS_PIXEL_U32, .uop = SWS_UOP_READ_PLANAR     , .mask = 0x1) \
    MACRO(__VA_ARGS__, u32_read_planar_xy                      , .type = SWS_PIXEL_U32, .uop = SWS_UOP_READ_PLANAR     , .mask = 0x3) \
    MACRO(__VA_ARGS__, u32_read_planar_xyz                     , .type = SWS_PIXEL_U32, .uop = SWS_UOP_READ_PLANAR     , .mask = 0x7) \
    MACRO(__VA_ARGS__, u32_read_planar_xyzw                    , .type = SWS_PIXEL_U32, .uop = SWS_UOP_READ_PLANAR     , .mask = 0xf)
#define SWS_FOR_U32_READ_PLANAR_FH(MACRO, ...)
#define SWS_FOR_STRUCT_U32_READ_PLANAR_FH(MACRO, ...)
#define SWS_FOR_U32_READ_PLANAR_FV(MACRO, ...)
#define SWS_FOR_STRUCT_U32_READ_PLANAR_FV(MACRO, ...)
#define SWS_FOR_U32_READ_PLANAR_FV_FMA(MACRO, ...)
#define SWS_FOR_STRUCT_U32_READ_PLANAR_FV_FMA(MACRO, ...)
#define SWS_FOR_U32_READ_PACKED(MACRO, ...) \
    MACRO(__VA_ARGS__, u32_read_packed_xy                      , SWS_PIXEL_U32, SWS_UOP_READ_PACKED     , 0x3) \
    MACRO(__VA_ARGS__, u32_read_packed_xyz                     , SWS_PIXEL_U32, SWS_UOP_READ_PACKED     , 0x7) \
    MACRO(__VA_ARGS__, u32_read_packed_xyzw                    , SWS_PIXEL_U32, SWS_UOP_READ_PACKED     , 0xf)
#define SWS_FOR_STRUCT_U32_READ_PACKED(MACRO, ...) \
    MACRO(__VA_ARGS__, u32_read_packed_xy                      , .type = SWS_PIXEL_U32, .uop = SWS_UOP_READ_PACKED     , .mask = 0x3) \
    MACRO(__VA_ARGS__, u32_read_packed_xyz                     , .type = SWS_PIXEL_U32, .uop = SWS_UOP_READ_PACKED     , .mask = 0x7) \
    MACRO(__VA_ARGS__, u32_read_packed_xyzw                    , .type = SWS_PIXEL_U32, .uop = SWS_UOP_READ_PACKED     , .mask = 0xf)
#define SWS_FOR_U32_READ_NIBBLE(MACRO, ...)
#define SWS_FOR_STRUCT_U32_READ_NIBBLE(MACRO, ...)
#define SWS_FOR_U32_READ_BIT(MACRO, ...)
#define SWS_FOR_STRUCT_U32_READ_BIT(MACRO, ...)
#define SWS_FOR_U32_WRITE_PLANAR(MACRO, ...) \
    MACRO(__VA_ARGS__, u32_write_planar_x                      , SWS_PIXEL_U32, SWS_UOP_WRITE_PLANAR    , 0x1) \
    MACRO(__VA_ARGS__, u32_write_planar_xy                     , SWS_PIXEL_U32, SWS_UOP_WRITE_PLANAR    , 0x3) \
    MACRO(__VA_ARGS__, u32_write_planar_xyz                    , SWS_PIXEL_U32, SWS_UOP_WRITE_PLANAR    , 0x7) \
    MACRO(__VA_ARGS__, u32_write_planar_xyzw                   , SWS_PIXEL_U32, SWS_UOP_WRITE_PLANAR    , 0xf)
#define SWS_FOR_STRUCT_U32_WRITE_PLANAR(MACRO, ...) \
    MACRO(__VA_ARGS__, u32_write_planar_x                      , .type = SWS_PIXEL_U32, .uop = SWS_UOP_WRITE_PLANAR    , .mask = 0x1) \
    MACRO(__VA_ARGS__, u32_write_planar_xy                     , .type = SWS_PIXEL_U32, .uop = SWS_UOP_WRITE_PLANAR    , .mask = 0x3) \
    MACRO(__VA_ARGS__, u32_write_planar_xyz                    , .type = SWS_PIXEL_U32, .uop = SWS_UOP_WRITE_PLANAR    , .mask = 0x7) \
    MACRO(__VA_ARGS__, u32_write_planar_xyzw                   , .type = SWS_PIXEL_U32, .uop = SWS_UOP_WRITE_PLANAR    , .mask = 0xf)
#define SWS_FOR_U32_WRITE_PACKED(MACRO, ...) \
    MACRO(__VA_ARGS__, u32_write_packed_xy                     , SWS_PIXEL_U32, SWS_UOP_WRITE_PACKED    , 0x3) \
    MACRO(__VA_ARGS__, u32_write_packed_xyz                    , SWS_PIXEL_U32, SWS_UOP_WRITE_PACKED    , 0x7) \
    MACRO(__VA_ARGS__, u32_write_packed_xyzw                   , SWS_PIXEL_U32, SWS_UOP_WRITE_PACKED    , 0xf)
#define SWS_FOR_STRUCT_U32_WRITE_PACKED(MACRO, ...) \
    MACRO(__VA_ARGS__, u32_write_packed_xy                     , .type = SWS_PIXEL_U32, .uop = SWS_UOP_WRITE_PACKED    , .mask = 0x3) \
    MACRO(__VA_ARGS__, u32_write_packed_xyz                    , .type = SWS_PIXEL_U32, .uop = SWS_UOP_WRITE_PACKED    , .mask = 0x7) \
    MACRO(__VA_ARGS__, u32_write_packed_xyzw                   , .type = SWS_PIXEL_U32, .uop = SWS_UOP_WRITE_PACKED    , .mask = 0xf)
#define SWS_FOR_U32_WRITE_NIBBLE(MACRO, ...)
#define SWS_FOR_STRUCT_U32_WRITE_NIBBLE(MACRO, ...)
#define SWS_FOR_U32_WRITE_BIT(MACRO, ...)
#define SWS_FOR_STRUCT_U32_WRITE_BIT(MACRO, ...)
#define SWS_FOR_U32_PERMUTE(MACRO, ...) \
    MACRO(__VA_ARGS__, u32_permute_x_y                         , SWS_PIXEL_U32, SWS_UOP_PERMUTE         , 0x1, 1, 0, 2, 3) \
    MACRO(__VA_ARGS__, u32_permute_x_z                         , SWS_PIXEL_U32, SWS_UOP_PERMUTE         , 0x1, 2, 1, 0, 3) \
    MACRO(__VA_ARGS__, u32_permute_x_w                         , SWS_PIXEL_U32, SWS_UOP_PERMUTE         , 0x1, 3, 1, 2, 0) \
    MACRO(__VA_ARGS__, u32_permute_y_w                         , SWS_PIXEL_U32, SWS_UOP_PERMUTE         , 0x2, 0, 3, 2, 1) \
    MACRO(__VA_ARGS__, u32_permute_y_x                         , SWS_PIXEL_U32, SWS_UOP_PERMUTE         , 0x2, 1, 0, 2, 3) \
    MACRO(__VA_ARGS__, u32_permute_xy_yx                       , SWS_PIXEL_U32, SWS_UOP_PERMUTE         , 0x3, 1, 0, 2, 3) \
    MACRO(__VA_ARGS__, u32_permute_z_x                         , SWS_PIXEL_U32, SWS_UOP_PERMUTE         , 0x4, 1, 2, 0, 3) \
    MACRO(__VA_ARGS__, u32_permute_xz_zx                       , SWS_PIXEL_U32, SWS_UOP_PERMUTE         , 0x5, 2, 1, 0, 3) \
    MACRO(__VA_ARGS__, u32_permute_xz_zw                       , SWS_PIXEL_U32, SWS_UOP_PERMUTE         , 0x5, 2, 1, 3, 0) \
    MACRO(__VA_ARGS__, u32_permute_xz_wx                       , SWS_PIXEL_U32, SWS_UOP_PERMUTE         , 0x5, 3, 1, 0, 2) \
    MACRO(__VA_ARGS__, u32_permute_yz_zy                       , SWS_PIXEL_U32, SWS_UOP_PERMUTE         , 0x6, 0, 2, 1, 3) \
    MACRO(__VA_ARGS__, u32_permute_xyz_yzx                     , SWS_PIXEL_U32, SWS_UOP_PERMUTE         , 0x7, 1, 2, 0, 3) \
    MACRO(__VA_ARGS__, u32_permute_xyz_yzw                     , SWS_PIXEL_U32, SWS_UOP_PERMUTE         , 0x7, 1, 2, 3, 0) \
    MACRO(__VA_ARGS__, u32_permute_xyz_zxy                     , SWS_PIXEL_U32, SWS_UOP_PERMUTE         , 0x7, 2, 0, 1, 3) \
    MACRO(__VA_ARGS__, u32_permute_xyz_zwy                     , SWS_PIXEL_U32, SWS_UOP_PERMUTE         , 0x7, 2, 3, 1, 0) \
    MACRO(__VA_ARGS__, u32_permute_xyz_wzy                     , SWS_PIXEL_U32, SWS_UOP_PERMUTE         , 0x7, 3, 2, 1, 0) \
    MACRO(__VA_ARGS__, u32_permute_w_y                         , SWS_PIXEL_U32, SWS_UOP_PERMUTE         , 0x8, 0, 2, 3, 1) \
    MACRO(__VA_ARGS__, u32_permute_w_x                         , SWS_PIXEL_U32, SWS_UOP_PERMUTE         , 0x8, 3, 1, 2, 0) \
    MACRO(__VA_ARGS__, u32_permute_xw_yx                       , SWS_PIXEL_U32, SWS_UOP_PERMUTE         , 0x9, 1, 2, 3, 0) \
    MACRO(__VA_ARGS__, u32_permute_yw_wy                       , SWS_PIXEL_U32, SWS_UOP_PERMUTE         , 0xa, 0, 3, 2, 1) \
    MACRO(__VA_ARGS__, u32_permute_yw_xy                       , SWS_PIXEL_U32, SWS_UOP_PERMUTE         , 0xa, 3, 0, 2, 1) \
    MACRO(__VA_ARGS__, u32_permute_zw_xz                       , SWS_PIXEL_U32, SWS_UOP_PERMUTE         , 0xc, 3, 1, 0, 2) \
    MACRO(__VA_ARGS__, u32_permute_yzw_xyz                     , SWS_PIXEL_U32, SWS_UOP_PERMUTE         , 0xe, 3, 0, 1, 2) \
    MACRO(__VA_ARGS__, u32_permute_yzw_zxy                     , SWS_PIXEL_U32, SWS_UOP_PERMUTE         , 0xe, 3, 2, 0, 1) \
    MACRO(__VA_ARGS__, u32_permute_yzw_zyx                     , SWS_PIXEL_U32, SWS_UOP_PERMUTE         , 0xe, 3, 2, 1, 0) \
    MACRO(__VA_ARGS__, u32_permute_xyzw_yzwx                   , SWS_PIXEL_U32, SWS_UOP_PERMUTE         , 0xf, 1, 2, 3, 0) \
    MACRO(__VA_ARGS__, u32_permute_xyzw_wxyz                   , SWS_PIXEL_U32, SWS_UOP_PERMUTE         , 0xf, 3, 0, 1, 2) \
    MACRO(__VA_ARGS__, u32_permute_xyzw_wzxy                   , SWS_PIXEL_U32, SWS_UOP_PERMUTE         , 0xf, 3, 2, 0, 1) \
    MACRO(__VA_ARGS__, u32_permute_xyzw_wzyx                   , SWS_PIXEL_U32, SWS_UOP_PERMUTE         , 0xf, 3, 2, 1, 0)
#define SWS_FOR_STRUCT_U32_PERMUTE(MACRO, ...) \
    MACRO(__VA_ARGS__, u32_permute_x_y                         , .type = SWS_PIXEL_U32, .uop = SWS_UOP_PERMUTE         , .mask = 0x1, .par.swizzle.in = {1, 0, 2, 3}) \
    MACRO(__VA_ARGS__, u32_permute_x_z                         , .type = SWS_PIXEL_U32, .uop = SWS_UOP_PERMUTE         , .mask = 0x1, .par.swizzle.in = {2, 1, 0, 3}) \
    MACRO(__VA_ARGS__, u32_permute_x_w                         , .type = SWS_PIXEL_U32, .uop = SWS_UOP_PERMUTE         , .mask = 0x1, .par.swizzle.in = {3, 1, 2, 0}) \
    MACRO(__VA_ARGS__, u32_permute_y_w                         , .type = SWS_PIXEL_U32, .uop = SWS_UOP_PERMUTE         , .mask = 0x2, .par.swizzle.in = {0, 3, 2, 1}) \
    MACRO(__VA_ARGS__, u32_permute_y_x                         , .type = SWS_PIXEL_U32, .uop = SWS_UOP_PERMUTE         , .mask = 0x2, .par.swizzle.in = {1, 0, 2, 3}) \
    MACRO(__VA_ARGS__, u32_permute_xy_yx                       , .type = SWS_PIXEL_U32, .uop = SWS_UOP_PERMUTE         , .mask = 0x3, .par.swizzle.in = {1, 0, 2, 3}) \
    MACRO(__VA_ARGS__, u32_permute_z_x                         , .type = SWS_PIXEL_U32, .uop = SWS_UOP_PERMUTE         , .mask = 0x4, .par.swizzle.in = {1, 2, 0, 3}) \
    MACRO(__VA_ARGS__, u32_permute_xz_zx                       , .type = SWS_PIXEL_U32, .uop = SWS_UOP_PERMUTE         , .mask = 0x5, .par.swizzle.in = {2, 1, 0, 3}) \
    MACRO(__VA_ARGS__, u32_permute_xz_zw                       , .type = SWS_PIXEL_U32, .uop = SWS_UOP_PERMUTE         , .mask = 0x5, .par.swizzle.in = {2, 1, 3, 0}) \
    MACRO(__VA_ARGS__, u32_permute_xz_wx                       , .type = SWS_PIXEL_U32, .uop = SWS_UOP_PERMUTE         , .mask = 0x5, .par.swizzle.in = {3, 1, 0, 2}) \
    MACRO(__VA_ARGS__, u32_permute_yz_zy                       , .type = SWS_PIXEL_U32, .uop = SWS_UOP_PERMUTE         , .mask = 0x6, .par.swizzle.in = {0, 2, 1, 3}) \
    MACRO(__VA_ARGS__, u32_permute_xyz_yzx                     , .type = SWS_PIXEL_U32, .uop = SWS_UOP_PERMUTE         , .mask = 0x7, .par.swizzle.in = {1, 2, 0, 3}) \
    MACRO(__VA_ARGS__, u32_permute_xyz_yzw                     , .type = SWS_PIXEL_U32, .uop = SWS_UOP_PERMUTE         , .mask = 0x7, .par.swizzle.in = {1, 2, 3, 0}) \
    MACRO(__VA_ARGS__, u32_permute_xyz_zxy                     , .type = SWS_PIXEL_U32, .uop = SWS_UOP_PERMUTE         , .mask = 0x7, .par.swizzle.in = {2, 0, 1, 3}) \
    MACRO(__VA_ARGS__, u32_permute_xyz_zwy                     , .type = SWS_PIXEL_U32, .uop = SWS_UOP_PERMUTE         , .mask = 0x7, .par.swizzle.in = {2, 3, 1, 0}) \
    MACRO(__VA_ARGS__, u32_permute_xyz_wzy                     , .type = SWS_PIXEL_U32, .uop = SWS_UOP_PERMUTE         , .mask = 0x7, .par.swizzle.in = {3, 2, 1, 0}) \
    MACRO(__VA_ARGS__, u32_permute_w_y                         , .type = SWS_PIXEL_U32, .uop = SWS_UOP_PERMUTE         , .mask = 0x8, .par.swizzle.in = {0, 2, 3, 1}) \
    MACRO(__VA_ARGS__, u32_permute_w_x                         , .type = SWS_PIXEL_U32, .uop = SWS_UOP_PERMUTE         , .mask = 0x8, .par.swizzle.in = {3, 1, 2, 0}) \
    MACRO(__VA_ARGS__, u32_permute_xw_yx                       , .type = SWS_PIXEL_U32, .uop = SWS_UOP_PERMUTE         , .mask = 0x9, .par.swizzle.in = {1, 2, 3, 0}) \
    MACRO(__VA_ARGS__, u32_permute_yw_wy                       , .type = SWS_PIXEL_U32, .uop = SWS_UOP_PERMUTE         , .mask = 0xa, .par.swizzle.in = {0, 3, 2, 1}) \
    MACRO(__VA_ARGS__, u32_permute_yw_xy                       , .type = SWS_PIXEL_U32, .uop = SWS_UOP_PERMUTE         , .mask = 0xa, .par.swizzle.in = {3, 0, 2, 1}) \
    MACRO(__VA_ARGS__, u32_permute_zw_xz                       , .type = SWS_PIXEL_U32, .uop = SWS_UOP_PERMUTE         , .mask = 0xc, .par.swizzle.in = {3, 1, 0, 2}) \
    MACRO(__VA_ARGS__, u32_permute_yzw_xyz                     , .type = SWS_PIXEL_U32, .uop = SWS_UOP_PERMUTE         , .mask = 0xe, .par.swizzle.in = {3, 0, 1, 2}) \
    MACRO(__VA_ARGS__, u32_permute_yzw_zxy                     , .type = SWS_PIXEL_U32, .uop = SWS_UOP_PERMUTE         , .mask = 0xe, .par.swizzle.in = {3, 2, 0, 1}) \
    MACRO(__VA_ARGS__, u32_permute_yzw_zyx                     , .type = SWS_PIXEL_U32, .uop = SWS_UOP_PERMUTE         , .mask = 0xe, .par.swizzle.in = {3, 2, 1, 0}) \
    MACRO(__VA_ARGS__, u32_permute_xyzw_yzwx                   , .type = SWS_PIXEL_U32, .uop = SWS_UOP_PERMUTE         , .mask = 0xf, .par.swizzle.in = {1, 2, 3, 0}) \
    MACRO(__VA_ARGS__, u32_permute_xyzw_wxyz                   , .type = SWS_PIXEL_U32, .uop = SWS_UOP_PERMUTE         , .mask = 0xf, .par.swizzle.in = {3, 0, 1, 2}) \
    MACRO(__VA_ARGS__, u32_permute_xyzw_wzxy                   , .type = SWS_PIXEL_U32, .uop = SWS_UOP_PERMUTE         , .mask = 0xf, .par.swizzle.in = {3, 2, 0, 1}) \
    MACRO(__VA_ARGS__, u32_permute_xyzw_wzyx                   , .type = SWS_PIXEL_U32, .uop = SWS_UOP_PERMUTE         , .mask = 0xf, .par.swizzle.in = {3, 2, 1, 0})
#define SWS_FOR_U32_COPY(MACRO, ...) \
    MACRO(__VA_ARGS__, u32_copy_yz_xx                          , SWS_PIXEL_U32, SWS_UOP_COPY            , 0x6, 0, 0, 0, 3) \
    MACRO(__VA_ARGS__, u32_copy_yzw_xxx                        , SWS_PIXEL_U32, SWS_UOP_COPY            , 0xe, 0, 0, 0, 0) \
    MACRO(__VA_ARGS__, u32_copy_yzw_xxy                        , SWS_PIXEL_U32, SWS_UOP_COPY            , 0xe, 0, 0, 0, 1)
#define SWS_FOR_STRUCT_U32_COPY(MACRO, ...) \
    MACRO(__VA_ARGS__, u32_copy_yz_xx                          , .type = SWS_PIXEL_U32, .uop = SWS_UOP_COPY            , .mask = 0x6, .par.swizzle.in = {0, 0, 0, 3}) \
    MACRO(__VA_ARGS__, u32_copy_yzw_xxx                        , .type = SWS_PIXEL_U32, .uop = SWS_UOP_COPY            , .mask = 0xe, .par.swizzle.in = {0, 0, 0, 0}) \
    MACRO(__VA_ARGS__, u32_copy_yzw_xxy                        , .type = SWS_PIXEL_U32, .uop = SWS_UOP_COPY            , .mask = 0xe, .par.swizzle.in = {0, 0, 0, 1})
#define SWS_FOR_U32_MOVE(MACRO, ...) \
    MACRO(__VA_ARGS__, u32_move_x_y                            , SWS_PIXEL_U32, SWS_UOP_MOVE            , 0x0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0) \
    MACRO(__VA_ARGS__, u32_move_x_z                            , SWS_PIXEL_U32, SWS_UOP_MOVE            , 0x0, 1, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0) \
    MACRO(__VA_ARGS__, u32_move_x_w                            , SWS_PIXEL_U32, SWS_UOP_MOVE            , 0x0, 1, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0) \
    MACRO(__VA_ARGS__, u32_move_y_x                            , SWS_PIXEL_U32, SWS_UOP_MOVE            , 0x0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) \
    MACRO(__VA_ARGS__, u32_move_y_w                            , SWS_PIXEL_U32, SWS_UOP_MOVE            , 0x0, 1, 1, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0) \
    MACRO(__VA_ARGS__, u32_move_z_x                            , SWS_PIXEL_U32, SWS_UOP_MOVE            , 0x0, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) \
    MACRO(__VA_ARGS__, u32_move_w_x                            , SWS_PIXEL_U32, SWS_UOP_MOVE            , 0x0, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) \
    MACRO(__VA_ARGS__, u32_move_w_y                            , SWS_PIXEL_U32, SWS_UOP_MOVE            , 0x0, 1, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0) \
    MACRO(__VA_ARGS__, u32_move_xz_zw                          , SWS_PIXEL_U32, SWS_UOP_MOVE            , 0x0, 2, 0, 2, 0, 0, 0, 0, 2, 3, 0, 0, 0, 0) \
    MACRO(__VA_ARGS__, u32_move_yz_xx                          , SWS_PIXEL_U32, SWS_UOP_MOVE            , 0x0, 2, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) \
    MACRO(__VA_ARGS__, u32_move_zx_xw                          , SWS_PIXEL_U32, SWS_UOP_MOVE            , 0x0, 2, 2, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0) \
    MACRO(__VA_ARGS__, u32_move_wx_xy                          , SWS_PIXEL_U32, SWS_UOP_MOVE            , 0x0, 2, 3, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0) \
    MACRO(__VA_ARGS__, u32_move_wy_yx                          , SWS_PIXEL_U32, SWS_UOP_MOVE            , 0x0, 2, 3, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0) \
    MACRO(__VA_ARGS__, u32_move_wz_zx                          , SWS_PIXEL_U32, SWS_UOP_MOVE            , 0x0, 2, 3, 2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0) \
    MACRO(__VA_ARGS__, u32_move_xyz_yzw                        , SWS_PIXEL_U32, SWS_UOP_MOVE            , 0x0, 3, 0, 1, 2, 0, 0, 0, 1, 2, 3, 0, 0, 0) \
    MACRO(__VA_ARGS__, u32_move_xzy_zyw                        , SWS_PIXEL_U32, SWS_UOP_MOVE            , 0x0, 3, 0, 2, 1, 0, 0, 0, 2, 1, 3, 0, 0, 0) \
    MACRO(__VA_ARGS__, u32_move_yzw_xxx                        , SWS_PIXEL_U32, SWS_UOP_MOVE            , 0x0, 3, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0) \
    MACRO(__VA_ARGS__, u32_move_zwy_xyx                        , SWS_PIXEL_U32, SWS_UOP_MOVE            , 0x0, 3, 2, 3, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0) \
    MACRO(__VA_ARGS__, u32_move_wyz_yzx                        , SWS_PIXEL_U32, SWS_UOP_MOVE            , 0x0, 3, 3, 1, 2, 0, 0, 0, 1, 2, 0, 0, 0, 0) \
    MACRO(__VA_ARGS__, u32_move_wzy_zyx                        , SWS_PIXEL_U32, SWS_UOP_MOVE            , 0x0, 3, 3, 2, 1, 0, 0, 0, 2, 1, 0, 0, 0, 0) \
    MACRO(__VA_ARGS__, u32_move_txy_xyt                        , SWS_PIXEL_U32, SWS_UOP_MOVE            , 0x0, 3, -1, 0, 1, 0, 0, 0, 0, 1, -1, 0, 0, 0) \
    MACRO(__VA_ARGS__, u32_move_txz_xzt                        , SWS_PIXEL_U32, SWS_UOP_MOVE            , 0x0, 3, -1, 0, 2, 0, 0, 0, 0, 2, -1, 0, 0, 0) \
    MACRO(__VA_ARGS__, u32_move_tyz_yzt                        , SWS_PIXEL_U32, SWS_UOP_MOVE            , 0x0, 3, -1, 1, 2, 0, 0, 0, 1, 2, -1, 0, 0, 0) \
    MACRO(__VA_ARGS__, u32_move_tyw_ywt                        , SWS_PIXEL_U32, SWS_UOP_MOVE            , 0x0, 3, -1, 1, 3, 0, 0, 0, 1, 3, -1, 0, 0, 0) \
    MACRO(__VA_ARGS__, u32_move_xtyz_wyzt                      , SWS_PIXEL_U32, SWS_UOP_MOVE            , 0x0, 4, 0, -1, 1, 2, 0, 0, 3, 1, 2, -1, 0, 0) \
    MACRO(__VA_ARGS__, u32_move_wtyz_xyzt                      , SWS_PIXEL_U32, SWS_UOP_MOVE            , 0x0, 4, 3, -1, 1, 2, 0, 0, 0, 1, 2, -1, 0, 0) \
    MACRO(__VA_ARGS__, u32_move_txyz_xyzt                      , SWS_PIXEL_U32, SWS_UOP_MOVE            , 0x0, 4, -1, 0, 1, 2, 0, 0, 0, 1, 2, -1, 0, 0) \
    MACRO(__VA_ARGS__, u32_move_txzy_xzyt                      , SWS_PIXEL_U32, SWS_UOP_MOVE            , 0x0, 4, -1, 0, 2, 1, 0, 0, 0, 2, 1, -1, 0, 0) \
    MACRO(__VA_ARGS__, u32_move_txyzw_xyzwt                    , SWS_PIXEL_U32, SWS_UOP_MOVE            , 0x0, 5, -1, 0, 1, 2, 3, 0, 0, 1, 2, 3, -1, 0) \
    MACRO(__VA_ARGS__, u32_move_txwyz_xwyzt                    , SWS_PIXEL_U32, SWS_UOP_MOVE            , 0x0, 5, -1, 0, 3, 1, 2, 0, 0, 3, 1, 2, -1, 0) \
    MACRO(__VA_ARGS__, u32_move_txwzy_xwzyt                    , SWS_PIXEL_U32, SWS_UOP_MOVE            , 0x0, 5, -1, 0, 3, 2, 1, 0, 0, 3, 2, 1, -1, 0) \
    MACRO(__VA_ARGS__, u32_move_txwtyz_xwtyzt                  , SWS_PIXEL_U32, SWS_UOP_MOVE            , 0x0, 6, -1, 0, 3, -1, 1, 2, 0, 3, -1, 1, 2, -1)
#define SWS_FOR_STRUCT_U32_MOVE(MACRO, ...) \
    MACRO(__VA_ARGS__, u32_move_x_y                            , .type = SWS_PIXEL_U32, .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 1, .par.move.dst = {0, 0, 0, 0, 0, 0}, .par.move.src = {1, 0, 0, 0, 0, 0}) \
    MACRO(__VA_ARGS__, u32_move_x_z                            , .type = SWS_PIXEL_U32, .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 1, .par.move.dst = {0, 0, 0, 0, 0, 0}, .par.move.src = {2, 0, 0, 0, 0, 0}) \
    MACRO(__VA_ARGS__, u32_move_x_w                            , .type = SWS_PIXEL_U32, .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 1, .par.move.dst = {0, 0, 0, 0, 0, 0}, .par.move.src = {3, 0, 0, 0, 0, 0}) \
    MACRO(__VA_ARGS__, u32_move_y_x                            , .type = SWS_PIXEL_U32, .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 1, .par.move.dst = {1, 0, 0, 0, 0, 0}, .par.move.src = {0, 0, 0, 0, 0, 0}) \
    MACRO(__VA_ARGS__, u32_move_y_w                            , .type = SWS_PIXEL_U32, .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 1, .par.move.dst = {1, 0, 0, 0, 0, 0}, .par.move.src = {3, 0, 0, 0, 0, 0}) \
    MACRO(__VA_ARGS__, u32_move_z_x                            , .type = SWS_PIXEL_U32, .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 1, .par.move.dst = {2, 0, 0, 0, 0, 0}, .par.move.src = {0, 0, 0, 0, 0, 0}) \
    MACRO(__VA_ARGS__, u32_move_w_x                            , .type = SWS_PIXEL_U32, .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 1, .par.move.dst = {3, 0, 0, 0, 0, 0}, .par.move.src = {0, 0, 0, 0, 0, 0}) \
    MACRO(__VA_ARGS__, u32_move_w_y                            , .type = SWS_PIXEL_U32, .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 1, .par.move.dst = {3, 0, 0, 0, 0, 0}, .par.move.src = {1, 0, 0, 0, 0, 0}) \
    MACRO(__VA_ARGS__, u32_move_xz_zw                          , .type = SWS_PIXEL_U32, .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 2, .par.move.dst = {0, 2, 0, 0, 0, 0}, .par.move.src = {2, 3, 0, 0, 0, 0}) \
    MACRO(__VA_ARGS__, u32_move_yz_xx                          , .type = SWS_PIXEL_U32, .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 2, .par.move.dst = {1, 2, 0, 0, 0, 0}, .par.move.src = {0, 0, 0, 0, 0, 0}) \
    MACRO(__VA_ARGS__, u32_move_zx_xw                          , .type = SWS_PIXEL_U32, .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 2, .par.move.dst = {2, 0, 0, 0, 0, 0}, .par.move.src = {0, 3, 0, 0, 0, 0}) \
    MACRO(__VA_ARGS__, u32_move_wx_xy                          , .type = SWS_PIXEL_U32, .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 2, .par.move.dst = {3, 0, 0, 0, 0, 0}, .par.move.src = {0, 1, 0, 0, 0, 0}) \
    MACRO(__VA_ARGS__, u32_move_wy_yx                          , .type = SWS_PIXEL_U32, .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 2, .par.move.dst = {3, 1, 0, 0, 0, 0}, .par.move.src = {1, 0, 0, 0, 0, 0}) \
    MACRO(__VA_ARGS__, u32_move_wz_zx                          , .type = SWS_PIXEL_U32, .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 2, .par.move.dst = {3, 2, 0, 0, 0, 0}, .par.move.src = {2, 0, 0, 0, 0, 0}) \
    MACRO(__VA_ARGS__, u32_move_xyz_yzw                        , .type = SWS_PIXEL_U32, .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 3, .par.move.dst = {0, 1, 2, 0, 0, 0}, .par.move.src = {1, 2, 3, 0, 0, 0}) \
    MACRO(__VA_ARGS__, u32_move_xzy_zyw                        , .type = SWS_PIXEL_U32, .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 3, .par.move.dst = {0, 2, 1, 0, 0, 0}, .par.move.src = {2, 1, 3, 0, 0, 0}) \
    MACRO(__VA_ARGS__, u32_move_yzw_xxx                        , .type = SWS_PIXEL_U32, .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 3, .par.move.dst = {1, 2, 3, 0, 0, 0}, .par.move.src = {0, 0, 0, 0, 0, 0}) \
    MACRO(__VA_ARGS__, u32_move_zwy_xyx                        , .type = SWS_PIXEL_U32, .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 3, .par.move.dst = {2, 3, 1, 0, 0, 0}, .par.move.src = {0, 1, 0, 0, 0, 0}) \
    MACRO(__VA_ARGS__, u32_move_wyz_yzx                        , .type = SWS_PIXEL_U32, .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 3, .par.move.dst = {3, 1, 2, 0, 0, 0}, .par.move.src = {1, 2, 0, 0, 0, 0}) \
    MACRO(__VA_ARGS__, u32_move_wzy_zyx                        , .type = SWS_PIXEL_U32, .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 3, .par.move.dst = {3, 2, 1, 0, 0, 0}, .par.move.src = {2, 1, 0, 0, 0, 0}) \
    MACRO(__VA_ARGS__, u32_move_txy_xyt                        , .type = SWS_PIXEL_U32, .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 3, .par.move.dst = {-1, 0, 1, 0, 0, 0}, .par.move.src = {0, 1, -1, 0, 0, 0}) \
    MACRO(__VA_ARGS__, u32_move_txz_xzt                        , .type = SWS_PIXEL_U32, .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 3, .par.move.dst = {-1, 0, 2, 0, 0, 0}, .par.move.src = {0, 2, -1, 0, 0, 0}) \
    MACRO(__VA_ARGS__, u32_move_tyz_yzt                        , .type = SWS_PIXEL_U32, .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 3, .par.move.dst = {-1, 1, 2, 0, 0, 0}, .par.move.src = {1, 2, -1, 0, 0, 0}) \
    MACRO(__VA_ARGS__, u32_move_tyw_ywt                        , .type = SWS_PIXEL_U32, .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 3, .par.move.dst = {-1, 1, 3, 0, 0, 0}, .par.move.src = {1, 3, -1, 0, 0, 0}) \
    MACRO(__VA_ARGS__, u32_move_xtyz_wyzt                      , .type = SWS_PIXEL_U32, .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 4, .par.move.dst = {0, -1, 1, 2, 0, 0}, .par.move.src = {3, 1, 2, -1, 0, 0}) \
    MACRO(__VA_ARGS__, u32_move_wtyz_xyzt                      , .type = SWS_PIXEL_U32, .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 4, .par.move.dst = {3, -1, 1, 2, 0, 0}, .par.move.src = {0, 1, 2, -1, 0, 0}) \
    MACRO(__VA_ARGS__, u32_move_txyz_xyzt                      , .type = SWS_PIXEL_U32, .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 4, .par.move.dst = {-1, 0, 1, 2, 0, 0}, .par.move.src = {0, 1, 2, -1, 0, 0}) \
    MACRO(__VA_ARGS__, u32_move_txzy_xzyt                      , .type = SWS_PIXEL_U32, .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 4, .par.move.dst = {-1, 0, 2, 1, 0, 0}, .par.move.src = {0, 2, 1, -1, 0, 0}) \
    MACRO(__VA_ARGS__, u32_move_txyzw_xyzwt                    , .type = SWS_PIXEL_U32, .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 5, .par.move.dst = {-1, 0, 1, 2, 3, 0}, .par.move.src = {0, 1, 2, 3, -1, 0}) \
    MACRO(__VA_ARGS__, u32_move_txwyz_xwyzt                    , .type = SWS_PIXEL_U32, .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 5, .par.move.dst = {-1, 0, 3, 1, 2, 0}, .par.move.src = {0, 3, 1, 2, -1, 0}) \
    MACRO(__VA_ARGS__, u32_move_txwzy_xwzyt                    , .type = SWS_PIXEL_U32, .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 5, .par.move.dst = {-1, 0, 3, 2, 1, 0}, .par.move.src = {0, 3, 2, 1, -1, 0}) \
    MACRO(__VA_ARGS__, u32_move_txwtyz_xwtyzt                  , .type = SWS_PIXEL_U32, .uop = SWS_UOP_MOVE            , .mask = 0x0, .par.move.num_moves = 6, .par.move.dst = {-1, 0, 3, -1, 1, 2}, .par.move.src = {0, 3, -1, 1, 2, -1})
#define SWS_FOR_U32_SWAP_BYTES(MACRO, ...) \
    MACRO(__VA_ARGS__, u32_swap_bytes_x                        , SWS_PIXEL_U32, SWS_UOP_SWAP_BYTES      , 0x1) \
    MACRO(__VA_ARGS__, u32_swap_bytes_xy                       , SWS_PIXEL_U32, SWS_UOP_SWAP_BYTES      , 0x3) \
    MACRO(__VA_ARGS__, u32_swap_bytes_xyz                      , SWS_PIXEL_U32, SWS_UOP_SWAP_BYTES      , 0x7) \
    MACRO(__VA_ARGS__, u32_swap_bytes_xw                       , SWS_PIXEL_U32, SWS_UOP_SWAP_BYTES      , 0x9) \
    MACRO(__VA_ARGS__, u32_swap_bytes_yzw                      , SWS_PIXEL_U32, SWS_UOP_SWAP_BYTES      , 0xe) \
    MACRO(__VA_ARGS__, u32_swap_bytes_xyzw                     , SWS_PIXEL_U32, SWS_UOP_SWAP_BYTES      , 0xf)
#define SWS_FOR_STRUCT_U32_SWAP_BYTES(MACRO, ...) \
    MACRO(__VA_ARGS__, u32_swap_bytes_x                        , .type = SWS_PIXEL_U32, .uop = SWS_UOP_SWAP_BYTES      , .mask = 0x1) \
    MACRO(__VA_ARGS__, u32_swap_bytes_xy                       , .type = SWS_PIXEL_U32, .uop = SWS_UOP_SWAP_BYTES      , .mask = 0x3) \
    MACRO(__VA_ARGS__, u32_swap_bytes_xyz                      , .type = SWS_PIXEL_U32, .uop = SWS_UOP_SWAP_BYTES      , .mask = 0x7) \
    MACRO(__VA_ARGS__, u32_swap_bytes_xw                       , .type = SWS_PIXEL_U32, .uop = SWS_UOP_SWAP_BYTES      , .mask = 0x9) \
    MACRO(__VA_ARGS__, u32_swap_bytes_yzw                      , .type = SWS_PIXEL_U32, .uop = SWS_UOP_SWAP_BYTES      , .mask = 0xe) \
    MACRO(__VA_ARGS__, u32_swap_bytes_xyzw                     , .type = SWS_PIXEL_U32, .uop = SWS_UOP_SWAP_BYTES      , .mask = 0xf)
#define SWS_FOR_U32_EXPAND_BIT(MACRO, ...)
#define SWS_FOR_STRUCT_U32_EXPAND_BIT(MACRO, ...)
#define SWS_FOR_U32_EXPAND_PAIR(MACRO, ...)
#define SWS_FOR_STRUCT_U32_EXPAND_PAIR(MACRO, ...)
#define SWS_FOR_U32_EXPAND_QUAD(MACRO, ...)
#define SWS_FOR_STRUCT_U32_EXPAND_QUAD(MACRO, ...)
#define SWS_FOR_U32_TO_U8(MACRO, ...)
#define SWS_FOR_STRUCT_U32_TO_U8(MACRO, ...)
#define SWS_FOR_U32_TO_U16(MACRO, ...) \
    MACRO(__VA_ARGS__, u32_to_u16_y                            , SWS_PIXEL_U32, SWS_UOP_TO_U16          , 0x2) \
    MACRO(__VA_ARGS__, u32_to_u16_z                            , SWS_PIXEL_U32, SWS_UOP_TO_U16          , 0x4) \
    MACRO(__VA_ARGS__, u32_to_u16_xyz                          , SWS_PIXEL_U32, SWS_UOP_TO_U16          , 0x7) \
    MACRO(__VA_ARGS__, u32_to_u16_yzw                          , SWS_PIXEL_U32, SWS_UOP_TO_U16          , 0xe)
#define SWS_FOR_STRUCT_U32_TO_U16(MACRO, ...) \
    MACRO(__VA_ARGS__, u32_to_u16_y                            , .type = SWS_PIXEL_U32, .uop = SWS_UOP_TO_U16          , .mask = 0x2) \
    MACRO(__VA_ARGS__, u32_to_u16_z                            , .type = SWS_PIXEL_U32, .uop = SWS_UOP_TO_U16          , .mask = 0x4) \
    MACRO(__VA_ARGS__, u32_to_u16_xyz                          , .type = SWS_PIXEL_U32, .uop = SWS_UOP_TO_U16          , .mask = 0x7) \
    MACRO(__VA_ARGS__, u32_to_u16_yzw                          , .type = SWS_PIXEL_U32, .uop = SWS_UOP_TO_U16          , .mask = 0xe)
#define SWS_FOR_U32_TO_U32(MACRO, ...)
#define SWS_FOR_STRUCT_U32_TO_U32(MACRO, ...)
#define SWS_FOR_U32_TO_F32(MACRO, ...) \
    MACRO(__VA_ARGS__, u32_to_f32_y                            , SWS_PIXEL_U32, SWS_UOP_TO_F32          , 0x2) \
    MACRO(__VA_ARGS__, u32_to_f32_z                            , SWS_PIXEL_U32, SWS_UOP_TO_F32          , 0x4) \
    MACRO(__VA_ARGS__, u32_to_f32_xyz                          , SWS_PIXEL_U32, SWS_UOP_TO_F32          , 0x7) \
    MACRO(__VA_ARGS__, u32_to_f32_yzw                          , SWS_PIXEL_U32, SWS_UOP_TO_F32          , 0xe)
#define SWS_FOR_STRUCT_U32_TO_F32(MACRO, ...) \
    MACRO(__VA_ARGS__, u32_to_f32_y                            , .type = SWS_PIXEL_U32, .uop = SWS_UOP_TO_F32          , .mask = 0x2) \
    MACRO(__VA_ARGS__, u32_to_f32_z                            , .type = SWS_PIXEL_U32, .uop = SWS_UOP_TO_F32          , .mask = 0x4) \
    MACRO(__VA_ARGS__, u32_to_f32_xyz                          , .type = SWS_PIXEL_U32, .uop = SWS_UOP_TO_F32          , .mask = 0x7) \
    MACRO(__VA_ARGS__, u32_to_f32_yzw                          , .type = SWS_PIXEL_U32, .uop = SWS_UOP_TO_F32          , .mask = 0xe)
#define SWS_FOR_U32_SCALE(MACRO, ...) \
    MACRO(__VA_ARGS__, u32_scale_x                             , SWS_PIXEL_U32, SWS_UOP_SCALE           , 0x1) \
    MACRO(__VA_ARGS__, u32_scale_xyz                           , SWS_PIXEL_U32, SWS_UOP_SCALE           , 0x7)
#define SWS_FOR_STRUCT_U32_SCALE(MACRO, ...) \
    MACRO(__VA_ARGS__, u32_scale_x                             , .type = SWS_PIXEL_U32, .uop = SWS_UOP_SCALE           , .mask = 0x1) \
    MACRO(__VA_ARGS__, u32_scale_xyz                           , .type = SWS_PIXEL_U32, .uop = SWS_UOP_SCALE           , .mask = 0x7)
#define SWS_FOR_U32_ADD(MACRO, ...)
#define SWS_FOR_STRUCT_U32_ADD(MACRO, ...)
#define SWS_FOR_U32_MIN(MACRO, ...)
#define SWS_FOR_STRUCT_U32_MIN(MACRO, ...)
#define SWS_FOR_U32_MAX(MACRO, ...)
#define SWS_FOR_STRUCT_U32_MAX(MACRO, ...)
#define SWS_FOR_U32_UNPACK(MACRO, ...) \
    MACRO(__VA_ARGS__, u32_unpack_xyzw_2aaa                    , SWS_PIXEL_U32, SWS_UOP_UNPACK          , 0xf, 2, 10, 10, 10) \
    MACRO(__VA_ARGS__, u32_unpack_xyzw_aaa2                    , SWS_PIXEL_U32, SWS_UOP_UNPACK          , 0xf, 10, 10, 10, 2)
#define SWS_FOR_STRUCT_U32_UNPACK(MACRO, ...) \
    MACRO(__VA_ARGS__, u32_unpack_xyzw_2aaa                    , .type = SWS_PIXEL_U32, .uop = SWS_UOP_UNPACK          , .mask = 0xf, .par.pack.pattern = {2, 10, 10, 10}) \
    MACRO(__VA_ARGS__, u32_unpack_xyzw_aaa2                    , .type = SWS_PIXEL_U32, .uop = SWS_UOP_UNPACK          , .mask = 0xf, .par.pack.pattern = {10, 10, 10, 2})
#define SWS_FOR_U32_PACK(MACRO, ...) \
    MACRO(__VA_ARGS__, u32_pack_xyzw_2aaa                      , SWS_PIXEL_U32, SWS_UOP_PACK            , 0xf, 2, 10, 10, 10) \
    MACRO(__VA_ARGS__, u32_pack_xyzw_aaa2                      , SWS_PIXEL_U32, SWS_UOP_PACK            , 0xf, 10, 10, 10, 2)
#define SWS_FOR_STRUCT_U32_PACK(MACRO, ...) \
    MACRO(__VA_ARGS__, u32_pack_xyzw_2aaa                      , .type = SWS_PIXEL_U32, .uop = SWS_UOP_PACK            , .mask = 0xf, .par.pack.pattern = {2, 10, 10, 10}) \
    MACRO(__VA_ARGS__, u32_pack_xyzw_aaa2                      , .type = SWS_PIXEL_U32, .uop = SWS_UOP_PACK            , .mask = 0xf, .par.pack.pattern = {10, 10, 10, 2})
#define SWS_FOR_U32_LSHIFT(MACRO, ...) \
    MACRO(__VA_ARGS__, u32_lshift_xyz_2                        , SWS_PIXEL_U32, SWS_UOP_LSHIFT          , 0x7, 2)
#define SWS_FOR_STRUCT_U32_LSHIFT(MACRO, ...) \
    MACRO(__VA_ARGS__, u32_lshift_xyz_2                        , .type = SWS_PIXEL_U32, .uop = SWS_UOP_LSHIFT          , .mask = 0x7, .par.shift.amount = 2)
#define SWS_FOR_U32_RSHIFT(MACRO, ...)
#define SWS_FOR_STRUCT_U32_RSHIFT(MACRO, ...)
#define SWS_FOR_U32_CLEAR(MACRO, ...) \
    MACRO(__VA_ARGS__, u32_clear_x_x                           , SWS_PIXEL_U32, SWS_UOP_CLEAR           , 0x1, 0x00000, 0x00000) \
    MACRO(__VA_ARGS__, u32_clear_y_x                           , SWS_PIXEL_U32, SWS_UOP_CLEAR           , 0x2, 0x00000, 0x00000) \
    MACRO(__VA_ARGS__, u32_clear_xz_xx                         , SWS_PIXEL_U32, SWS_UOP_CLEAR           , 0x5, 0x00000, 0x00000) \
    MACRO(__VA_ARGS__, u32_clear_w_x                           , SWS_PIXEL_U32, SWS_UOP_CLEAR           , 0x8, 0x00000, 0x00000) \
    MACRO(__VA_ARGS__, u32_clear_yw_xx                         , SWS_PIXEL_U32, SWS_UOP_CLEAR           , 0xa, 0x00000, 0x00000) \
    MACRO(__VA_ARGS__, u32_clear_xyw_xxx                       , SWS_PIXEL_U32, SWS_UOP_CLEAR           , 0xb, 0x00000, 0x00000) \
    MACRO(__VA_ARGS__, u32_clear_xzw_xxx                       , SWS_PIXEL_U32, SWS_UOP_CLEAR           , 0xd, 0x00000, 0x00000)
#define SWS_FOR_STRUCT_U32_CLEAR(MACRO, ...) \
    MACRO(__VA_ARGS__, u32_clear_x_x                           , .type = SWS_PIXEL_U32, .uop = SWS_UOP_CLEAR           , .mask = 0x1, .par.clear.one = 0x0, .par.clear.zero = 0x0) \
    MACRO(__VA_ARGS__, u32_clear_y_x                           , .type = SWS_PIXEL_U32, .uop = SWS_UOP_CLEAR           , .mask = 0x2, .par.clear.one = 0x0, .par.clear.zero = 0x0) \
    MACRO(__VA_ARGS__, u32_clear_xz_xx                         , .type = SWS_PIXEL_U32, .uop = SWS_UOP_CLEAR           , .mask = 0x5, .par.clear.one = 0x0, .par.clear.zero = 0x0) \
    MACRO(__VA_ARGS__, u32_clear_w_x                           , .type = SWS_PIXEL_U32, .uop = SWS_UOP_CLEAR           , .mask = 0x8, .par.clear.one = 0x0, .par.clear.zero = 0x0) \
    MACRO(__VA_ARGS__, u32_clear_yw_xx                         , .type = SWS_PIXEL_U32, .uop = SWS_UOP_CLEAR           , .mask = 0xa, .par.clear.one = 0x0, .par.clear.zero = 0x0) \
    MACRO(__VA_ARGS__, u32_clear_xyw_xxx                       , .type = SWS_PIXEL_U32, .uop = SWS_UOP_CLEAR           , .mask = 0xb, .par.clear.one = 0x0, .par.clear.zero = 0x0) \
    MACRO(__VA_ARGS__, u32_clear_xzw_xxx                       , .type = SWS_PIXEL_U32, .uop = SWS_UOP_CLEAR           , .mask = 0xd, .par.clear.one = 0x0, .par.clear.zero = 0x0)
#define SWS_FOR_U32_LINEAR(MACRO, ...)
#define SWS_FOR_STRUCT_U32_LINEAR(MACRO, ...)
#define SWS_FOR_U32_LINEAR_FMA(MACRO, ...)
#define SWS_FOR_STRUCT_U32_LINEAR_FMA(MACRO, ...)
#define SWS_FOR_U32_DITHER(MACRO, ...)
#define SWS_FOR_STRUCT_U32_DITHER(MACRO, ...)
#define SWS_FOR_F32_READ_PLANAR(MACRO, ...)
#define SWS_FOR_STRUCT_F32_READ_PLANAR(MACRO, ...)
#define SWS_FOR_F32_READ_PLANAR_FH(MACRO, ...) \
    MACRO(__VA_ARGS__, f32_read_planar_fh_x_f32                , SWS_PIXEL_F32, SWS_UOP_READ_PLANAR_FH  , 0x1, SWS_PIXEL_F32) \
    MACRO(__VA_ARGS__, f32_read_planar_fh_xy_f32               , SWS_PIXEL_F32, SWS_UOP_READ_PLANAR_FH  , 0x3, SWS_PIXEL_F32) \
    MACRO(__VA_ARGS__, f32_read_planar_fh_xyz_f32              , SWS_PIXEL_F32, SWS_UOP_READ_PLANAR_FH  , 0x7, SWS_PIXEL_F32) \
    MACRO(__VA_ARGS__, f32_read_planar_fh_xyzw_f32             , SWS_PIXEL_F32, SWS_UOP_READ_PLANAR_FH  , 0xf, SWS_PIXEL_F32)
#define SWS_FOR_STRUCT_F32_READ_PLANAR_FH(MACRO, ...) \
    MACRO(__VA_ARGS__, f32_read_planar_fh_x_f32                , .type = SWS_PIXEL_F32, .uop = SWS_UOP_READ_PLANAR_FH  , .mask = 0x1, .par.filter.type = SWS_PIXEL_F32) \
    MACRO(__VA_ARGS__, f32_read_planar_fh_xy_f32               , .type = SWS_PIXEL_F32, .uop = SWS_UOP_READ_PLANAR_FH  , .mask = 0x3, .par.filter.type = SWS_PIXEL_F32) \
    MACRO(__VA_ARGS__, f32_read_planar_fh_xyz_f32              , .type = SWS_PIXEL_F32, .uop = SWS_UOP_READ_PLANAR_FH  , .mask = 0x7, .par.filter.type = SWS_PIXEL_F32) \
    MACRO(__VA_ARGS__, f32_read_planar_fh_xyzw_f32             , .type = SWS_PIXEL_F32, .uop = SWS_UOP_READ_PLANAR_FH  , .mask = 0xf, .par.filter.type = SWS_PIXEL_F32)
#define SWS_FOR_F32_READ_PLANAR_FV(MACRO, ...) \
    MACRO(__VA_ARGS__, f32_read_planar_fv_x_f32                , SWS_PIXEL_F32, SWS_UOP_READ_PLANAR_FV  , 0x1, SWS_PIXEL_F32) \
    MACRO(__VA_ARGS__, f32_read_planar_fv_xy_f32               , SWS_PIXEL_F32, SWS_UOP_READ_PLANAR_FV  , 0x3, SWS_PIXEL_F32) \
    MACRO(__VA_ARGS__, f32_read_planar_fv_xyz_f32              , SWS_PIXEL_F32, SWS_UOP_READ_PLANAR_FV  , 0x7, SWS_PIXEL_F32) \
    MACRO(__VA_ARGS__, f32_read_planar_fv_xyzw_f32             , SWS_PIXEL_F32, SWS_UOP_READ_PLANAR_FV  , 0xf, SWS_PIXEL_F32)
#define SWS_FOR_STRUCT_F32_READ_PLANAR_FV(MACRO, ...) \
    MACRO(__VA_ARGS__, f32_read_planar_fv_x_f32                , .type = SWS_PIXEL_F32, .uop = SWS_UOP_READ_PLANAR_FV  , .mask = 0x1, .par.filter.type = SWS_PIXEL_F32) \
    MACRO(__VA_ARGS__, f32_read_planar_fv_xy_f32               , .type = SWS_PIXEL_F32, .uop = SWS_UOP_READ_PLANAR_FV  , .mask = 0x3, .par.filter.type = SWS_PIXEL_F32) \
    MACRO(__VA_ARGS__, f32_read_planar_fv_xyz_f32              , .type = SWS_PIXEL_F32, .uop = SWS_UOP_READ_PLANAR_FV  , .mask = 0x7, .par.filter.type = SWS_PIXEL_F32) \
    MACRO(__VA_ARGS__, f32_read_planar_fv_xyzw_f32             , .type = SWS_PIXEL_F32, .uop = SWS_UOP_READ_PLANAR_FV  , .mask = 0xf, .par.filter.type = SWS_PIXEL_F32)
#define SWS_FOR_F32_READ_PLANAR_FV_FMA(MACRO, ...) \
    MACRO(__VA_ARGS__, f32_read_planar_fv_fma_x_f32            , SWS_PIXEL_F32, SWS_UOP_READ_PLANAR_FV_FMA, 0x1, SWS_PIXEL_F32) \
    MACRO(__VA_ARGS__, f32_read_planar_fv_fma_xy_f32           , SWS_PIXEL_F32, SWS_UOP_READ_PLANAR_FV_FMA, 0x3, SWS_PIXEL_F32) \
    MACRO(__VA_ARGS__, f32_read_planar_fv_fma_xyz_f32          , SWS_PIXEL_F32, SWS_UOP_READ_PLANAR_FV_FMA, 0x7, SWS_PIXEL_F32) \
    MACRO(__VA_ARGS__, f32_read_planar_fv_fma_xyzw_f32         , SWS_PIXEL_F32, SWS_UOP_READ_PLANAR_FV_FMA, 0xf, SWS_PIXEL_F32)
#define SWS_FOR_STRUCT_F32_READ_PLANAR_FV_FMA(MACRO, ...) \
    MACRO(__VA_ARGS__, f32_read_planar_fv_fma_x_f32            , .type = SWS_PIXEL_F32, .uop = SWS_UOP_READ_PLANAR_FV_FMA, .mask = 0x1, .par.filter.type = SWS_PIXEL_F32) \
    MACRO(__VA_ARGS__, f32_read_planar_fv_fma_xy_f32           , .type = SWS_PIXEL_F32, .uop = SWS_UOP_READ_PLANAR_FV_FMA, .mask = 0x3, .par.filter.type = SWS_PIXEL_F32) \
    MACRO(__VA_ARGS__, f32_read_planar_fv_fma_xyz_f32          , .type = SWS_PIXEL_F32, .uop = SWS_UOP_READ_PLANAR_FV_FMA, .mask = 0x7, .par.filter.type = SWS_PIXEL_F32) \
    MACRO(__VA_ARGS__, f32_read_planar_fv_fma_xyzw_f32         , .type = SWS_PIXEL_F32, .uop = SWS_UOP_READ_PLANAR_FV_FMA, .mask = 0xf, .par.filter.type = SWS_PIXEL_F32)
#define SWS_FOR_F32_READ_PACKED(MACRO, ...)
#define SWS_FOR_STRUCT_F32_READ_PACKED(MACRO, ...)
#define SWS_FOR_F32_READ_NIBBLE(MACRO, ...)
#define SWS_FOR_STRUCT_F32_READ_NIBBLE(MACRO, ...)
#define SWS_FOR_F32_READ_BIT(MACRO, ...)
#define SWS_FOR_STRUCT_F32_READ_BIT(MACRO, ...)
#define SWS_FOR_F32_WRITE_PLANAR(MACRO, ...)
#define SWS_FOR_STRUCT_F32_WRITE_PLANAR(MACRO, ...)
#define SWS_FOR_F32_WRITE_PACKED(MACRO, ...)
#define SWS_FOR_STRUCT_F32_WRITE_PACKED(MACRO, ...)
#define SWS_FOR_F32_WRITE_NIBBLE(MACRO, ...)
#define SWS_FOR_STRUCT_F32_WRITE_NIBBLE(MACRO, ...)
#define SWS_FOR_F32_WRITE_BIT(MACRO, ...)
#define SWS_FOR_STRUCT_F32_WRITE_BIT(MACRO, ...)
#define SWS_FOR_F32_PERMUTE(MACRO, ...)
#define SWS_FOR_STRUCT_F32_PERMUTE(MACRO, ...)
#define SWS_FOR_F32_COPY(MACRO, ...)
#define SWS_FOR_STRUCT_F32_COPY(MACRO, ...)
#define SWS_FOR_F32_MOVE(MACRO, ...)
#define SWS_FOR_STRUCT_F32_MOVE(MACRO, ...)
#define SWS_FOR_F32_SWAP_BYTES(MACRO, ...)
#define SWS_FOR_STRUCT_F32_SWAP_BYTES(MACRO, ...)
#define SWS_FOR_F32_EXPAND_BIT(MACRO, ...)
#define SWS_FOR_STRUCT_F32_EXPAND_BIT(MACRO, ...)
#define SWS_FOR_F32_EXPAND_PAIR(MACRO, ...)
#define SWS_FOR_STRUCT_F32_EXPAND_PAIR(MACRO, ...)
#define SWS_FOR_F32_EXPAND_QUAD(MACRO, ...)
#define SWS_FOR_STRUCT_F32_EXPAND_QUAD(MACRO, ...)
#define SWS_FOR_F32_TO_U8(MACRO, ...) \
    MACRO(__VA_ARGS__, f32_to_u8_x                             , SWS_PIXEL_F32, SWS_UOP_TO_U8           , 0x1) \
    MACRO(__VA_ARGS__, f32_to_u8_xy                            , SWS_PIXEL_F32, SWS_UOP_TO_U8           , 0x3) \
    MACRO(__VA_ARGS__, f32_to_u8_xyz                           , SWS_PIXEL_F32, SWS_UOP_TO_U8           , 0x7) \
    MACRO(__VA_ARGS__, f32_to_u8_xw                            , SWS_PIXEL_F32, SWS_UOP_TO_U8           , 0x9) \
    MACRO(__VA_ARGS__, f32_to_u8_yzw                           , SWS_PIXEL_F32, SWS_UOP_TO_U8           , 0xe) \
    MACRO(__VA_ARGS__, f32_to_u8_xyzw                          , SWS_PIXEL_F32, SWS_UOP_TO_U8           , 0xf)
#define SWS_FOR_STRUCT_F32_TO_U8(MACRO, ...) \
    MACRO(__VA_ARGS__, f32_to_u8_x                             , .type = SWS_PIXEL_F32, .uop = SWS_UOP_TO_U8           , .mask = 0x1) \
    MACRO(__VA_ARGS__, f32_to_u8_xy                            , .type = SWS_PIXEL_F32, .uop = SWS_UOP_TO_U8           , .mask = 0x3) \
    MACRO(__VA_ARGS__, f32_to_u8_xyz                           , .type = SWS_PIXEL_F32, .uop = SWS_UOP_TO_U8           , .mask = 0x7) \
    MACRO(__VA_ARGS__, f32_to_u8_xw                            , .type = SWS_PIXEL_F32, .uop = SWS_UOP_TO_U8           , .mask = 0x9) \
    MACRO(__VA_ARGS__, f32_to_u8_yzw                           , .type = SWS_PIXEL_F32, .uop = SWS_UOP_TO_U8           , .mask = 0xe) \
    MACRO(__VA_ARGS__, f32_to_u8_xyzw                          , .type = SWS_PIXEL_F32, .uop = SWS_UOP_TO_U8           , .mask = 0xf)
#define SWS_FOR_F32_TO_U16(MACRO, ...) \
    MACRO(__VA_ARGS__, f32_to_u16_x                            , SWS_PIXEL_F32, SWS_UOP_TO_U16          , 0x1) \
    MACRO(__VA_ARGS__, f32_to_u16_xy                           , SWS_PIXEL_F32, SWS_UOP_TO_U16          , 0x3) \
    MACRO(__VA_ARGS__, f32_to_u16_xyz                          , SWS_PIXEL_F32, SWS_UOP_TO_U16          , 0x7) \
    MACRO(__VA_ARGS__, f32_to_u16_xw                           , SWS_PIXEL_F32, SWS_UOP_TO_U16          , 0x9) \
    MACRO(__VA_ARGS__, f32_to_u16_yzw                          , SWS_PIXEL_F32, SWS_UOP_TO_U16          , 0xe) \
    MACRO(__VA_ARGS__, f32_to_u16_xyzw                         , SWS_PIXEL_F32, SWS_UOP_TO_U16          , 0xf)
#define SWS_FOR_STRUCT_F32_TO_U16(MACRO, ...) \
    MACRO(__VA_ARGS__, f32_to_u16_x                            , .type = SWS_PIXEL_F32, .uop = SWS_UOP_TO_U16          , .mask = 0x1) \
    MACRO(__VA_ARGS__, f32_to_u16_xy                           , .type = SWS_PIXEL_F32, .uop = SWS_UOP_TO_U16          , .mask = 0x3) \
    MACRO(__VA_ARGS__, f32_to_u16_xyz                          , .type = SWS_PIXEL_F32, .uop = SWS_UOP_TO_U16          , .mask = 0x7) \
    MACRO(__VA_ARGS__, f32_to_u16_xw                           , .type = SWS_PIXEL_F32, .uop = SWS_UOP_TO_U16          , .mask = 0x9) \
    MACRO(__VA_ARGS__, f32_to_u16_yzw                          , .type = SWS_PIXEL_F32, .uop = SWS_UOP_TO_U16          , .mask = 0xe) \
    MACRO(__VA_ARGS__, f32_to_u16_xyzw                         , .type = SWS_PIXEL_F32, .uop = SWS_UOP_TO_U16          , .mask = 0xf)
#define SWS_FOR_F32_TO_U32(MACRO, ...) \
    MACRO(__VA_ARGS__, f32_to_u32_x                            , SWS_PIXEL_F32, SWS_UOP_TO_U32          , 0x1) \
    MACRO(__VA_ARGS__, f32_to_u32_xyz                          , SWS_PIXEL_F32, SWS_UOP_TO_U32          , 0x7) \
    MACRO(__VA_ARGS__, f32_to_u32_xw                           , SWS_PIXEL_F32, SWS_UOP_TO_U32          , 0x9) \
    MACRO(__VA_ARGS__, f32_to_u32_yzw                          , SWS_PIXEL_F32, SWS_UOP_TO_U32          , 0xe) \
    MACRO(__VA_ARGS__, f32_to_u32_xyzw                         , SWS_PIXEL_F32, SWS_UOP_TO_U32          , 0xf)
#define SWS_FOR_STRUCT_F32_TO_U32(MACRO, ...) \
    MACRO(__VA_ARGS__, f32_to_u32_x                            , .type = SWS_PIXEL_F32, .uop = SWS_UOP_TO_U32          , .mask = 0x1) \
    MACRO(__VA_ARGS__, f32_to_u32_xyz                          , .type = SWS_PIXEL_F32, .uop = SWS_UOP_TO_U32          , .mask = 0x7) \
    MACRO(__VA_ARGS__, f32_to_u32_xw                           , .type = SWS_PIXEL_F32, .uop = SWS_UOP_TO_U32          , .mask = 0x9) \
    MACRO(__VA_ARGS__, f32_to_u32_yzw                          , .type = SWS_PIXEL_F32, .uop = SWS_UOP_TO_U32          , .mask = 0xe) \
    MACRO(__VA_ARGS__, f32_to_u32_xyzw                         , .type = SWS_PIXEL_F32, .uop = SWS_UOP_TO_U32          , .mask = 0xf)
#define SWS_FOR_F32_TO_F32(MACRO, ...)
#define SWS_FOR_STRUCT_F32_TO_F32(MACRO, ...)
#define SWS_FOR_F32_SCALE(MACRO, ...) \
    MACRO(__VA_ARGS__, f32_scale_x                             , SWS_PIXEL_F32, SWS_UOP_SCALE           , 0x1) \
    MACRO(__VA_ARGS__, f32_scale_xy                            , SWS_PIXEL_F32, SWS_UOP_SCALE           , 0x3) \
    MACRO(__VA_ARGS__, f32_scale_xyz                           , SWS_PIXEL_F32, SWS_UOP_SCALE           , 0x7) \
    MACRO(__VA_ARGS__, f32_scale_yzw                           , SWS_PIXEL_F32, SWS_UOP_SCALE           , 0xe) \
    MACRO(__VA_ARGS__, f32_scale_xyzw                          , SWS_PIXEL_F32, SWS_UOP_SCALE           , 0xf)
#define SWS_FOR_STRUCT_F32_SCALE(MACRO, ...) \
    MACRO(__VA_ARGS__, f32_scale_x                             , .type = SWS_PIXEL_F32, .uop = SWS_UOP_SCALE           , .mask = 0x1) \
    MACRO(__VA_ARGS__, f32_scale_xy                            , .type = SWS_PIXEL_F32, .uop = SWS_UOP_SCALE           , .mask = 0x3) \
    MACRO(__VA_ARGS__, f32_scale_xyz                           , .type = SWS_PIXEL_F32, .uop = SWS_UOP_SCALE           , .mask = 0x7) \
    MACRO(__VA_ARGS__, f32_scale_yzw                           , .type = SWS_PIXEL_F32, .uop = SWS_UOP_SCALE           , .mask = 0xe) \
    MACRO(__VA_ARGS__, f32_scale_xyzw                          , .type = SWS_PIXEL_F32, .uop = SWS_UOP_SCALE           , .mask = 0xf)
#define SWS_FOR_F32_ADD(MACRO, ...) \
    MACRO(__VA_ARGS__, f32_add_x                               , SWS_PIXEL_F32, SWS_UOP_ADD             , 0x1) \
    MACRO(__VA_ARGS__, f32_add_xy                              , SWS_PIXEL_F32, SWS_UOP_ADD             , 0x3) \
    MACRO(__VA_ARGS__, f32_add_xz                              , SWS_PIXEL_F32, SWS_UOP_ADD             , 0x5) \
    MACRO(__VA_ARGS__, f32_add_xyz                             , SWS_PIXEL_F32, SWS_UOP_ADD             , 0x7) \
    MACRO(__VA_ARGS__, f32_add_w                               , SWS_PIXEL_F32, SWS_UOP_ADD             , 0x8) \
    MACRO(__VA_ARGS__, f32_add_xw                              , SWS_PIXEL_F32, SWS_UOP_ADD             , 0x9) \
    MACRO(__VA_ARGS__, f32_add_yzw                             , SWS_PIXEL_F32, SWS_UOP_ADD             , 0xe) \
    MACRO(__VA_ARGS__, f32_add_xyzw                            , SWS_PIXEL_F32, SWS_UOP_ADD             , 0xf)
#define SWS_FOR_STRUCT_F32_ADD(MACRO, ...) \
    MACRO(__VA_ARGS__, f32_add_x                               , .type = SWS_PIXEL_F32, .uop = SWS_UOP_ADD             , .mask = 0x1) \
    MACRO(__VA_ARGS__, f32_add_xy                              , .type = SWS_PIXEL_F32, .uop = SWS_UOP_ADD             , .mask = 0x3) \
    MACRO(__VA_ARGS__, f32_add_xz                              , .type = SWS_PIXEL_F32, .uop = SWS_UOP_ADD             , .mask = 0x5) \
    MACRO(__VA_ARGS__, f32_add_xyz                             , .type = SWS_PIXEL_F32, .uop = SWS_UOP_ADD             , .mask = 0x7) \
    MACRO(__VA_ARGS__, f32_add_w                               , .type = SWS_PIXEL_F32, .uop = SWS_UOP_ADD             , .mask = 0x8) \
    MACRO(__VA_ARGS__, f32_add_xw                              , .type = SWS_PIXEL_F32, .uop = SWS_UOP_ADD             , .mask = 0x9) \
    MACRO(__VA_ARGS__, f32_add_yzw                             , .type = SWS_PIXEL_F32, .uop = SWS_UOP_ADD             , .mask = 0xe) \
    MACRO(__VA_ARGS__, f32_add_xyzw                            , .type = SWS_PIXEL_F32, .uop = SWS_UOP_ADD             , .mask = 0xf)
#define SWS_FOR_F32_MIN(MACRO, ...) \
    MACRO(__VA_ARGS__, f32_min_x                               , SWS_PIXEL_F32, SWS_UOP_MIN             , 0x1) \
    MACRO(__VA_ARGS__, f32_min_xy                              , SWS_PIXEL_F32, SWS_UOP_MIN             , 0x3) \
    MACRO(__VA_ARGS__, f32_min_xyz                             , SWS_PIXEL_F32, SWS_UOP_MIN             , 0x7) \
    MACRO(__VA_ARGS__, f32_min_xw                              , SWS_PIXEL_F32, SWS_UOP_MIN             , 0x9) \
    MACRO(__VA_ARGS__, f32_min_yzw                             , SWS_PIXEL_F32, SWS_UOP_MIN             , 0xe) \
    MACRO(__VA_ARGS__, f32_min_xyzw                            , SWS_PIXEL_F32, SWS_UOP_MIN             , 0xf)
#define SWS_FOR_STRUCT_F32_MIN(MACRO, ...) \
    MACRO(__VA_ARGS__, f32_min_x                               , .type = SWS_PIXEL_F32, .uop = SWS_UOP_MIN             , .mask = 0x1) \
    MACRO(__VA_ARGS__, f32_min_xy                              , .type = SWS_PIXEL_F32, .uop = SWS_UOP_MIN             , .mask = 0x3) \
    MACRO(__VA_ARGS__, f32_min_xyz                             , .type = SWS_PIXEL_F32, .uop = SWS_UOP_MIN             , .mask = 0x7) \
    MACRO(__VA_ARGS__, f32_min_xw                              , .type = SWS_PIXEL_F32, .uop = SWS_UOP_MIN             , .mask = 0x9) \
    MACRO(__VA_ARGS__, f32_min_yzw                             , .type = SWS_PIXEL_F32, .uop = SWS_UOP_MIN             , .mask = 0xe) \
    MACRO(__VA_ARGS__, f32_min_xyzw                            , .type = SWS_PIXEL_F32, .uop = SWS_UOP_MIN             , .mask = 0xf)
#define SWS_FOR_F32_MAX(MACRO, ...) \
    MACRO(__VA_ARGS__, f32_max_x                               , SWS_PIXEL_F32, SWS_UOP_MAX             , 0x1) \
    MACRO(__VA_ARGS__, f32_max_xy                              , SWS_PIXEL_F32, SWS_UOP_MAX             , 0x3) \
    MACRO(__VA_ARGS__, f32_max_xyz                             , SWS_PIXEL_F32, SWS_UOP_MAX             , 0x7) \
    MACRO(__VA_ARGS__, f32_max_xw                              , SWS_PIXEL_F32, SWS_UOP_MAX             , 0x9) \
    MACRO(__VA_ARGS__, f32_max_xyzw                            , SWS_PIXEL_F32, SWS_UOP_MAX             , 0xf)
#define SWS_FOR_STRUCT_F32_MAX(MACRO, ...) \
    MACRO(__VA_ARGS__, f32_max_x                               , .type = SWS_PIXEL_F32, .uop = SWS_UOP_MAX             , .mask = 0x1) \
    MACRO(__VA_ARGS__, f32_max_xy                              , .type = SWS_PIXEL_F32, .uop = SWS_UOP_MAX             , .mask = 0x3) \
    MACRO(__VA_ARGS__, f32_max_xyz                             , .type = SWS_PIXEL_F32, .uop = SWS_UOP_MAX             , .mask = 0x7) \
    MACRO(__VA_ARGS__, f32_max_xw                              , .type = SWS_PIXEL_F32, .uop = SWS_UOP_MAX             , .mask = 0x9) \
    MACRO(__VA_ARGS__, f32_max_xyzw                            , .type = SWS_PIXEL_F32, .uop = SWS_UOP_MAX             , .mask = 0xf)
#define SWS_FOR_F32_UNPACK(MACRO, ...)
#define SWS_FOR_STRUCT_F32_UNPACK(MACRO, ...)
#define SWS_FOR_F32_PACK(MACRO, ...)
#define SWS_FOR_STRUCT_F32_PACK(MACRO, ...)
#define SWS_FOR_F32_LSHIFT(MACRO, ...)
#define SWS_FOR_STRUCT_F32_LSHIFT(MACRO, ...)
#define SWS_FOR_F32_RSHIFT(MACRO, ...)
#define SWS_FOR_STRUCT_F32_RSHIFT(MACRO, ...)
#define SWS_FOR_F32_CLEAR(MACRO, ...)
#define SWS_FOR_STRUCT_F32_CLEAR(MACRO, ...)
#define SWS_FOR_F32_LINEAR(MACRO, ...) \
    MACRO(__VA_ARGS__, f32_linear_x_x000x                      , SWS_PIXEL_F32, SWS_UOP_LINEAR          , 0x1, 0x41040, 0xbefae) \
    MACRO(__VA_ARGS__, f32_linear_x_xxx00                      , SWS_PIXEL_F32, SWS_UOP_LINEAR          , 0x1, 0x41040, 0xbefb8) \
    MACRO(__VA_ARGS__, f32_linear_x_xxx01                      , SWS_PIXEL_F32, SWS_UOP_LINEAR          , 0x1, 0x41050, 0xbefa8) \
    MACRO(__VA_ARGS__, f32_linear_x_x0001                      , SWS_PIXEL_F32, SWS_UOP_LINEAR          , 0x1, 0x41050, 0xbefae) \
    MACRO(__VA_ARGS__, f32_linear_y_0x000                      , SWS_PIXEL_F32, SWS_UOP_LINEAR          , 0x2, 0x41001, 0xbefbe) \
    MACRO(__VA_ARGS__, f32_linear_xyz_xxx0x_xxx0x_xxx0x        , SWS_PIXEL_F32, SWS_UOP_LINEAR          , 0x7, 0x40000, 0xba108) \
    MACRO(__VA_ARGS__, f32_linear_xyz_x0x0x_xxx0x_xx00x        , SWS_PIXEL_F32, SWS_UOP_LINEAR          , 0x7, 0x40000, 0xbb10a) \
    MACRO(__VA_ARGS__, f32_linear_xyz_xxx00_xxx0x_xxx0x        , SWS_PIXEL_F32, SWS_UOP_LINEAR          , 0x7, 0x40000, 0xba118) \
    MACRO(__VA_ARGS__, f32_linear_xyz_x000x_0x00x_00x0x        , SWS_PIXEL_F32, SWS_UOP_LINEAR          , 0x7, 0x40000, 0xbadae) \
    MACRO(__VA_ARGS__, f32_linear_xyz_x0000_0x000_00x00        , SWS_PIXEL_F32, SWS_UOP_LINEAR          , 0x7, 0x40000, 0xbefbe) \
    MACRO(__VA_ARGS__, f32_linear_xyz_x0001_0x00x_00x01        , SWS_PIXEL_F32, SWS_UOP_LINEAR          , 0x7, 0x44010, 0xbadae) \
    MACRO(__VA_ARGS__, f32_linear_xyz_x0001_0x001_00x01        , SWS_PIXEL_F32, SWS_UOP_LINEAR          , 0x7, 0x44210, 0xbadae) \
    MACRO(__VA_ARGS__, f32_linear_xyz_10x0x_1xx0x_1x00x        , SWS_PIXEL_F32, SWS_UOP_LINEAR          , 0x7, 0x40421, 0xbb10a) \
    MACRO(__VA_ARGS__, f32_linear_w_000x0                      , SWS_PIXEL_F32, SWS_UOP_LINEAR          , 0x8, 0x01041, 0xbefbe) \
    MACRO(__VA_ARGS__, f32_linear_xw_x000x_000x0               , SWS_PIXEL_F32, SWS_UOP_LINEAR          , 0x9, 0x01040, 0xbefae) \
    MACRO(__VA_ARGS__, f32_linear_xw_xxx00_000x0               , SWS_PIXEL_F32, SWS_UOP_LINEAR          , 0x9, 0x01040, 0xbefb8) \
    MACRO(__VA_ARGS__, f32_linear_xyzw_xxx0x_xxx0x_xxx0x_000x0 , SWS_PIXEL_F32, SWS_UOP_LINEAR          , 0xf, 0x00000, 0xba108) \
    MACRO(__VA_ARGS__, f32_linear_xyzw_x0x0x_xxx0x_xx00x_000x0 , SWS_PIXEL_F32, SWS_UOP_LINEAR          , 0xf, 0x00000, 0xbb10a) \
    MACRO(__VA_ARGS__, f32_linear_xyzw_x0000_0x000_00x00_000x0 , SWS_PIXEL_F32, SWS_UOP_LINEAR          , 0xf, 0x00000, 0xbefbe)
#define SWS_FOR_STRUCT_F32_LINEAR(MACRO, ...) \
    MACRO(__VA_ARGS__, f32_linear_x_x000x                      , .type = SWS_PIXEL_F32, .uop = SWS_UOP_LINEAR          , .mask = 0x1, .par.lin.one = 0x41040, .par.lin.zero = 0xbefae) \
    MACRO(__VA_ARGS__, f32_linear_x_xxx00                      , .type = SWS_PIXEL_F32, .uop = SWS_UOP_LINEAR          , .mask = 0x1, .par.lin.one = 0x41040, .par.lin.zero = 0xbefb8) \
    MACRO(__VA_ARGS__, f32_linear_x_xxx01                      , .type = SWS_PIXEL_F32, .uop = SWS_UOP_LINEAR          , .mask = 0x1, .par.lin.one = 0x41050, .par.lin.zero = 0xbefa8) \
    MACRO(__VA_ARGS__, f32_linear_x_x0001                      , .type = SWS_PIXEL_F32, .uop = SWS_UOP_LINEAR          , .mask = 0x1, .par.lin.one = 0x41050, .par.lin.zero = 0xbefae) \
    MACRO(__VA_ARGS__, f32_linear_y_0x000                      , .type = SWS_PIXEL_F32, .uop = SWS_UOP_LINEAR          , .mask = 0x2, .par.lin.one = 0x41001, .par.lin.zero = 0xbefbe) \
    MACRO(__VA_ARGS__, f32_linear_xyz_xxx0x_xxx0x_xxx0x        , .type = SWS_PIXEL_F32, .uop = SWS_UOP_LINEAR          , .mask = 0x7, .par.lin.one = 0x40000, .par.lin.zero = 0xba108) \
    MACRO(__VA_ARGS__, f32_linear_xyz_x0x0x_xxx0x_xx00x        , .type = SWS_PIXEL_F32, .uop = SWS_UOP_LINEAR          , .mask = 0x7, .par.lin.one = 0x40000, .par.lin.zero = 0xbb10a) \
    MACRO(__VA_ARGS__, f32_linear_xyz_xxx00_xxx0x_xxx0x        , .type = SWS_PIXEL_F32, .uop = SWS_UOP_LINEAR          , .mask = 0x7, .par.lin.one = 0x40000, .par.lin.zero = 0xba118) \
    MACRO(__VA_ARGS__, f32_linear_xyz_x000x_0x00x_00x0x        , .type = SWS_PIXEL_F32, .uop = SWS_UOP_LINEAR          , .mask = 0x7, .par.lin.one = 0x40000, .par.lin.zero = 0xbadae) \
    MACRO(__VA_ARGS__, f32_linear_xyz_x0000_0x000_00x00        , .type = SWS_PIXEL_F32, .uop = SWS_UOP_LINEAR          , .mask = 0x7, .par.lin.one = 0x40000, .par.lin.zero = 0xbefbe) \
    MACRO(__VA_ARGS__, f32_linear_xyz_x0001_0x00x_00x01        , .type = SWS_PIXEL_F32, .uop = SWS_UOP_LINEAR          , .mask = 0x7, .par.lin.one = 0x44010, .par.lin.zero = 0xbadae) \
    MACRO(__VA_ARGS__, f32_linear_xyz_x0001_0x001_00x01        , .type = SWS_PIXEL_F32, .uop = SWS_UOP_LINEAR          , .mask = 0x7, .par.lin.one = 0x44210, .par.lin.zero = 0xbadae) \
    MACRO(__VA_ARGS__, f32_linear_xyz_10x0x_1xx0x_1x00x        , .type = SWS_PIXEL_F32, .uop = SWS_UOP_LINEAR          , .mask = 0x7, .par.lin.one = 0x40421, .par.lin.zero = 0xbb10a) \
    MACRO(__VA_ARGS__, f32_linear_w_000x0                      , .type = SWS_PIXEL_F32, .uop = SWS_UOP_LINEAR          , .mask = 0x8, .par.lin.one = 0x1041, .par.lin.zero = 0xbefbe) \
    MACRO(__VA_ARGS__, f32_linear_xw_x000x_000x0               , .type = SWS_PIXEL_F32, .uop = SWS_UOP_LINEAR          , .mask = 0x9, .par.lin.one = 0x1040, .par.lin.zero = 0xbefae) \
    MACRO(__VA_ARGS__, f32_linear_xw_xxx00_000x0               , .type = SWS_PIXEL_F32, .uop = SWS_UOP_LINEAR          , .mask = 0x9, .par.lin.one = 0x1040, .par.lin.zero = 0xbefb8) \
    MACRO(__VA_ARGS__, f32_linear_xyzw_xxx0x_xxx0x_xxx0x_000x0 , .type = SWS_PIXEL_F32, .uop = SWS_UOP_LINEAR          , .mask = 0xf, .par.lin.one = 0x0, .par.lin.zero = 0xba108) \
    MACRO(__VA_ARGS__, f32_linear_xyzw_x0x0x_xxx0x_xx00x_000x0 , .type = SWS_PIXEL_F32, .uop = SWS_UOP_LINEAR          , .mask = 0xf, .par.lin.one = 0x0, .par.lin.zero = 0xbb10a) \
    MACRO(__VA_ARGS__, f32_linear_xyzw_x0000_0x000_00x00_000x0 , .type = SWS_PIXEL_F32, .uop = SWS_UOP_LINEAR          , .mask = 0xf, .par.lin.one = 0x0, .par.lin.zero = 0xbefbe)
#define SWS_FOR_F32_LINEAR_FMA(MACRO, ...) \
    MACRO(__VA_ARGS__, f32_linear_fma_x_x000x                  , SWS_PIXEL_F32, SWS_UOP_LINEAR_FMA      , 0x1, 0x41040, 0xbefae, 0xfffee) \
    MACRO(__VA_ARGS__, f32_linear_fma_x_X000x                  , SWS_PIXEL_F32, SWS_UOP_LINEAR_FMA      , 0x1, 0x41040, 0xbefae, 0xfffef) \
    MACRO(__VA_ARGS__, f32_linear_fma_x_xxx00                  , SWS_PIXEL_F32, SWS_UOP_LINEAR_FMA      , 0x1, 0x41040, 0xbefb8, 0xffff8) \
    MACRO(__VA_ARGS__, f32_linear_fma_x_XXx00                  , SWS_PIXEL_F32, SWS_UOP_LINEAR_FMA      , 0x1, 0x41040, 0xbefb8, 0xffffb) \
    MACRO(__VA_ARGS__, f32_linear_fma_x_XxX00                  , SWS_PIXEL_F32, SWS_UOP_LINEAR_FMA      , 0x1, 0x41040, 0xbefb8, 0xffffd) \
    MACRO(__VA_ARGS__, f32_linear_fma_x_xXX00                  , SWS_PIXEL_F32, SWS_UOP_LINEAR_FMA      , 0x1, 0x41040, 0xbefb8, 0xffffe) \
    MACRO(__VA_ARGS__, f32_linear_fma_x_XXX00                  , SWS_PIXEL_F32, SWS_UOP_LINEAR_FMA      , 0x1, 0x41040, 0xbefb8, 0xfffff) \
    MACRO(__VA_ARGS__, f32_linear_fma_x_xxx01                  , SWS_PIXEL_F32, SWS_UOP_LINEAR_FMA      , 0x1, 0x41050, 0xbefa8, 0xffff8) \
    MACRO(__VA_ARGS__, f32_linear_fma_x_XXx01                  , SWS_PIXEL_F32, SWS_UOP_LINEAR_FMA      , 0x1, 0x41050, 0xbefa8, 0xffffb) \
    MACRO(__VA_ARGS__, f32_linear_fma_x_xXX01                  , SWS_PIXEL_F32, SWS_UOP_LINEAR_FMA      , 0x1, 0x41050, 0xbefa8, 0xffffe) \
    MACRO(__VA_ARGS__, f32_linear_fma_x_XXX01                  , SWS_PIXEL_F32, SWS_UOP_LINEAR_FMA      , 0x1, 0x41050, 0xbefa8, 0xfffff) \
    MACRO(__VA_ARGS__, f32_linear_fma_x_x0001                  , SWS_PIXEL_F32, SWS_UOP_LINEAR_FMA      , 0x1, 0x41050, 0xbefae, 0xffffe) \
    MACRO(__VA_ARGS__, f32_linear_fma_x_X0001                  , SWS_PIXEL_F32, SWS_UOP_LINEAR_FMA      , 0x1, 0x41050, 0xbefae, 0xfffff) \
    MACRO(__VA_ARGS__, f32_linear_fma_y_0x000                  , SWS_PIXEL_F32, SWS_UOP_LINEAR_FMA      , 0x2, 0x41001, 0xbefbe, 0xfffbf) \
    MACRO(__VA_ARGS__, f32_linear_fma_y_0X000                  , SWS_PIXEL_F32, SWS_UOP_LINEAR_FMA      , 0x2, 0x41001, 0xbefbe, 0xfffff) \
    MACRO(__VA_ARGS__, f32_linear_fma_xyz_xxx0x_xxx0x_xxx0x    , SWS_PIXEL_F32, SWS_UOP_LINEAR_FMA      , 0x7, 0x40000, 0xba108, 0xfa108) \
    MACRO(__VA_ARGS__, f32_linear_fma_xyz_XXx0x_XXx0x_XXx0x    , SWS_PIXEL_F32, SWS_UOP_LINEAR_FMA      , 0x7, 0x40000, 0xba108, 0xfad6b) \
    MACRO(__VA_ARGS__, f32_linear_fma_xyz_XXX0x_XxX0x_XXX0x    , SWS_PIXEL_F32, SWS_UOP_LINEAR_FMA      , 0x7, 0x40000, 0xba108, 0xfbdaf) \
    MACRO(__VA_ARGS__, f32_linear_fma_xyz_xXX0x_xXX0x_xXX0x    , SWS_PIXEL_F32, SWS_UOP_LINEAR_FMA      , 0x7, 0x40000, 0xba108, 0xfb9ce) \
    MACRO(__VA_ARGS__, f32_linear_fma_xyz_XXX0x_XXX0x_XXX0x    , SWS_PIXEL_F32, SWS_UOP_LINEAR_FMA      , 0x7, 0x40000, 0xba108, 0xfbdef) \
    MACRO(__VA_ARGS__, f32_linear_fma_xyz_x0x0x_xxx0x_xx00x    , SWS_PIXEL_F32, SWS_UOP_LINEAR_FMA      , 0x7, 0x40000, 0xbb10a, 0xfb10a) \
    MACRO(__VA_ARGS__, f32_linear_fma_xyz_X0X0x_XXX0x_XX00x    , SWS_PIXEL_F32, SWS_UOP_LINEAR_FMA      , 0x7, 0x40000, 0xbb10a, 0xfbdef) \
    MACRO(__VA_ARGS__, f32_linear_fma_xyz_xxx00_xxx0x_xxx0x    , SWS_PIXEL_F32, SWS_UOP_LINEAR_FMA      , 0x7, 0x40000, 0xba118, 0xfa118) \
    MACRO(__VA_ARGS__, f32_linear_fma_xyz_XXx00_XXx0x_XXx0x    , SWS_PIXEL_F32, SWS_UOP_LINEAR_FMA      , 0x7, 0x40000, 0xba118, 0xfad7b) \
    MACRO(__VA_ARGS__, f32_linear_fma_xyz_XXX00_XxX0x_XXX0x    , SWS_PIXEL_F32, SWS_UOP_LINEAR_FMA      , 0x7, 0x40000, 0xba118, 0xfbdbf) \
    MACRO(__VA_ARGS__, f32_linear_fma_xyz_xXX00_xXX0x_xXX0x    , SWS_PIXEL_F32, SWS_UOP_LINEAR_FMA      , 0x7, 0x40000, 0xba118, 0xfb9de) \
    MACRO(__VA_ARGS__, f32_linear_fma_xyz_XXX00_XXX0x_XXX0x    , SWS_PIXEL_F32, SWS_UOP_LINEAR_FMA      , 0x7, 0x40000, 0xba118, 0xfbdff) \
    MACRO(__VA_ARGS__, f32_linear_fma_xyz_x000x_0x00x_00x0x    , SWS_PIXEL_F32, SWS_UOP_LINEAR_FMA      , 0x7, 0x40000, 0xbadae, 0xfadae) \
    MACRO(__VA_ARGS__, f32_linear_fma_xyz_X000x_0X00x_00X0x    , SWS_PIXEL_F32, SWS_UOP_LINEAR_FMA      , 0x7, 0x40000, 0xbadae, 0xfbdef) \
    MACRO(__VA_ARGS__, f32_linear_fma_xyz_x0000_0x000_00x00    , SWS_PIXEL_F32, SWS_UOP_LINEAR_FMA      , 0x7, 0x40000, 0xbefbe, 0xfefbe) \
    MACRO(__VA_ARGS__, f32_linear_fma_xyz_x0000_0X000_00X00    , SWS_PIXEL_F32, SWS_UOP_LINEAR_FMA      , 0x7, 0x40000, 0xbefbe, 0xffffe) \
    MACRO(__VA_ARGS__, f32_linear_fma_xyz_X0000_0X000_00x00    , SWS_PIXEL_F32, SWS_UOP_LINEAR_FMA      , 0x7, 0x40000, 0xbefbe, 0xfefff) \
    MACRO(__VA_ARGS__, f32_linear_fma_xyz_X0000_0X000_00X00    , SWS_PIXEL_F32, SWS_UOP_LINEAR_FMA      , 0x7, 0x40000, 0xbefbe, 0xfffff) \
    MACRO(__VA_ARGS__, f32_linear_fma_xyz_X0001_0X00x_00X01    , SWS_PIXEL_F32, SWS_UOP_LINEAR_FMA      , 0x7, 0x44010, 0xbadae, 0xffdff) \
    MACRO(__VA_ARGS__, f32_linear_fma_xyz_X0001_0X001_00X01    , SWS_PIXEL_F32, SWS_UOP_LINEAR_FMA      , 0x7, 0x44210, 0xbadae, 0xfffff) \
    MACRO(__VA_ARGS__, f32_linear_fma_xyz_10X0x_1XX0x_1X00x    , SWS_PIXEL_F32, SWS_UOP_LINEAR_FMA      , 0x7, 0x40421, 0xbb10a, 0xfbdef) \
    MACRO(__VA_ARGS__, f32_linear_fma_w_000X0                  , SWS_PIXEL_F32, SWS_UOP_LINEAR_FMA      , 0x8, 0x01041, 0xbefbe, 0xfffff) \
    MACRO(__VA_ARGS__, f32_linear_fma_xw_x000x_000x0           , SWS_PIXEL_F32, SWS_UOP_LINEAR_FMA      , 0x9, 0x01040, 0xbefae, 0xbffee) \
    MACRO(__VA_ARGS__, f32_linear_fma_xw_X000x_000X0           , SWS_PIXEL_F32, SWS_UOP_LINEAR_FMA      , 0x9, 0x01040, 0xbefae, 0xfffef) \
    MACRO(__VA_ARGS__, f32_linear_fma_xw_xxx00_000x0           , SWS_PIXEL_F32, SWS_UOP_LINEAR_FMA      , 0x9, 0x01040, 0xbefb8, 0xbfff8) \
    MACRO(__VA_ARGS__, f32_linear_fma_xw_XXX00_000X0           , SWS_PIXEL_F32, SWS_UOP_LINEAR_FMA      , 0x9, 0x01040, 0xbefb8, 0xfffff) \
    MACRO(__VA_ARGS__, f32_linear_fma_xyzw_xxx0x_xxx0x_xxx0x_000x0, SWS_PIXEL_F32, SWS_UOP_LINEAR_FMA      , 0xf, 0x00000, 0xba108, 0xba108) \
    MACRO(__VA_ARGS__, f32_linear_fma_xyzw_XXX0x_XXX0x_XXX0x_000X0, SWS_PIXEL_F32, SWS_UOP_LINEAR_FMA      , 0xf, 0x00000, 0xba108, 0xfbdef) \
    MACRO(__VA_ARGS__, f32_linear_fma_xyzw_X0X0x_XXX0x_XX00x_000X0, SWS_PIXEL_F32, SWS_UOP_LINEAR_FMA      , 0xf, 0x00000, 0xbb10a, 0xfbdef) \
    MACRO(__VA_ARGS__, f32_linear_fma_xyzw_X0000_0X000_00X00_000X0, SWS_PIXEL_F32, SWS_UOP_LINEAR_FMA      , 0xf, 0x00000, 0xbefbe, 0xfffff)
#define SWS_FOR_STRUCT_F32_LINEAR_FMA(MACRO, ...) \
    MACRO(__VA_ARGS__, f32_linear_fma_x_x000x                  , .type = SWS_PIXEL_F32, .uop = SWS_UOP_LINEAR_FMA      , .mask = 0x1, .par.lin.one = 0x41040, .par.lin.zero = 0xbefae, .par.lin.exact = 0xfffee) \
    MACRO(__VA_ARGS__, f32_linear_fma_x_X000x                  , .type = SWS_PIXEL_F32, .uop = SWS_UOP_LINEAR_FMA      , .mask = 0x1, .par.lin.one = 0x41040, .par.lin.zero = 0xbefae, .par.lin.exact = 0xfffef) \
    MACRO(__VA_ARGS__, f32_linear_fma_x_xxx00                  , .type = SWS_PIXEL_F32, .uop = SWS_UOP_LINEAR_FMA      , .mask = 0x1, .par.lin.one = 0x41040, .par.lin.zero = 0xbefb8, .par.lin.exact = 0xffff8) \
    MACRO(__VA_ARGS__, f32_linear_fma_x_XXx00                  , .type = SWS_PIXEL_F32, .uop = SWS_UOP_LINEAR_FMA      , .mask = 0x1, .par.lin.one = 0x41040, .par.lin.zero = 0xbefb8, .par.lin.exact = 0xffffb) \
    MACRO(__VA_ARGS__, f32_linear_fma_x_XxX00                  , .type = SWS_PIXEL_F32, .uop = SWS_UOP_LINEAR_FMA      , .mask = 0x1, .par.lin.one = 0x41040, .par.lin.zero = 0xbefb8, .par.lin.exact = 0xffffd) \
    MACRO(__VA_ARGS__, f32_linear_fma_x_xXX00                  , .type = SWS_PIXEL_F32, .uop = SWS_UOP_LINEAR_FMA      , .mask = 0x1, .par.lin.one = 0x41040, .par.lin.zero = 0xbefb8, .par.lin.exact = 0xffffe) \
    MACRO(__VA_ARGS__, f32_linear_fma_x_XXX00                  , .type = SWS_PIXEL_F32, .uop = SWS_UOP_LINEAR_FMA      , .mask = 0x1, .par.lin.one = 0x41040, .par.lin.zero = 0xbefb8, .par.lin.exact = 0xfffff) \
    MACRO(__VA_ARGS__, f32_linear_fma_x_xxx01                  , .type = SWS_PIXEL_F32, .uop = SWS_UOP_LINEAR_FMA      , .mask = 0x1, .par.lin.one = 0x41050, .par.lin.zero = 0xbefa8, .par.lin.exact = 0xffff8) \
    MACRO(__VA_ARGS__, f32_linear_fma_x_XXx01                  , .type = SWS_PIXEL_F32, .uop = SWS_UOP_LINEAR_FMA      , .mask = 0x1, .par.lin.one = 0x41050, .par.lin.zero = 0xbefa8, .par.lin.exact = 0xffffb) \
    MACRO(__VA_ARGS__, f32_linear_fma_x_xXX01                  , .type = SWS_PIXEL_F32, .uop = SWS_UOP_LINEAR_FMA      , .mask = 0x1, .par.lin.one = 0x41050, .par.lin.zero = 0xbefa8, .par.lin.exact = 0xffffe) \
    MACRO(__VA_ARGS__, f32_linear_fma_x_XXX01                  , .type = SWS_PIXEL_F32, .uop = SWS_UOP_LINEAR_FMA      , .mask = 0x1, .par.lin.one = 0x41050, .par.lin.zero = 0xbefa8, .par.lin.exact = 0xfffff) \
    MACRO(__VA_ARGS__, f32_linear_fma_x_x0001                  , .type = SWS_PIXEL_F32, .uop = SWS_UOP_LINEAR_FMA      , .mask = 0x1, .par.lin.one = 0x41050, .par.lin.zero = 0xbefae, .par.lin.exact = 0xffffe) \
    MACRO(__VA_ARGS__, f32_linear_fma_x_X0001                  , .type = SWS_PIXEL_F32, .uop = SWS_UOP_LINEAR_FMA      , .mask = 0x1, .par.lin.one = 0x41050, .par.lin.zero = 0xbefae, .par.lin.exact = 0xfffff) \
    MACRO(__VA_ARGS__, f32_linear_fma_y_0x000                  , .type = SWS_PIXEL_F32, .uop = SWS_UOP_LINEAR_FMA      , .mask = 0x2, .par.lin.one = 0x41001, .par.lin.zero = 0xbefbe, .par.lin.exact = 0xfffbf) \
    MACRO(__VA_ARGS__, f32_linear_fma_y_0X000                  , .type = SWS_PIXEL_F32, .uop = SWS_UOP_LINEAR_FMA      , .mask = 0x2, .par.lin.one = 0x41001, .par.lin.zero = 0xbefbe, .par.lin.exact = 0xfffff) \
    MACRO(__VA_ARGS__, f32_linear_fma_xyz_xxx0x_xxx0x_xxx0x    , .type = SWS_PIXEL_F32, .uop = SWS_UOP_LINEAR_FMA      , .mask = 0x7, .par.lin.one = 0x40000, .par.lin.zero = 0xba108, .par.lin.exact = 0xfa108) \
    MACRO(__VA_ARGS__, f32_linear_fma_xyz_XXx0x_XXx0x_XXx0x    , .type = SWS_PIXEL_F32, .uop = SWS_UOP_LINEAR_FMA      , .mask = 0x7, .par.lin.one = 0x40000, .par.lin.zero = 0xba108, .par.lin.exact = 0xfad6b) \
    MACRO(__VA_ARGS__, f32_linear_fma_xyz_XXX0x_XxX0x_XXX0x    , .type = SWS_PIXEL_F32, .uop = SWS_UOP_LINEAR_FMA      , .mask = 0x7, .par.lin.one = 0x40000, .par.lin.zero = 0xba108, .par.lin.exact = 0xfbdaf) \
    MACRO(__VA_ARGS__, f32_linear_fma_xyz_xXX0x_xXX0x_xXX0x    , .type = SWS_PIXEL_F32, .uop = SWS_UOP_LINEAR_FMA      , .mask = 0x7, .par.lin.one = 0x40000, .par.lin.zero = 0xba108, .par.lin.exact = 0xfb9ce) \
    MACRO(__VA_ARGS__, f32_linear_fma_xyz_XXX0x_XXX0x_XXX0x    , .type = SWS_PIXEL_F32, .uop = SWS_UOP_LINEAR_FMA      , .mask = 0x7, .par.lin.one = 0x40000, .par.lin.zero = 0xba108, .par.lin.exact = 0xfbdef) \
    MACRO(__VA_ARGS__, f32_linear_fma_xyz_x0x0x_xxx0x_xx00x    , .type = SWS_PIXEL_F32, .uop = SWS_UOP_LINEAR_FMA      , .mask = 0x7, .par.lin.one = 0x40000, .par.lin.zero = 0xbb10a, .par.lin.exact = 0xfb10a) \
    MACRO(__VA_ARGS__, f32_linear_fma_xyz_X0X0x_XXX0x_XX00x    , .type = SWS_PIXEL_F32, .uop = SWS_UOP_LINEAR_FMA      , .mask = 0x7, .par.lin.one = 0x40000, .par.lin.zero = 0xbb10a, .par.lin.exact = 0xfbdef) \
    MACRO(__VA_ARGS__, f32_linear_fma_xyz_xxx00_xxx0x_xxx0x    , .type = SWS_PIXEL_F32, .uop = SWS_UOP_LINEAR_FMA      , .mask = 0x7, .par.lin.one = 0x40000, .par.lin.zero = 0xba118, .par.lin.exact = 0xfa118) \
    MACRO(__VA_ARGS__, f32_linear_fma_xyz_XXx00_XXx0x_XXx0x    , .type = SWS_PIXEL_F32, .uop = SWS_UOP_LINEAR_FMA      , .mask = 0x7, .par.lin.one = 0x40000, .par.lin.zero = 0xba118, .par.lin.exact = 0xfad7b) \
    MACRO(__VA_ARGS__, f32_linear_fma_xyz_XXX00_XxX0x_XXX0x    , .type = SWS_PIXEL_F32, .uop = SWS_UOP_LINEAR_FMA      , .mask = 0x7, .par.lin.one = 0x40000, .par.lin.zero = 0xba118, .par.lin.exact = 0xfbdbf) \
    MACRO(__VA_ARGS__, f32_linear_fma_xyz_xXX00_xXX0x_xXX0x    , .type = SWS_PIXEL_F32, .uop = SWS_UOP_LINEAR_FMA      , .mask = 0x7, .par.lin.one = 0x40000, .par.lin.zero = 0xba118, .par.lin.exact = 0xfb9de) \
    MACRO(__VA_ARGS__, f32_linear_fma_xyz_XXX00_XXX0x_XXX0x    , .type = SWS_PIXEL_F32, .uop = SWS_UOP_LINEAR_FMA      , .mask = 0x7, .par.lin.one = 0x40000, .par.lin.zero = 0xba118, .par.lin.exact = 0xfbdff) \
    MACRO(__VA_ARGS__, f32_linear_fma_xyz_x000x_0x00x_00x0x    , .type = SWS_PIXEL_F32, .uop = SWS_UOP_LINEAR_FMA      , .mask = 0x7, .par.lin.one = 0x40000, .par.lin.zero = 0xbadae, .par.lin.exact = 0xfadae) \
    MACRO(__VA_ARGS__, f32_linear_fma_xyz_X000x_0X00x_00X0x    , .type = SWS_PIXEL_F32, .uop = SWS_UOP_LINEAR_FMA      , .mask = 0x7, .par.lin.one = 0x40000, .par.lin.zero = 0xbadae, .par.lin.exact = 0xfbdef) \
    MACRO(__VA_ARGS__, f32_linear_fma_xyz_x0000_0x000_00x00    , .type = SWS_PIXEL_F32, .uop = SWS_UOP_LINEAR_FMA      , .mask = 0x7, .par.lin.one = 0x40000, .par.lin.zero = 0xbefbe, .par.lin.exact = 0xfefbe) \
    MACRO(__VA_ARGS__, f32_linear_fma_xyz_x0000_0X000_00X00    , .type = SWS_PIXEL_F32, .uop = SWS_UOP_LINEAR_FMA      , .mask = 0x7, .par.lin.one = 0x40000, .par.lin.zero = 0xbefbe, .par.lin.exact = 0xffffe) \
    MACRO(__VA_ARGS__, f32_linear_fma_xyz_X0000_0X000_00x00    , .type = SWS_PIXEL_F32, .uop = SWS_UOP_LINEAR_FMA      , .mask = 0x7, .par.lin.one = 0x40000, .par.lin.zero = 0xbefbe, .par.lin.exact = 0xfefff) \
    MACRO(__VA_ARGS__, f32_linear_fma_xyz_X0000_0X000_00X00    , .type = SWS_PIXEL_F32, .uop = SWS_UOP_LINEAR_FMA      , .mask = 0x7, .par.lin.one = 0x40000, .par.lin.zero = 0xbefbe, .par.lin.exact = 0xfffff) \
    MACRO(__VA_ARGS__, f32_linear_fma_xyz_X0001_0X00x_00X01    , .type = SWS_PIXEL_F32, .uop = SWS_UOP_LINEAR_FMA      , .mask = 0x7, .par.lin.one = 0x44010, .par.lin.zero = 0xbadae, .par.lin.exact = 0xffdff) \
    MACRO(__VA_ARGS__, f32_linear_fma_xyz_X0001_0X001_00X01    , .type = SWS_PIXEL_F32, .uop = SWS_UOP_LINEAR_FMA      , .mask = 0x7, .par.lin.one = 0x44210, .par.lin.zero = 0xbadae, .par.lin.exact = 0xfffff) \
    MACRO(__VA_ARGS__, f32_linear_fma_xyz_10X0x_1XX0x_1X00x    , .type = SWS_PIXEL_F32, .uop = SWS_UOP_LINEAR_FMA      , .mask = 0x7, .par.lin.one = 0x40421, .par.lin.zero = 0xbb10a, .par.lin.exact = 0xfbdef) \
    MACRO(__VA_ARGS__, f32_linear_fma_w_000X0                  , .type = SWS_PIXEL_F32, .uop = SWS_UOP_LINEAR_FMA      , .mask = 0x8, .par.lin.one = 0x1041, .par.lin.zero = 0xbefbe, .par.lin.exact = 0xfffff) \
    MACRO(__VA_ARGS__, f32_linear_fma_xw_x000x_000x0           , .type = SWS_PIXEL_F32, .uop = SWS_UOP_LINEAR_FMA      , .mask = 0x9, .par.lin.one = 0x1040, .par.lin.zero = 0xbefae, .par.lin.exact = 0xbffee) \
    MACRO(__VA_ARGS__, f32_linear_fma_xw_X000x_000X0           , .type = SWS_PIXEL_F32, .uop = SWS_UOP_LINEAR_FMA      , .mask = 0x9, .par.lin.one = 0x1040, .par.lin.zero = 0xbefae, .par.lin.exact = 0xfffef) \
    MACRO(__VA_ARGS__, f32_linear_fma_xw_xxx00_000x0           , .type = SWS_PIXEL_F32, .uop = SWS_UOP_LINEAR_FMA      , .mask = 0x9, .par.lin.one = 0x1040, .par.lin.zero = 0xbefb8, .par.lin.exact = 0xbfff8) \
    MACRO(__VA_ARGS__, f32_linear_fma_xw_XXX00_000X0           , .type = SWS_PIXEL_F32, .uop = SWS_UOP_LINEAR_FMA      , .mask = 0x9, .par.lin.one = 0x1040, .par.lin.zero = 0xbefb8, .par.lin.exact = 0xfffff) \
    MACRO(__VA_ARGS__, f32_linear_fma_xyzw_xxx0x_xxx0x_xxx0x_000x0, .type = SWS_PIXEL_F32, .uop = SWS_UOP_LINEAR_FMA      , .mask = 0xf, .par.lin.one = 0x0, .par.lin.zero = 0xba108, .par.lin.exact = 0xba108) \
    MACRO(__VA_ARGS__, f32_linear_fma_xyzw_XXX0x_XXX0x_XXX0x_000X0, .type = SWS_PIXEL_F32, .uop = SWS_UOP_LINEAR_FMA      , .mask = 0xf, .par.lin.one = 0x0, .par.lin.zero = 0xba108, .par.lin.exact = 0xfbdef) \
    MACRO(__VA_ARGS__, f32_linear_fma_xyzw_X0X0x_XXX0x_XX00x_000X0, .type = SWS_PIXEL_F32, .uop = SWS_UOP_LINEAR_FMA      , .mask = 0xf, .par.lin.one = 0x0, .par.lin.zero = 0xbb10a, .par.lin.exact = 0xfbdef) \
    MACRO(__VA_ARGS__, f32_linear_fma_xyzw_X0000_0X000_00X00_000X0, .type = SWS_PIXEL_F32, .uop = SWS_UOP_LINEAR_FMA      , .mask = 0xf, .par.lin.one = 0x0, .par.lin.zero = 0xbefbe, .par.lin.exact = 0xfffff)
#define SWS_FOR_F32_DITHER(MACRO, ...) \
    MACRO(__VA_ARGS__, f32_dither_x_0_16x16                    , SWS_PIXEL_F32, SWS_UOP_DITHER          , 0x1, 0, 0, 0, 0, 4) \
    MACRO(__VA_ARGS__, f32_dither_y_3_16x16                    , SWS_PIXEL_F32, SWS_UOP_DITHER          , 0x2, 0, 3, 0, 0, 4) \
    MACRO(__VA_ARGS__, f32_dither_xy_0_3_16x16                 , SWS_PIXEL_F32, SWS_UOP_DITHER          , 0x3, 0, 3, 0, 0, 4) \
    MACRO(__VA_ARGS__, f32_dither_z_2_16x16                    , SWS_PIXEL_F32, SWS_UOP_DITHER          , 0x4, 0, 0, 2, 0, 4) \
    MACRO(__VA_ARGS__, f32_dither_xz_0_2_16x16                 , SWS_PIXEL_F32, SWS_UOP_DITHER          , 0x5, 0, 0, 2, 0, 4) \
    MACRO(__VA_ARGS__, f32_dither_xyz_0_0_0_16x16              , SWS_PIXEL_F32, SWS_UOP_DITHER          , 0x7, 0, 0, 0, 0, 4) \
    MACRO(__VA_ARGS__, f32_dither_xyz_0_3_2_16x16              , SWS_PIXEL_F32, SWS_UOP_DITHER          , 0x7, 0, 3, 2, 0, 4) \
    MACRO(__VA_ARGS__, f32_dither_xyz_2_0_3_16x16              , SWS_PIXEL_F32, SWS_UOP_DITHER          , 0x7, 2, 0, 3, 0, 4) \
    MACRO(__VA_ARGS__, f32_dither_xyz_2_3_0_16x16              , SWS_PIXEL_F32, SWS_UOP_DITHER          , 0x7, 2, 3, 0, 0, 4) \
    MACRO(__VA_ARGS__, f32_dither_xyz_3_0_2_16x16              , SWS_PIXEL_F32, SWS_UOP_DITHER          , 0x7, 3, 0, 2, 0, 4) \
    MACRO(__VA_ARGS__, f32_dither_xyz_3_2_0_16x16              , SWS_PIXEL_F32, SWS_UOP_DITHER          , 0x7, 3, 2, 0, 0, 4) \
    MACRO(__VA_ARGS__, f32_dither_w_5_16x16                    , SWS_PIXEL_F32, SWS_UOP_DITHER          , 0x8, 0, 0, 0, 5, 4) \
    MACRO(__VA_ARGS__, f32_dither_xw_0_3_16x16                 , SWS_PIXEL_F32, SWS_UOP_DITHER          , 0x9, 0, 0, 0, 3, 4) \
    MACRO(__VA_ARGS__, f32_dither_xw_0_5_16x16                 , SWS_PIXEL_F32, SWS_UOP_DITHER          , 0x9, 0, 0, 0, 5, 4) \
    MACRO(__VA_ARGS__, f32_dither_yzw_0_3_2_16x16              , SWS_PIXEL_F32, SWS_UOP_DITHER          , 0xe, 0, 0, 3, 2, 4) \
    MACRO(__VA_ARGS__, f32_dither_yzw_2_0_3_16x16              , SWS_PIXEL_F32, SWS_UOP_DITHER          , 0xe, 0, 2, 0, 3, 4) \
    MACRO(__VA_ARGS__, f32_dither_yzw_2_3_0_16x16              , SWS_PIXEL_F32, SWS_UOP_DITHER          , 0xe, 0, 2, 3, 0, 4) \
    MACRO(__VA_ARGS__, f32_dither_xyzw_0_0_0_3_16x16           , SWS_PIXEL_F32, SWS_UOP_DITHER          , 0xf, 0, 0, 0, 3, 4) \
    MACRO(__VA_ARGS__, f32_dither_xyzw_0_3_2_5_16x16           , SWS_PIXEL_F32, SWS_UOP_DITHER          , 0xf, 0, 3, 2, 5, 4) \
    MACRO(__VA_ARGS__, f32_dither_xyzw_2_3_0_5_16x16           , SWS_PIXEL_F32, SWS_UOP_DITHER          , 0xf, 2, 3, 0, 5, 4) \
    MACRO(__VA_ARGS__, f32_dither_xyzw_3_0_2_5_16x16           , SWS_PIXEL_F32, SWS_UOP_DITHER          , 0xf, 3, 0, 2, 5, 4) \
    MACRO(__VA_ARGS__, f32_dither_xyzw_3_2_0_5_16x16           , SWS_PIXEL_F32, SWS_UOP_DITHER          , 0xf, 3, 2, 0, 5, 4) \
    MACRO(__VA_ARGS__, f32_dither_xyzw_5_0_3_2_16x16           , SWS_PIXEL_F32, SWS_UOP_DITHER          , 0xf, 5, 0, 3, 2, 4) \
    MACRO(__VA_ARGS__, f32_dither_xyzw_5_2_3_0_16x16           , SWS_PIXEL_F32, SWS_UOP_DITHER          , 0xf, 5, 2, 3, 0, 4)
#define SWS_FOR_STRUCT_F32_DITHER(MACRO, ...) \
    MACRO(__VA_ARGS__, f32_dither_x_0_16x16                    , .type = SWS_PIXEL_F32, .uop = SWS_UOP_DITHER          , .mask = 0x1, .par.dither = { .y_offset = {0, 0, 0, 0}, .size_log2 = 4 }) \
    MACRO(__VA_ARGS__, f32_dither_y_3_16x16                    , .type = SWS_PIXEL_F32, .uop = SWS_UOP_DITHER          , .mask = 0x2, .par.dither = { .y_offset = {0, 3, 0, 0}, .size_log2 = 4 }) \
    MACRO(__VA_ARGS__, f32_dither_xy_0_3_16x16                 , .type = SWS_PIXEL_F32, .uop = SWS_UOP_DITHER          , .mask = 0x3, .par.dither = { .y_offset = {0, 3, 0, 0}, .size_log2 = 4 }) \
    MACRO(__VA_ARGS__, f32_dither_z_2_16x16                    , .type = SWS_PIXEL_F32, .uop = SWS_UOP_DITHER          , .mask = 0x4, .par.dither = { .y_offset = {0, 0, 2, 0}, .size_log2 = 4 }) \
    MACRO(__VA_ARGS__, f32_dither_xz_0_2_16x16                 , .type = SWS_PIXEL_F32, .uop = SWS_UOP_DITHER          , .mask = 0x5, .par.dither = { .y_offset = {0, 0, 2, 0}, .size_log2 = 4 }) \
    MACRO(__VA_ARGS__, f32_dither_xyz_0_0_0_16x16              , .type = SWS_PIXEL_F32, .uop = SWS_UOP_DITHER          , .mask = 0x7, .par.dither = { .y_offset = {0, 0, 0, 0}, .size_log2 = 4 }) \
    MACRO(__VA_ARGS__, f32_dither_xyz_0_3_2_16x16              , .type = SWS_PIXEL_F32, .uop = SWS_UOP_DITHER          , .mask = 0x7, .par.dither = { .y_offset = {0, 3, 2, 0}, .size_log2 = 4 }) \
    MACRO(__VA_ARGS__, f32_dither_xyz_2_0_3_16x16              , .type = SWS_PIXEL_F32, .uop = SWS_UOP_DITHER          , .mask = 0x7, .par.dither = { .y_offset = {2, 0, 3, 0}, .size_log2 = 4 }) \
    MACRO(__VA_ARGS__, f32_dither_xyz_2_3_0_16x16              , .type = SWS_PIXEL_F32, .uop = SWS_UOP_DITHER          , .mask = 0x7, .par.dither = { .y_offset = {2, 3, 0, 0}, .size_log2 = 4 }) \
    MACRO(__VA_ARGS__, f32_dither_xyz_3_0_2_16x16              , .type = SWS_PIXEL_F32, .uop = SWS_UOP_DITHER          , .mask = 0x7, .par.dither = { .y_offset = {3, 0, 2, 0}, .size_log2 = 4 }) \
    MACRO(__VA_ARGS__, f32_dither_xyz_3_2_0_16x16              , .type = SWS_PIXEL_F32, .uop = SWS_UOP_DITHER          , .mask = 0x7, .par.dither = { .y_offset = {3, 2, 0, 0}, .size_log2 = 4 }) \
    MACRO(__VA_ARGS__, f32_dither_w_5_16x16                    , .type = SWS_PIXEL_F32, .uop = SWS_UOP_DITHER          , .mask = 0x8, .par.dither = { .y_offset = {0, 0, 0, 5}, .size_log2 = 4 }) \
    MACRO(__VA_ARGS__, f32_dither_xw_0_3_16x16                 , .type = SWS_PIXEL_F32, .uop = SWS_UOP_DITHER          , .mask = 0x9, .par.dither = { .y_offset = {0, 0, 0, 3}, .size_log2 = 4 }) \
    MACRO(__VA_ARGS__, f32_dither_xw_0_5_16x16                 , .type = SWS_PIXEL_F32, .uop = SWS_UOP_DITHER          , .mask = 0x9, .par.dither = { .y_offset = {0, 0, 0, 5}, .size_log2 = 4 }) \
    MACRO(__VA_ARGS__, f32_dither_yzw_0_3_2_16x16              , .type = SWS_PIXEL_F32, .uop = SWS_UOP_DITHER          , .mask = 0xe, .par.dither = { .y_offset = {0, 0, 3, 2}, .size_log2 = 4 }) \
    MACRO(__VA_ARGS__, f32_dither_yzw_2_0_3_16x16              , .type = SWS_PIXEL_F32, .uop = SWS_UOP_DITHER          , .mask = 0xe, .par.dither = { .y_offset = {0, 2, 0, 3}, .size_log2 = 4 }) \
    MACRO(__VA_ARGS__, f32_dither_yzw_2_3_0_16x16              , .type = SWS_PIXEL_F32, .uop = SWS_UOP_DITHER          , .mask = 0xe, .par.dither = { .y_offset = {0, 2, 3, 0}, .size_log2 = 4 }) \
    MACRO(__VA_ARGS__, f32_dither_xyzw_0_0_0_3_16x16           , .type = SWS_PIXEL_F32, .uop = SWS_UOP_DITHER          , .mask = 0xf, .par.dither = { .y_offset = {0, 0, 0, 3}, .size_log2 = 4 }) \
    MACRO(__VA_ARGS__, f32_dither_xyzw_0_3_2_5_16x16           , .type = SWS_PIXEL_F32, .uop = SWS_UOP_DITHER          , .mask = 0xf, .par.dither = { .y_offset = {0, 3, 2, 5}, .size_log2 = 4 }) \
    MACRO(__VA_ARGS__, f32_dither_xyzw_2_3_0_5_16x16           , .type = SWS_PIXEL_F32, .uop = SWS_UOP_DITHER          , .mask = 0xf, .par.dither = { .y_offset = {2, 3, 0, 5}, .size_log2 = 4 }) \
    MACRO(__VA_ARGS__, f32_dither_xyzw_3_0_2_5_16x16           , .type = SWS_PIXEL_F32, .uop = SWS_UOP_DITHER          , .mask = 0xf, .par.dither = { .y_offset = {3, 0, 2, 5}, .size_log2 = 4 }) \
    MACRO(__VA_ARGS__, f32_dither_xyzw_3_2_0_5_16x16           , .type = SWS_PIXEL_F32, .uop = SWS_UOP_DITHER          , .mask = 0xf, .par.dither = { .y_offset = {3, 2, 0, 5}, .size_log2 = 4 }) \
    MACRO(__VA_ARGS__, f32_dither_xyzw_5_0_3_2_16x16           , .type = SWS_PIXEL_F32, .uop = SWS_UOP_DITHER          , .mask = 0xf, .par.dither = { .y_offset = {5, 0, 3, 2}, .size_log2 = 4 }) \
    MACRO(__VA_ARGS__, f32_dither_xyzw_5_2_3_0_16x16           , .type = SWS_PIXEL_F32, .uop = SWS_UOP_DITHER          , .mask = 0xf, .par.dither = { .y_offset = {5, 2, 3, 0}, .size_log2 = 4 })

#endif /* SWSCALE_UOPS_MACROS_H */
