tests: Add a test for the shader DFMA instruction.

Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Conor McCarthy 2021-08-10 01:12:30 +10:00 committed by Alexandre Julliard
parent 74a9a0b167
commit ca82a379f5

View File

@ -9157,6 +9157,29 @@ static void test_shader_instructions(void)
0x30494653, 0x00000008, 0x00000001, 0x00000000, 0x30494653, 0x00000008, 0x00000001, 0x00000000,
}; };
static struct named_shader ps_dmin_dmax = {"dmin_dmax", ps_dmin_dmax_code, sizeof(ps_dmin_dmax_code)}; static struct named_shader ps_dmin_dmax = {"dmin_dmax", ps_dmin_dmax_code, sizeof(ps_dmin_dmax_code)};
static const DWORD ps_dfma_code[] =
{
#if 0
double2 src0;
void main(out uint4 dst : SV_Target)
{
asuint(fma(src0.x, src0.y, 1.0000002433080226l), dst.x, dst.y);
dst.zw = 0;
}
#endif
0x43425844, 0xde5b55c7, 0x2660b48d, 0x52b1761e, 0x50319c4d, 0x00000001, 0x0000012c, 0x00000004,
0x00000030, 0x00000040, 0x00000074, 0x0000011c, 0x4e475349, 0x00000008, 0x00000000, 0x00000008,
0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000001,
0x00000000, 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, 0x58454853, 0x000000a0, 0x00000050,
0x00000028, 0x0102186a, 0x04000059, 0x00208e46, 0x00000000, 0x00000001, 0x03000065, 0x001020f2,
0x00000000, 0x02000068, 0x00000001, 0x0e0000d3, 0x00100032, 0x00000000, 0x00208446, 0x00000000,
0x00000000, 0x00208ee6, 0x00000000, 0x00000000, 0x00005002, 0x41500000, 0x3ff00000, 0x00000000,
0x00000000, 0x05000036, 0x00102032, 0x00000000, 0x00100046, 0x00000000, 0x08000036, 0x001020c2,
0x00000000, 0x00004002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0100003e, 0x30494653,
0x00000008, 0x00000021, 0x00000000,
};
static struct named_shader ps_dfma = {"dfma", ps_dfma_code, sizeof(ps_dfma_code)};
static const DWORD ps_dmovc_code[] = static const DWORD ps_dmovc_code[] =
{ {
#if 0 #if 0
@ -9936,6 +9959,8 @@ static void test_shader_instructions(void)
{&ps_dmov, {.d = {{2.5 + 1.0e-9, -3.5 - 1.0e-9}}}, {.d = {3.5 + 1.0e-9, -2.5 - 1.0e-9}}, true}, {&ps_dmov, {.d = {{2.5 + 1.0e-9, -3.5 - 1.0e-9}}}, {.d = {3.5 + 1.0e-9, -2.5 - 1.0e-9}}, true},
{&ps_dadd, {.d = {{2.5, 0.0}}}, {.d = {2.5 + 1.0000002433080226, 2.5 + 2.000000481493771}}, true}, {&ps_dadd, {.d = {{2.5, 0.0}}}, {.d = {2.5 + 1.0000002433080226, 2.5 + 2.000000481493771}}, true},
{&ps_dmin_dmax, {.d = {{-1.0, 1.0}}}, {.d = {-1.0, 1.0}}, true}, {&ps_dmin_dmax, {.d = {{-1.0, 1.0}}}, {.d = {-1.0, 1.0}}, true},
{&ps_dfma, {.d = {{1.0000002433080226, 2.000000481493771}}},
{.d = {1.0000002433080226 * 2.000000481493771 + 1.0000002433080226}}, true, true},
{&ps_dmovc, {.d = {{0.5, 0.0}}}, {.d = {4.5, 4.5}}, true, true}, {&ps_dmovc, {.d = {{0.5, 0.0}}}, {.d = {4.5, 4.5}}, true, true},
{&ps_dmovc, {.d = {{1.5, 0.0}}}, {.d = {1.5, 0.0}}, true, true}, {&ps_dmovc, {.d = {{1.5, 0.0}}}, {.d = {1.5, 0.0}}, true, true},
{&ps_dmodifier, {.d = {{1.5, 0.0}}}, {.d = {1.5f, 2.5f}}, true}, {&ps_dmodifier, {.d = {{1.5, 0.0}}}, {.d = {1.5f, 2.5f}}, true},