Commit 43d4956c authored by Alexandre Julliard's avatar Alexandre Julliard

d3d9/tests: Use nameless unions/structs.

parent 8d86c6d9
......@@ -562,7 +562,7 @@ static void test_get_adapter_displaymode_ex(void)
devmode = startmode;
devmode.dmFields = DM_DISPLAYORIENTATION | DM_PELSWIDTH | DM_PELSHEIGHT;
S2(U1(devmode)).dmDisplayOrientation = DMDO_180;
devmode.dmDisplayOrientation = DMDO_180;
retval = ChangeDisplaySettingsExW(NULL, &devmode, NULL, 0, NULL);
if (retval == DISP_CHANGE_BADMODE)
{
......@@ -573,7 +573,7 @@ static void test_get_adapter_displaymode_ex(void)
ok(retval == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsEx failed with %ld.\n", retval);
/* try retrieve orientation info with EnumDisplaySettingsEx*/
devmode.dmFields = 0;
S2(U1(devmode)).dmDisplayOrientation = 0;
devmode.dmDisplayOrientation = 0;
ok(EnumDisplaySettingsExW(NULL, ENUM_CURRENT_SETTINGS, &devmode, EDS_ROTATEDMODE),
"EnumDisplaySettingsEx failed.\n");
......@@ -605,8 +605,8 @@ static void test_get_adapter_displaymode_ex(void)
ok(mode_ex.ScanLineOrdering != 0, "ScanLineOrdering returned 0\n");
/* Check that orientation is returned correctly by GetAdapterDisplayModeEx
* and EnumDisplaySettingsEx(). */
ok(S2(U1(devmode)).dmDisplayOrientation == DMDO_180 && rotation == D3DDISPLAYROTATION_180,
"rotation is %d instead of %ld\n", rotation, S2(U1(devmode)).dmDisplayOrientation);
ok(devmode.dmDisplayOrientation == DMDO_180 && rotation == D3DDISPLAYROTATION_180,
"rotation is %d instead of %ld\n", rotation, devmode.dmDisplayOrientation);
trace("GetAdapterDisplayModeEx returned Width = %d, Height = %d, RefreshRate = %d, Format = %x, ScanLineOrdering = %x, rotation = %d\n",
mode_ex.Width, mode_ex.Height, mode_ex.RefreshRate, mode_ex.Format, mode_ex.ScanLineOrdering, rotation);
......
......@@ -1017,14 +1017,14 @@ static void compare_matrix(const char *name, unsigned int chain_stage,
"\t\t%.8e, %.8e, %.8e, %.8e,\n"
"\t} received\n",
chain_stage, name,
U(*expected).m[0][0], U(*expected).m[1][0], U(*expected).m[2][0], U(*expected).m[3][0],
U(*expected).m[0][1], U(*expected).m[1][1], U(*expected).m[2][1], U(*expected).m[3][1],
U(*expected).m[0][2], U(*expected).m[1][2], U(*expected).m[2][2], U(*expected).m[3][2],
U(*expected).m[0][3], U(*expected).m[1][3], U(*expected).m[2][3], U(*expected).m[3][3],
U(*received).m[0][0], U(*received).m[1][0], U(*received).m[2][0], U(*received).m[3][0],
U(*received).m[0][1], U(*received).m[1][1], U(*received).m[2][1], U(*received).m[3][1],
U(*received).m[0][2], U(*received).m[1][2], U(*received).m[2][2], U(*received).m[3][2],
U(*received).m[0][3], U(*received).m[1][3], U(*received).m[2][3], U(*received).m[3][3]);
expected->m[0][0], expected->m[1][0], expected->m[2][0], expected->m[3][0],
expected->m[0][1], expected->m[1][1], expected->m[2][1], expected->m[3][1],
expected->m[0][2], expected->m[1][2], expected->m[2][2], expected->m[3][2],
expected->m[0][3], expected->m[1][3], expected->m[2][3], expected->m[3][3],
received->m[0][0], received->m[1][0], received->m[2][0], received->m[3][0],
received->m[0][1], received->m[1][1], received->m[2][1], received->m[3][1],
received->m[0][2], received->m[1][2], received->m[2][2], received->m[3][2],
received->m[0][3], received->m[1][3], received->m[2][3], received->m[3][3]);
}
static void transform_check_data(IDirect3DDevice9 *device, const struct state_test *test,
......
......@@ -5560,8 +5560,8 @@ static void texture_transform_flags_test(void)
ok(hr == S_OK, "Got hr %#lx.\n", hr);
/* What happens if 4 coords are used, but only 2 given ?*/
U(mat).m[2][0] = 1.0f;
U(mat).m[3][1] = 1.0f;
mat.m[2][0] = 1.0f;
mat.m[3][1] = 1.0f;
hr = IDirect3DDevice9_SetTransform(device, D3DTS_TEXTURE0, &mat);
ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirect3DDevice9_SetTextureStageState(device, 0, D3DTSS_TEXTURETRANSFORMFLAGS, D3DTTFF_COUNT4);
......@@ -12122,8 +12122,8 @@ static void test_pointsize(void)
ok(color == 0x00ffff00, "pSprite: Pixel (64+4),(64-4) has color 0x%08x, expected 0x00ffff00\n", color);
IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL);
U(matrix).m[0][0] = 1.0f / 64.0f;
U(matrix).m[1][1] = -1.0f / 64.0f;
matrix.m[0][0] = 1.0f / 64.0f;
matrix.m[1][1] = -1.0f / 64.0f;
hr = IDirect3DDevice9_SetTransform(device, D3DTS_PROJECTION, &matrix);
ok(SUCCEEDED(hr), "SetTransform failed, hr %#lx.\n", hr);
......@@ -12142,7 +12142,7 @@ static void test_pointsize(void)
ok(SUCCEEDED(hr), "Failed setting point scale attenuation coefficient, hr %#lx.\n", hr);
if (caps.VertexShaderVersion >= D3DVS_VERSION(1, 1))
{
hr = IDirect3DDevice9_SetVertexShaderConstantF(device, 0, &S(U(matrix))._11, 4);
hr = IDirect3DDevice9_SetVertexShaderConstantF(device, 0, &matrix._11, 4);
ok(SUCCEEDED(hr), "Failed to set vertex shader constants, hr %#lx.\n", hr);
}
......@@ -28062,8 +28062,8 @@ START_TEST(visual)
trace("Device name string: \"%s\"\n", identifier.DeviceName);
ok(identifier.DeviceName[0], "Empty device name.\n");
trace("Driver version %d.%d.%d.%d\n",
HIWORD(U(identifier.DriverVersion).HighPart), LOWORD(U(identifier.DriverVersion).HighPart),
HIWORD(U(identifier.DriverVersion).LowPart), LOWORD(U(identifier.DriverVersion).LowPart));
HIWORD(identifier.DriverVersion.HighPart), LOWORD(identifier.DriverVersion.HighPart),
HIWORD(identifier.DriverVersion.LowPart), LOWORD(identifier.DriverVersion.LowPart));
IDirect3D9_Release(d3d);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment