tests: Add test for swapc instruction.

This commit is contained in:
Józef Kucia 2017-07-18 13:31:46 +02:00
parent 9d319bbc3d
commit 332da87f08

View File

@ -4442,6 +4442,148 @@ static void test_shader_instructions(void)
0x06000082, 0x001020f2, 0x00000000, 0x00208e46, 0x00000000, 0x00000000, 0x0100003e,
};
static const D3D12_SHADER_BYTECODE ps_f32tof16 = {ps_f32tof16_code, sizeof(ps_f32tof16_code)};
static const DWORD ps_swapc0_code[] =
{
#if 0
ps_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb0[3], immediateIndexed
dcl_output o0.xyzw
dcl_temps 2
swapc r0.xyzw, r1.xyzw, cb0[0].xyzw, cb0[1].xyzw, cb0[2].xyzw
mov o0.xyzw, r0.xyzw
ret
#endif
0x43425844, 0x9e089246, 0x9f8b5cbe, 0xbac66faf, 0xaef23488, 0x00000001, 0x000000f8, 0x00000003,
0x0000002c, 0x0000003c, 0x00000070, 0x4e475349, 0x00000008, 0x00000000, 0x00000008, 0x4e47534f,
0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000001, 0x00000000,
0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, 0x58454853, 0x00000080, 0x00000050, 0x00000020,
0x0100086a, 0x04000059, 0x00208e46, 0x00000000, 0x00000003, 0x03000065, 0x001020f2, 0x00000000,
0x02000068, 0x00000002, 0x0e00008e, 0x001000f2, 0x00000000, 0x001000f2, 0x00000001, 0x00208e46,
0x00000000, 0x00000000, 0x00208e46, 0x00000000, 0x00000001, 0x00208e46, 0x00000000, 0x00000002,
0x05000036, 0x001020f2, 0x00000000, 0x00100e46, 0x00000000, 0x0100003e,
};
static const D3D12_SHADER_BYTECODE ps_swapc0 = {ps_swapc0_code, sizeof(ps_swapc0_code)};
static const DWORD ps_swapc1_code[] =
{
#if 0
ps_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb0[3], immediateIndexed
dcl_output o0.xyzw
dcl_temps 2
swapc r0.xyzw, r1.xyzw, cb0[0].xyzw, cb0[1].xyzw, cb0[2].xyzw
mov o0.xyzw, r1.xyzw
ret
#endif
0x43425844, 0xf2daed61, 0xede211f7, 0x7300dbea, 0x573ed49f, 0x00000001, 0x000000f8, 0x00000003,
0x0000002c, 0x0000003c, 0x00000070, 0x4e475349, 0x00000008, 0x00000000, 0x00000008, 0x4e47534f,
0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000001, 0x00000000,
0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, 0x58454853, 0x00000080, 0x00000050, 0x00000020,
0x0100086a, 0x04000059, 0x00208e46, 0x00000000, 0x00000003, 0x03000065, 0x001020f2, 0x00000000,
0x02000068, 0x00000002, 0x0e00008e, 0x001000f2, 0x00000000, 0x001000f2, 0x00000001, 0x00208e46,
0x00000000, 0x00000000, 0x00208e46, 0x00000000, 0x00000001, 0x00208e46, 0x00000000, 0x00000002,
0x05000036, 0x001020f2, 0x00000000, 0x00100e46, 0x00000001, 0x0100003e,
};
static const D3D12_SHADER_BYTECODE ps_swapc1 = {ps_swapc1_code, sizeof(ps_swapc1_code)};
static const DWORD ps_swapc2_code[] =
{
#if 0
ps_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb0[3], immediateIndexed
dcl_output o0.xyzw
dcl_temps 2
mov r0.xyzw, cb0[1].xyzw
mov r1.xyzw, cb0[2].xyzw
swapc r0.xyzw, r1.xyzw, cb0[0].xyzw, r0.xyzw, r1.xyzw
mov o0.xyzw, r0.xyzw
ret
#endif
0x43425844, 0x230fcb22, 0x70d99148, 0x65814d89, 0x97473498, 0x00000001, 0x00000120, 0x00000003,
0x0000002c, 0x0000003c, 0x00000070, 0x4e475349, 0x00000008, 0x00000000, 0x00000008, 0x4e47534f,
0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000001, 0x00000000,
0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, 0x58454853, 0x000000a8, 0x00000050, 0x0000002a,
0x0100086a, 0x04000059, 0x00208e46, 0x00000000, 0x00000003, 0x03000065, 0x001020f2, 0x00000000,
0x02000068, 0x00000002, 0x06000036, 0x001000f2, 0x00000000, 0x00208e46, 0x00000000, 0x00000001,
0x06000036, 0x001000f2, 0x00000001, 0x00208e46, 0x00000000, 0x00000002, 0x0c00008e, 0x001000f2,
0x00000000, 0x001000f2, 0x00000001, 0x00208e46, 0x00000000, 0x00000000, 0x00100e46, 0x00000000,
0x00100e46, 0x00000001, 0x05000036, 0x001020f2, 0x00000000, 0x00100e46, 0x00000000, 0x0100003e,
};
static const D3D12_SHADER_BYTECODE ps_swapc2 = {ps_swapc2_code, sizeof(ps_swapc2_code)};
static const DWORD ps_swapc3_code[] =
{
#if 0
ps_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb0[3], immediateIndexed
dcl_output o0.xyzw
dcl_temps 2
mov r0.xyzw, cb0[1].xyzw
mov r1.xyzw, cb0[2].xyzw
swapc r0.xyzw, r1.xyzw, cb0[0].xyzw, r0.xyzw, r1.xyzw
mov o0.xyzw, r1.xyzw
ret
#endif
0x43425844, 0xce595d62, 0x98305541, 0xb04e74c8, 0xfc010f3a, 0x00000001, 0x00000120, 0x00000003,
0x0000002c, 0x0000003c, 0x00000070, 0x4e475349, 0x00000008, 0x00000000, 0x00000008, 0x4e47534f,
0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000001, 0x00000000,
0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, 0x58454853, 0x000000a8, 0x00000050, 0x0000002a,
0x0100086a, 0x04000059, 0x00208e46, 0x00000000, 0x00000003, 0x03000065, 0x001020f2, 0x00000000,
0x02000068, 0x00000002, 0x06000036, 0x001000f2, 0x00000000, 0x00208e46, 0x00000000, 0x00000001,
0x06000036, 0x001000f2, 0x00000001, 0x00208e46, 0x00000000, 0x00000002, 0x0c00008e, 0x001000f2,
0x00000000, 0x001000f2, 0x00000001, 0x00208e46, 0x00000000, 0x00000000, 0x00100e46, 0x00000000,
0x00100e46, 0x00000001, 0x05000036, 0x001020f2, 0x00000000, 0x00100e46, 0x00000001, 0x0100003e,
};
static const D3D12_SHADER_BYTECODE ps_swapc3 = {ps_swapc3_code, sizeof(ps_swapc3_code)};
static const DWORD ps_swapc4_code[] =
{
#if 0
ps_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb0[3], immediateIndexed
dcl_output o0.xyzw
dcl_temps 2
mov r0.xyzw, cb0[0].xyzw
swapc r0.xyzw, r1.xyzw, r0.xyzw, cb0[1].xyzw, cb0[2].xyzw
mov o0.xyzw, r0.xyzw
ret
#endif
0x43425844, 0x72067c48, 0xb53572a0, 0x9dd9e0fd, 0x903e37e3, 0x00000001, 0x0000010c, 0x00000003,
0x0000002c, 0x0000003c, 0x00000070, 0x4e475349, 0x00000008, 0x00000000, 0x00000008, 0x4e47534f,
0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000001, 0x00000000,
0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, 0x58454853, 0x00000094, 0x00000050, 0x00000025,
0x0100086a, 0x04000059, 0x00208e46, 0x00000000, 0x00000003, 0x03000065, 0x001020f2, 0x00000000,
0x02000068, 0x00000002, 0x06000036, 0x001000f2, 0x00000000, 0x00208e46, 0x00000000, 0x00000000,
0x0d00008e, 0x001000f2, 0x00000000, 0x001000f2, 0x00000001, 0x00100e46, 0x00000000, 0x00208e46,
0x00000000, 0x00000001, 0x00208e46, 0x00000000, 0x00000002, 0x05000036, 0x001020f2, 0x00000000,
0x00100e46, 0x00000000, 0x0100003e,
};
static const D3D12_SHADER_BYTECODE ps_swapc4 = {ps_swapc4_code, sizeof(ps_swapc4_code)};
static const DWORD ps_swapc5_code[] =
{
#if 0
ps_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb0[3], immediateIndexed
dcl_output o0.xyzw
dcl_temps 2
mov r1.xyzw, cb0[0].xyzw
swapc r0.xyzw, r1.xyzw, r1.xyzw, cb0[1].xyzw, cb0[2].xyzw
mov o0.xyzw, r1.xyzw
ret
#endif
0x43425844, 0x7078fb08, 0xdd24cd44, 0x469d3258, 0x9e33a0bc, 0x00000001, 0x0000010c, 0x00000003,
0x0000002c, 0x0000003c, 0x00000070, 0x4e475349, 0x00000008, 0x00000000, 0x00000008, 0x4e47534f,
0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000001, 0x00000000,
0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, 0x58454853, 0x00000094, 0x00000050, 0x00000025,
0x0100086a, 0x04000059, 0x00208e46, 0x00000000, 0x00000003, 0x03000065, 0x001020f2, 0x00000000,
0x02000068, 0x00000002, 0x06000036, 0x001000f2, 0x00000001, 0x00208e46, 0x00000000, 0x00000000,
0x0d00008e, 0x001000f2, 0x00000000, 0x001000f2, 0x00000001, 0x00100e46, 0x00000001, 0x00208e46,
0x00000000, 0x00000001, 0x00208e46, 0x00000000, 0x00000002, 0x05000036, 0x001020f2, 0x00000000,
0x00100e46, 0x00000001, 0x0100003e,
};
static const D3D12_SHADER_BYTECODE ps_swapc5 = {ps_swapc5_code, sizeof(ps_swapc5_code)};
static const struct
{
const D3D12_SHADER_BYTECODE *ps;
@ -4449,6 +4591,7 @@ static void test_shader_instructions(void)
{
struct vec4 src0;
struct vec4 src1;
struct vec4 src2;
} input;
union
{
@ -4541,11 +4684,13 @@ static void test_shader_instructions(void)
{
struct uvec4 src0;
struct uvec4 src1;
struct uvec4 src2;
} u;
struct
{
struct vec4 src0;
struct vec4 src1;
struct vec4 src2;
} f;
} input;
union
@ -4673,6 +4818,288 @@ static void test_shader_instructions(void)
{&ps_f16tof32, {{{0xffff0000, 0xffff3c00, 0xffff5640, 0xffff5bd0}}}, {{0, 1, 100, 250}}},
{&ps_f32tof16, {.f = {{0.0f, 1.0f, -1.0f, 666.0f}}}, {{0, 0x3c00, 0xbc00, 0x6134}}},
{
&ps_swapc0,
{{{0, 0, 0, 0}, {0xdead, 0xc0de, 0xffff, 0xeeee}, {0xaaaa, 0xbbbb, 0xcccc, 0xdddd}}},
{{0xdead, 0xc0de, 0xffff, 0xeeee}},
},
{
&ps_swapc0,
{{{1, 1, 1, 1}, {0xdead, 0xc0de, 0xffff, 0xeeee}, {0xaaaa, 0xbbbb, 0xcccc, 0xdddd}}},
{{0xaaaa, 0xbbbb, 0xcccc, 0xdddd}},
},
{
&ps_swapc0,
{{{0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff},
{0xdead, 0xc0de, 0xffff, 0xeeee}, {0xaaaa, 0xbbbb, 0xcccc, 0xdddd}}},
{{0xaaaa, 0xbbbb, 0xcccc, 0xdddd}},
},
{
&ps_swapc0,
{{{1, 0, 1, 0}, {0xdead, 0xc0de, 0xffff, 0xeeee}, {0xaaaa, 0xbbbb, 0xcccc, 0xdddd}}},
{{0xaaaa, 0xc0de, 0xcccc, 0xeeee}},
},
{
&ps_swapc0,
{{{1, 0, 0, 1}, {0xdead, 0xc0de, 0xffff, 0xeeee}, {0xaaaa, 0xbbbb, 0xcccc, 0xdddd}}},
{{0xaaaa, 0xc0de, 0xffff, 0xdddd}},
},
{
&ps_swapc0,
{{{1, 0, 0, 0}, {0xdead, 0xc0de, 0xffff, 0xeeee}, {0xaaaa, 0xbbbb, 0xcccc, 0xdddd}}},
{{0xaaaa, 0xc0de, 0xffff, 0xeeee}},
},
{
&ps_swapc0,
{{{0, 1, 0, 0}, {0xdead, 0xc0de, 0xffff, 0xeeee}, {0xaaaa, 0xbbbb, 0xcccc, 0xdddd}}},
{{0xdead, 0xbbbb, 0xffff, 0xeeee}},
},
{
&ps_swapc0,
{{{0, 0, 1, 0}, {0xdead, 0xc0de, 0xffff, 0xeeee}, {0xaaaa, 0xbbbb, 0xcccc, 0xdddd}}},
{{0xdead, 0xc0de, 0xcccc, 0xeeee}},
},
{
&ps_swapc0,
{{{0, 0, 0, 1}, {0xdead, 0xc0de, 0xffff, 0xeeee}, {0xaaaa, 0xbbbb, 0xcccc, 0xdddd}}},
{{0xdead, 0xc0de, 0xffff, 0xdddd}},
},
{
&ps_swapc1,
{{{0, 0, 0, 0}, {0xdead, 0xc0de, 0xffff, 0xeeee}, {0xaaaa, 0xbbbb, 0xcccc, 0xdddd}}},
{{0xaaaa, 0xbbbb, 0xcccc, 0xdddd}}
},
{
&ps_swapc1,
{{{1, 1, 1, 1}, {0xdead, 0xc0de, 0xffff, 0xeeee}, {0xaaaa, 0xbbbb, 0xcccc, 0xdddd}}},
{{0xdead, 0xc0de, 0xffff, 0xeeee}},
},
{
&ps_swapc1,
{{{0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff},
{0xdead, 0xc0de, 0xffff, 0xeeee}, {0xaaaa, 0xbbbb, 0xcccc, 0xdddd}}},
{{0xdead, 0xc0de, 0xffff, 0xeeee}},
},
{
&ps_swapc1,
{{{1, 0, 1, 0}, {0xdead, 0xc0de, 0xffff, 0xeeee}, {0xaaaa, 0xbbbb, 0xcccc, 0xdddd}}},
{{0xdead, 0xbbbb, 0xffff, 0xdddd}},
},
{
&ps_swapc1,
{{{1, 0, 0, 1}, {0xdead, 0xc0de, 0xffff, 0xeeee}, {0xaaaa, 0xbbbb, 0xcccc, 0xdddd}}},
{{0xdead, 0xbbbb, 0xcccc, 0xeeee}},
},
{
&ps_swapc1,
{{{1, 0, 0, 0}, {0xdead, 0xc0de, 0xffff, 0xeeee}, {0xaaaa, 0xbbbb, 0xcccc, 0xdddd}}},
{{0xdead, 0xbbbb, 0xcccc, 0xdddd}}
},
{
&ps_swapc1,
{{{0, 1, 0, 0}, {0xdead, 0xc0de, 0xffff, 0xeeee}, {0xaaaa, 0xbbbb, 0xcccc, 0xdddd}}},
{{0xaaaa, 0xc0de, 0xcccc, 0xdddd}}
},
{
&ps_swapc1,
{{{0, 0, 1, 0}, {0xdead, 0xc0de, 0xffff, 0xeeee}, {0xaaaa, 0xbbbb, 0xcccc, 0xdddd}}},
{{0xaaaa, 0xbbbb, 0xffff, 0xdddd}}
},
{
&ps_swapc1,
{{{0, 0, 0, 1}, {0xdead, 0xc0de, 0xffff, 0xeeee}, {0xaaaa, 0xbbbb, 0xcccc, 0xdddd}}},
{{0xaaaa, 0xbbbb, 0xcccc, 0xeeee}},
},
{
&ps_swapc2,
{{{0, 0, 0, 0}, {0xdead, 0xc0de, 0xffff, 0xeeee}, {0xaaaa, 0xbbbb, 0xcccc, 0xdddd}}},
{{0xdead, 0xc0de, 0xffff, 0xeeee}},
},
{
&ps_swapc2,
{{{1, 1, 1, 1}, {0xdead, 0xc0de, 0xffff, 0xeeee}, {0xaaaa, 0xbbbb, 0xcccc, 0xdddd}}},
{{0xaaaa, 0xbbbb, 0xcccc, 0xdddd}},
},
{
&ps_swapc2,
{{{0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff},
{0xdead, 0xc0de, 0xffff, 0xeeee}, {0xaaaa, 0xbbbb, 0xcccc, 0xdddd}}},
{{0xaaaa, 0xbbbb, 0xcccc, 0xdddd}},
},
{
&ps_swapc2,
{{{1, 0, 1, 0}, {0xdead, 0xc0de, 0xffff, 0xeeee}, {0xaaaa, 0xbbbb, 0xcccc, 0xdddd}}},
{{0xaaaa, 0xc0de, 0xcccc, 0xeeee}},
},
{
&ps_swapc2,
{{{1, 0, 0, 1}, {0xdead, 0xc0de, 0xffff, 0xeeee}, {0xaaaa, 0xbbbb, 0xcccc, 0xdddd}}},
{{0xaaaa, 0xc0de, 0xffff, 0xdddd}},
},
{
&ps_swapc2,
{{{1, 0, 0, 0}, {0xdead, 0xc0de, 0xffff, 0xeeee}, {0xaaaa, 0xbbbb, 0xcccc, 0xdddd}}},
{{0xaaaa, 0xc0de, 0xffff, 0xeeee}},
},
{
&ps_swapc2,
{{{0, 1, 0, 0}, {0xdead, 0xc0de, 0xffff, 0xeeee}, {0xaaaa, 0xbbbb, 0xcccc, 0xdddd}}},
{{0xdead, 0xbbbb, 0xffff, 0xeeee}},
},
{
&ps_swapc2,
{{{0, 0, 1, 0}, {0xdead, 0xc0de, 0xffff, 0xeeee}, {0xaaaa, 0xbbbb, 0xcccc, 0xdddd}}},
{{0xdead, 0xc0de, 0xcccc, 0xeeee}},
},
{
&ps_swapc2,
{{{0, 0, 0, 1}, {0xdead, 0xc0de, 0xffff, 0xeeee}, {0xaaaa, 0xbbbb, 0xcccc, 0xdddd}}},
{{0xdead, 0xc0de, 0xffff, 0xdddd}},
},
{
&ps_swapc3,
{{{0, 0, 0, 0}, {0xdead, 0xc0de, 0xffff, 0xeeee}, {0xaaaa, 0xbbbb, 0xcccc, 0xdddd}}},
{{0xaaaa, 0xbbbb, 0xcccc, 0xdddd}}
},
{
&ps_swapc3,
{{{1, 1, 1, 1}, {0xdead, 0xc0de, 0xffff, 0xeeee}, {0xaaaa, 0xbbbb, 0xcccc, 0xdddd}}},
{{0xdead, 0xc0de, 0xffff, 0xeeee}},
},
{
&ps_swapc3,
{{{0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff},
{0xdead, 0xc0de, 0xffff, 0xeeee}, {0xaaaa, 0xbbbb, 0xcccc, 0xdddd}}},
{{0xdead, 0xc0de, 0xffff, 0xeeee}},
},
{
&ps_swapc3,
{{{1, 0, 1, 0}, {0xdead, 0xc0de, 0xffff, 0xeeee}, {0xaaaa, 0xbbbb, 0xcccc, 0xdddd}}},
{{0xdead, 0xbbbb, 0xffff, 0xdddd}},
},
{
&ps_swapc3,
{{{1, 0, 0, 1}, {0xdead, 0xc0de, 0xffff, 0xeeee}, {0xaaaa, 0xbbbb, 0xcccc, 0xdddd}}},
{{0xdead, 0xbbbb, 0xcccc, 0xeeee}},
},
{
&ps_swapc3,
{{{1, 0, 0, 0}, {0xdead, 0xc0de, 0xffff, 0xeeee}, {0xaaaa, 0xbbbb, 0xcccc, 0xdddd}}},
{{0xdead, 0xbbbb, 0xcccc, 0xdddd}}
},
{
&ps_swapc3,
{{{0, 1, 0, 0}, {0xdead, 0xc0de, 0xffff, 0xeeee}, {0xaaaa, 0xbbbb, 0xcccc, 0xdddd}}},
{{0xaaaa, 0xc0de, 0xcccc, 0xdddd}}
},
{
&ps_swapc3,
{{{0, 0, 1, 0}, {0xdead, 0xc0de, 0xffff, 0xeeee}, {0xaaaa, 0xbbbb, 0xcccc, 0xdddd}}},
{{0xaaaa, 0xbbbb, 0xffff, 0xdddd}}
},
{
&ps_swapc3,
{{{0, 0, 0, 1}, {0xdead, 0xc0de, 0xffff, 0xeeee}, {0xaaaa, 0xbbbb, 0xcccc, 0xdddd}}},
{{0xaaaa, 0xbbbb, 0xcccc, 0xeeee}},
},
{
&ps_swapc4,
{{{0, 0, 0, 0}, {0xdead, 0xc0de, 0xffff, 0xeeee}, {0xaaaa, 0xbbbb, 0xcccc, 0xdddd}}},
{{0xdead, 0xc0de, 0xffff, 0xeeee}},
},
{
&ps_swapc4,
{{{1, 1, 1, 1}, {0xdead, 0xc0de, 0xffff, 0xeeee}, {0xaaaa, 0xbbbb, 0xcccc, 0xdddd}}},
{{0xaaaa, 0xbbbb, 0xcccc, 0xdddd}},
},
{
&ps_swapc4,
{{{0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff},
{0xdead, 0xc0de, 0xffff, 0xeeee}, {0xaaaa, 0xbbbb, 0xcccc, 0xdddd}}},
{{0xaaaa, 0xbbbb, 0xcccc, 0xdddd}},
},
{
&ps_swapc4,
{{{1, 0, 1, 0}, {0xdead, 0xc0de, 0xffff, 0xeeee}, {0xaaaa, 0xbbbb, 0xcccc, 0xdddd}}},
{{0xaaaa, 0xc0de, 0xcccc, 0xeeee}},
},
{
&ps_swapc4,
{{{1, 0, 0, 1}, {0xdead, 0xc0de, 0xffff, 0xeeee}, {0xaaaa, 0xbbbb, 0xcccc, 0xdddd}}},
{{0xaaaa, 0xc0de, 0xffff, 0xdddd}},
},
{
&ps_swapc4,
{{{1, 0, 0, 0}, {0xdead, 0xc0de, 0xffff, 0xeeee}, {0xaaaa, 0xbbbb, 0xcccc, 0xdddd}}},
{{0xaaaa, 0xc0de, 0xffff, 0xeeee}},
},
{
&ps_swapc4,
{{{0, 1, 0, 0}, {0xdead, 0xc0de, 0xffff, 0xeeee}, {0xaaaa, 0xbbbb, 0xcccc, 0xdddd}}},
{{0xdead, 0xbbbb, 0xffff, 0xeeee}},
},
{
&ps_swapc4,
{{{0, 0, 1, 0}, {0xdead, 0xc0de, 0xffff, 0xeeee}, {0xaaaa, 0xbbbb, 0xcccc, 0xdddd}}},
{{0xdead, 0xc0de, 0xcccc, 0xeeee}},
},
{
&ps_swapc4,
{{{0, 0, 0, 1}, {0xdead, 0xc0de, 0xffff, 0xeeee}, {0xaaaa, 0xbbbb, 0xcccc, 0xdddd}}},
{{0xdead, 0xc0de, 0xffff, 0xdddd}},
},
{
&ps_swapc5,
{{{0, 0, 0, 0}, {0xdead, 0xc0de, 0xffff, 0xeeee}, {0xaaaa, 0xbbbb, 0xcccc, 0xdddd}}},
{{0xaaaa, 0xbbbb, 0xcccc, 0xdddd}}
},
{
&ps_swapc5,
{{{1, 1, 1, 1}, {0xdead, 0xc0de, 0xffff, 0xeeee}, {0xaaaa, 0xbbbb, 0xcccc, 0xdddd}}},
{{0xdead, 0xc0de, 0xffff, 0xeeee}},
},
{
&ps_swapc5,
{{{0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff},
{0xdead, 0xc0de, 0xffff, 0xeeee}, {0xaaaa, 0xbbbb, 0xcccc, 0xdddd}}},
{{0xdead, 0xc0de, 0xffff, 0xeeee}},
},
{
&ps_swapc5,
{{{1, 0, 1, 0}, {0xdead, 0xc0de, 0xffff, 0xeeee}, {0xaaaa, 0xbbbb, 0xcccc, 0xdddd}}},
{{0xdead, 0xbbbb, 0xffff, 0xdddd}},
},
{
&ps_swapc5,
{{{1, 0, 0, 1}, {0xdead, 0xc0de, 0xffff, 0xeeee}, {0xaaaa, 0xbbbb, 0xcccc, 0xdddd}}},
{{0xdead, 0xbbbb, 0xcccc, 0xeeee}},
},
{
&ps_swapc5,
{{{1, 0, 0, 0}, {0xdead, 0xc0de, 0xffff, 0xeeee}, {0xaaaa, 0xbbbb, 0xcccc, 0xdddd}}},
{{0xdead, 0xbbbb, 0xcccc, 0xdddd}}
},
{
&ps_swapc5,
{{{0, 1, 0, 0}, {0xdead, 0xc0de, 0xffff, 0xeeee}, {0xaaaa, 0xbbbb, 0xcccc, 0xdddd}}},
{{0xaaaa, 0xc0de, 0xcccc, 0xdddd}}
},
{
&ps_swapc5,
{{{0, 0, 1, 0}, {0xdead, 0xc0de, 0xffff, 0xeeee}, {0xaaaa, 0xbbbb, 0xcccc, 0xdddd}}},
{{0xaaaa, 0xbbbb, 0xffff, 0xdddd}}
},
{
&ps_swapc5,
{{{0, 0, 0, 1}, {0xdead, 0xc0de, 0xffff, 0xeeee}, {0xaaaa, 0xbbbb, 0xcccc, 0xdddd}}},
{{0xaaaa, 0xbbbb, 0xcccc, 0xeeee}},
},
};
assert(sizeof(tests->input) == sizeof(uint_tests->input));