mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
tests: Add test for imul instruction.
This commit is contained in:
parent
95b6b7b91b
commit
67d001c287
@ -4764,6 +4764,28 @@ static void test_shader_instructions(void)
|
||||
0x00000002, 0x0100003e,
|
||||
};
|
||||
static const D3D12_SHADER_BYTECODE ps_imad = {ps_imad_code, sizeof(ps_imad_code)};
|
||||
static const DWORD ps_imul_code[] =
|
||||
{
|
||||
#if 0
|
||||
uint4 src0;
|
||||
uint4 src1;
|
||||
|
||||
void main(out uint4 dst : SV_Target)
|
||||
{
|
||||
dst = 0;
|
||||
dst.x = src0.x * src1.x;
|
||||
}
|
||||
#endif
|
||||
0x43425844, 0x55ebfe14, 0xc9834c14, 0x5f89388a, 0x523be7e0, 0x00000001, 0x000000ec, 0x00000003,
|
||||
0x0000002c, 0x0000003c, 0x00000070, 0x4e475349, 0x00000008, 0x00000000, 0x00000008, 0x4e47534f,
|
||||
0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000001, 0x00000000,
|
||||
0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, 0x58454853, 0x00000074, 0x00000050, 0x0000001d,
|
||||
0x0100086a, 0x04000059, 0x00208e46, 0x00000000, 0x00000002, 0x03000065, 0x001020f2, 0x00000000,
|
||||
0x0a000026, 0x0000d000, 0x00102012, 0x00000000, 0x0020800a, 0x00000000, 0x00000000, 0x0020800a,
|
||||
0x00000000, 0x00000001, 0x08000036, 0x001020e2, 0x00000000, 0x00004002, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x0100003e,
|
||||
};
|
||||
static const D3D12_SHADER_BYTECODE ps_imul = {ps_imul_code, sizeof(ps_imul_code)};
|
||||
static const DWORD ps_movc_code[] =
|
||||
{
|
||||
#if 0
|
||||
@ -5247,6 +5269,14 @@ static void test_shader_instructions(void)
|
||||
{&ps_imad, {{{2, 3, 4, 5}, {5, 5, 5, 5}, {0, 0, 0, 0}}}, {{10, 15, 20, 25}}},
|
||||
{&ps_imad, {{{2, 3, 4, 5}, {5, 5, 5, 5}, {5, 5, 6, 6}}}, {{15, 20, 14, 19}}},
|
||||
|
||||
{&ps_imul, {{{0}, { 0u}}}, {{ 0u}}},
|
||||
{&ps_imul, {{{1}, { 2u}}}, {{ 2u}}},
|
||||
{&ps_imul, {{{1}, { 3u}}}, {{ 3u}}},
|
||||
{&ps_imul, {{{6}, { 3u}}}, {{18u}}},
|
||||
{&ps_imul, {{{1}, {~0u}}}, {{~0u}}},
|
||||
{&ps_imul, {{{2}, {~0u}}}, {{~1u}}},
|
||||
{&ps_imul, {{{3}, {~0u}}}, {{~2u}}},
|
||||
|
||||
{&ps_movc, {{{0, 0, 0, 0}, {1, 2, 3, 4}, {5, 6, 7, 8}}}, {{5, 6, 7, 8}}},
|
||||
{&ps_movc, {{{0, 0, 0, 1}, {1, 2, 3, 4}, {5, 6, 7, 8}}}, {{5, 6, 7, 4}}},
|
||||
{&ps_movc, {{{1, 0, 0, 0}, {1, 2, 3, 4}, {5, 6, 7, 8}}}, {{1, 6, 7, 8}}},
|
||||
|
Loading…
Reference in New Issue
Block a user