Commit 51f5bc90 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

d3d9/tests: Get rid of struct vertex.

parent e24ce4c1
......@@ -209,12 +209,6 @@ static void cleanup_device(IDirect3DDevice9 *device)
}
}
struct vertex
{
float x, y, z;
DWORD diffuse;
};
struct tvertex
{
float x, y, z, rhw;
......@@ -289,26 +283,31 @@ static void lighting_test(void)
0.0f, 0.0f, 1.0f, 0.0f,
0.0f, 0.0f, 0.0f, 1.0f,
}}};
static const struct vertex unlitquad[] =
static const struct
{
{-1.0f, -1.0f, 0.1f, 0xffff0000},
{-1.0f, 0.0f, 0.1f, 0xffff0000},
{ 0.0f, 0.0f, 0.1f, 0xffff0000},
{ 0.0f, -1.0f, 0.1f, 0xffff0000},
};
static const struct vertex litquad[] =
struct vec3 position;
DWORD diffuse;
}
unlitquad[] =
{
{-1.0f, 0.0f, 0.1f, 0xff00ff00},
{-1.0f, 1.0f, 0.1f, 0xff00ff00},
{ 0.0f, 1.0f, 0.1f, 0xff00ff00},
{ 0.0f, 0.0f, 0.1f, 0xff00ff00},
};
static const struct vertex lighting_test[] =
{{-1.0f, -1.0f, 0.1f}, 0xffff0000},
{{-1.0f, 0.0f, 0.1f}, 0xffff0000},
{{ 0.0f, 0.0f, 0.1f}, 0xffff0000},
{{ 0.0f, -1.0f, 0.1f}, 0xffff0000},
},
litquad[] =
{
{{-1.0f, 0.0f, 0.1f}, 0xff00ff00},
{{-1.0f, 1.0f, 0.1f}, 0xff00ff00},
{{ 0.0f, 1.0f, 0.1f}, 0xff00ff00},
{{ 0.0f, 0.0f, 0.1f}, 0xff00ff00},
},
lighting_test[] =
{
{-1.0f, -1.0f, 0.1f, 0x8000ff00},
{ 1.0f, -1.0f, 0.1f, 0x80000000},
{-1.0f, 1.0f, 0.1f, 0x8000ff00},
{ 1.0f, 1.0f, 0.1f, 0x80000000},
{{-1.0f, -1.0f, 0.1f}, 0x8000ff00},
{{ 1.0f, -1.0f, 0.1f}, 0x80000000},
{{-1.0f, 1.0f, 0.1f}, 0x8000ff00},
{{ 1.0f, 1.0f, 0.1f}, 0x80000000},
};
static const struct nvertex unlitnquad[] =
{
......@@ -1059,27 +1058,32 @@ static void fog_test(void)
{640.0f, 480.0f, 1.0f, 1.0f, 0xffffff00, 0xff000000},
{320.0f, 480.0f, 1.0f, 1.0f, 0xffffff00, 0xff000000},
};
static const struct vertex rev_fog_quads[] =
static const struct
{
{-1.0f, -1.0f, 0.1f, 0x000000ff},
{-1.0f, 0.0f, 0.1f, 0x000000ff},
{ 0.0f, 0.0f, 0.1f, 0x000000ff},
{ 0.0f, -1.0f, 0.1f, 0x000000ff},
struct vec3 position;
DWORD diffuse;
}
rev_fog_quads[] =
{
{{-1.0f, -1.0f, 0.1f}, 0x000000ff},
{{-1.0f, 0.0f, 0.1f}, 0x000000ff},
{{ 0.0f, 0.0f, 0.1f}, 0x000000ff},
{{ 0.0f, -1.0f, 0.1f}, 0x000000ff},
{ 0.0f, -1.0f, 0.9f, 0x000000ff},
{ 0.0f, 0.0f, 0.9f, 0x000000ff},
{ 1.0f, 0.0f, 0.9f, 0x000000ff},
{ 1.0f, -1.0f, 0.9f, 0x000000ff},
{{ 0.0f, -1.0f, 0.9f}, 0x000000ff},
{{ 0.0f, 0.0f, 0.9f}, 0x000000ff},
{{ 1.0f, 0.0f, 0.9f}, 0x000000ff},
{{ 1.0f, -1.0f, 0.9f}, 0x000000ff},
{ 0.0f, 0.0f, 0.4f, 0x000000ff},
{ 0.0f, 1.0f, 0.4f, 0x000000ff},
{ 1.0f, 1.0f, 0.4f, 0x000000ff},
{ 1.0f, 0.0f, 0.4f, 0x000000ff},
{{ 0.0f, 0.0f, 0.4f}, 0x000000ff},
{{ 0.0f, 1.0f, 0.4f}, 0x000000ff},
{{ 1.0f, 1.0f, 0.4f}, 0x000000ff},
{{ 1.0f, 0.0f, 0.4f}, 0x000000ff},
{-1.0f, 0.0f, 0.7f, 0x000000ff},
{-1.0f, 1.0f, 0.7f, 0x000000ff},
{ 0.0f, 1.0f, 0.7f, 0x000000ff},
{ 0.0f, 0.0f, 0.7f, 0x000000ff},
{{-1.0f, 0.0f, 0.7f}, 0x000000ff},
{{-1.0f, 1.0f, 0.7f}, 0x000000ff},
{{ 0.0f, 1.0f, 0.7f}, 0x000000ff},
{{ 0.0f, 0.0f, 0.7f}, 0x000000ff},
};
static const D3DMATRIX ident_mat =
{{{
......@@ -1903,12 +1907,17 @@ static void fog_with_shader_test(void)
0x02000001, 0x800f0800, 0x90e40000, /* mov oC0, v0 */
0x0000ffff
};
static struct vertex quad[] =
struct
{
struct vec3 position;
DWORD diffuse;
}
quad[] =
{
{-1.0f, -1.0f, 0.0f, 0xffff0000 },
{-1.0f, 1.0f, 0.0f, 0xffff0000 },
{ 1.0f, -1.0f, 0.0f, 0xffff0000 },
{ 1.0f, 1.0f, 0.0f, 0xffff0000 },
{{-1.0f, -1.0f, 0.0f}, 0xffff0000},
{{-1.0f, 1.0f, 0.0f}, 0xffff0000},
{{ 1.0f, -1.0f, 0.0f}, 0xffff0000},
{{ 1.0f, 1.0f, 0.0f}, 0xffff0000},
};
static const D3DVERTEXELEMENT9 decl_elements[] =
{
......@@ -2190,10 +2199,10 @@ static void fog_with_shader_test(void)
for(j=0; j < 11; j++)
{
/* Don't use the whole zrange to prevent rounding errors */
quad[0].z = 0.001f + (float)j / 10.02f;
quad[1].z = 0.001f + (float)j / 10.02f;
quad[2].z = 0.001f + (float)j / 10.02f;
quad[3].z = 0.001f + (float)j / 10.02f;
quad[0].position.z = 0.001f + (float)j / 10.02f;
quad[1].position.z = 0.001f + (float)j / 10.02f;
quad[2].position.z = 0.001f + (float)j / 10.02f;
quad[3].position.z = 0.001f + (float)j / 10.02f;
hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, 0xffff00ff, 1.0f, 0);
ok(hr == D3D_OK, "IDirect3DDevice9_Clear failed (%08x)\n", hr);
......@@ -2622,19 +2631,24 @@ static void z_range_test(void)
HWND window;
HRESULT hr;
static const struct vertex quad[] =
static const struct
{
{-1.0f, 0.0f, 1.1f, 0xffff0000},
{-1.0f, 1.0f, 1.1f, 0xffff0000},
{ 1.0f, 0.0f, -1.1f, 0xffff0000},
{ 1.0f, 1.0f, -1.1f, 0xffff0000},
};
static const struct vertex quad2[] =
struct vec3 position;
DWORD diffuse;
}
quad[] =
{
{{-1.0f, 0.0f, 1.1f}, 0xffff0000},
{{-1.0f, 1.0f, 1.1f}, 0xffff0000},
{{ 1.0f, 0.0f, -1.1f}, 0xffff0000},
{{ 1.0f, 1.0f, -1.1f}, 0xffff0000},
},
quad2[] =
{
{-1.0f, 0.0f, 1.1f, 0xff0000ff},
{-1.0f, 1.0f, 1.1f, 0xff0000ff},
{ 1.0f, 0.0f, -1.1f, 0xff0000ff},
{ 1.0f, 1.0f, -1.1f, 0xff0000ff},
{{-1.0f, 0.0f, 1.1f}, 0xff0000ff},
{{-1.0f, 1.0f, 1.1f}, 0xff0000ff},
{{ 1.0f, 0.0f, -1.1f}, 0xff0000ff},
{{ 1.0f, 1.0f, -1.1f}, 0xff0000ff},
};
static const struct tvertex quad3[] =
{
......@@ -3635,15 +3649,20 @@ static void release_buffer_test(void)
LONG ref;
static const short indices[] = {3, 4, 5};
static const struct vertex quad[] =
static const struct
{
struct vec3 position;
DWORD diffuse;
}
quad[] =
{
{-1.0f, -1.0f, 0.1f, 0xffff0000},
{-1.0f, 1.0f, 0.1f, 0xffff0000},
{ 1.0f, 1.0f, 0.1f, 0xffff0000},
{{-1.0f, -1.0f, 0.1f}, 0xffff0000},
{{-1.0f, 1.0f, 0.1f}, 0xffff0000},
{{ 1.0f, 1.0f, 0.1f}, 0xffff0000},
{-1.0f, -1.0f, 0.1f, 0xff00ff00},
{-1.0f, 1.0f, 0.1f, 0xff00ff00},
{ 1.0f, 1.0f, 0.1f, 0xff00ff00},
{{-1.0f, -1.0f, 0.1f}, 0xff00ff00},
{{-1.0f, 1.0f, 0.1f}, 0xff00ff00},
{{ 1.0f, 1.0f, 0.1f}, 0xff00ff00},
};
window = CreateWindowA("static", "d3d9_test", WS_OVERLAPPEDWINDOW | WS_VISIBLE,
......@@ -7143,26 +7162,31 @@ static void test_vshader_input(void)
1.0f, -1.0f, 0.1f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f,
1.0f, 0.0f, 0.1f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f,
};
static const struct vertex quad1_color[] =
static const struct
{
{-1.0f, -1.0f, 0.1f, 0x00ff8040},
{-1.0f, 0.0f, 0.1f, 0x00ff8040},
{ 0.0f, -1.0f, 0.1f, 0x00ff8040},
{ 0.0f, 0.0f, 0.1f, 0x00ff8040},
};
static const struct vertex quad2_color[] =
struct vec3 position;
DWORD diffuse;
}
quad1_color[] =
{
{ 0.0f, -1.0f, 0.1f, 0x00ff8040},
{ 0.0f, 0.0f, 0.1f, 0x00ff8040},
{ 1.0f, -1.0f, 0.1f, 0x00ff8040},
{ 1.0f, 0.0f, 0.1f, 0x00ff8040},
};
static const struct vertex quad3_color[] =
{{-1.0f, -1.0f, 0.1f}, 0x00ff8040},
{{-1.0f, 0.0f, 0.1f}, 0x00ff8040},
{{ 0.0f, -1.0f, 0.1f}, 0x00ff8040},
{{ 0.0f, 0.0f, 0.1f}, 0x00ff8040},
},
quad2_color[] =
{
{{ 0.0f, -1.0f, 0.1f}, 0x00ff8040},
{{ 0.0f, 0.0f, 0.1f}, 0x00ff8040},
{{ 1.0f, -1.0f, 0.1f}, 0x00ff8040},
{{ 1.0f, 0.0f, 0.1f}, 0x00ff8040},
},
quad3_color[] =
{
{-1.0f, 0.0f, 0.1f, 0x00ff8040},
{-1.0f, 1.0f, 0.1f, 0x00ff8040},
{ 0.0f, 0.0f, 0.1f, 0x00ff8040},
{ 0.0f, 1.0f, 0.1f, 0x00ff8040},
{{-1.0f, 0.0f, 0.1f}, 0x00ff8040},
{{-1.0f, 1.0f, 0.1f}, 0x00ff8040},
{{ 0.0f, 0.0f, 0.1f}, 0x00ff8040},
{{ 0.0f, 1.0f, 0.1f}, 0x00ff8040},
};
static const float quad4_color[] =
{
......@@ -7612,22 +7636,27 @@ static void shademode_test(void)
HRESULT hr;
UINT i, j;
static const struct vertex quad_strip[] =
static const struct
{
{-1.0f, -1.0f, 0.0f, 0xffff0000},
{-1.0f, 1.0f, 0.0f, 0xff00ff00},
{ 1.0f, -1.0f, 0.0f, 0xff0000ff},
{ 1.0f, 1.0f, 0.0f, 0xffffffff},
};
static const struct vertex quad_list[] =
struct vec3 position;
DWORD diffuse;
}
quad_strip[] =
{
{-1.0f, -1.0f, 0.0f, 0xffff0000},
{-1.0f, 1.0f, 0.0f, 0xff00ff00},
{ 1.0f, -1.0f, 0.0f, 0xff0000ff},
{{-1.0f, -1.0f, 0.0f}, 0xffff0000},
{{-1.0f, 1.0f, 0.0f}, 0xff00ff00},
{{ 1.0f, -1.0f, 0.0f}, 0xff0000ff},
{{ 1.0f, 1.0f, 0.0f}, 0xffffffff},
},
quad_list[] =
{
{{-1.0f, -1.0f, 0.0f}, 0xffff0000},
{{-1.0f, 1.0f, 0.0f}, 0xff00ff00},
{{ 1.0f, -1.0f, 0.0f}, 0xff0000ff},
{ 1.0f, -1.0f, 0.0f, 0xff0000ff},
{-1.0f, 1.0f, 0.0f, 0xff00ff00},
{ 1.0f, 1.0f, 0.0f, 0xffffffff},
{{ 1.0f, -1.0f, 0.0f}, 0xff0000ff},
{{-1.0f, 1.0f, 0.0f}, 0xff00ff00},
{{ 1.0f, 1.0f, 0.0f}, 0xffffffff},
};
window = CreateWindowA("static", "d3d9_test", WS_OVERLAPPEDWINDOW | WS_VISIBLE,
......@@ -7760,19 +7789,24 @@ static void alpha_test(void)
HWND window;
HRESULT hr;
static const struct vertex quad1[] =
static const struct
{
{-1.0f, -1.0f, 0.1f, 0x4000ff00},
{-1.0f, 0.0f, 0.1f, 0x4000ff00},
{ 1.0f, -1.0f, 0.1f, 0x4000ff00},
{ 1.0f, 0.0f, 0.1f, 0x4000ff00},
};
static const struct vertex quad2[] =
struct vec3 position;
DWORD diffuse;
}
quad1[] =
{
{{-1.0f, -1.0f, 0.1f}, 0x4000ff00},
{{-1.0f, 0.0f, 0.1f}, 0x4000ff00},
{{ 1.0f, -1.0f, 0.1f}, 0x4000ff00},
{{ 1.0f, 0.0f, 0.1f}, 0x4000ff00},
},
quad2[] =
{
{-1.0f, 0.0f, 0.1f, 0xc00000ff},
{-1.0f, 1.0f, 0.1f, 0xc00000ff},
{ 1.0f, 0.0f, 0.1f, 0xc00000ff},
{ 1.0f, 1.0f, 0.1f, 0xc00000ff},
{{-1.0f, 0.0f, 0.1f}, 0xc00000ff},
{{-1.0f, 1.0f, 0.1f}, 0xc00000ff},
{{ 1.0f, 0.0f, 0.1f}, 0xc00000ff},
{{ 1.0f, 1.0f, 0.1f}, 0xc00000ff},
};
static const float composite_quad[][5] =
{
......@@ -7970,19 +8004,24 @@ static void fixed_function_decl_test(void)
{0, 16, D3DDECLTYPE_D3DCOLOR, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_COLOR, 0},
D3DDECL_END()
};
static const struct vertex quad1[] = /* D3DCOLOR */
static const struct
{
{-1.0f, -1.0f, 0.1f, 0x00ffff00},
{-1.0f, 0.0f, 0.1f, 0x00ffff00},
{ 0.0f, -1.0f, 0.1f, 0x00ffff00},
{ 0.0f, 0.0f, 0.1f, 0x00ffff00},
};
static const struct vertex quad2[] = /* UBYTE4N */
struct vec3 position;
DWORD diffuse;
}
quad1[] = /* D3DCOLOR */
{
{-1.0f, 0.0f, 0.1f, 0x00ffff00},
{-1.0f, 1.0f, 0.1f, 0x00ffff00},
{ 0.0f, 0.0f, 0.1f, 0x00ffff00},
{ 0.0f, 1.0f, 0.1f, 0x00ffff00},
{{-1.0f, -1.0f, 0.1f}, 0x00ffff00},
{{-1.0f, 0.0f, 0.1f}, 0x00ffff00},
{{ 0.0f, -1.0f, 0.1f}, 0x00ffff00},
{{ 0.0f, 0.0f, 0.1f}, 0x00ffff00},
},
quad2[] = /* UBYTE4N */
{
{{-1.0f, 0.0f, 0.1f}, 0x00ffff00},
{{-1.0f, 1.0f, 0.1f}, 0x00ffff00},
{{ 0.0f, 0.0f, 0.1f}, 0x00ffff00},
{{ 0.0f, 1.0f, 0.1f}, 0x00ffff00},
};
static const struct vertex_shortcolor quad3[] = /* short */
{
......@@ -9200,12 +9239,17 @@ static void stencil_cull_test(void)
-1.0, 1.0, 0.1,
0.0, 1.0, 0.1,
};
struct vertex painter[] =
struct
{
{-1.0, -1.0, 0.0, 0x00000000},
{ 1.0, -1.0, 0.0, 0x00000000},
{-1.0, 1.0, 0.0, 0x00000000},
{ 1.0, 1.0, 0.0, 0x00000000},
struct vec3 position;
DWORD diffuse;
}
painter[] =
{
{{-1.0f, -1.0f, 0.0f}, 0x00000000},
{{ 1.0f, -1.0f, 0.0f}, 0x00000000},
{{-1.0f, 1.0f, 0.0f}, 0x00000000},
{{ 1.0f, 1.0f, 0.0f}, 0x00000000},
};
static const WORD indices_cw[] = {0, 1, 3};
static const WORD indices_ccw[] = {0, 2, 3};
......@@ -10126,21 +10170,26 @@ static void pixelshader_blending_test(void)
{ 0.5f, -0.5f, 0.1f, 1.0f, 0.0f},
{ 0.5f, 0.5f, 0.1f, 1.0f, 1.0f},
};
static const struct
{
struct vec3 position;
DWORD diffuse;
}
/* Quad with R=0x10, G=0x20 */
static const struct vertex quad1[] =
quad1[] =
{
{-1.0f, -1.0f, 0.1f, 0x80102000},
{-1.0f, 1.0f, 0.1f, 0x80102000},
{ 1.0f, -1.0f, 0.1f, 0x80102000},
{ 1.0f, 1.0f, 0.1f, 0x80102000},
};
{{-1.0f, -1.0f, 0.1f}, 0x80102000},
{{-1.0f, 1.0f, 0.1f}, 0x80102000},
{{ 1.0f, -1.0f, 0.1f}, 0x80102000},
{{ 1.0f, 1.0f, 0.1f}, 0x80102000},
},
/* Quad with R=0x20, G=0x10 */
static const struct vertex quad2[] =
quad2[] =
{
{-1.0f, -1.0f, 0.1f, 0x80201000},
{-1.0f, 1.0f, 0.1f, 0x80201000},
{ 1.0f, -1.0f, 0.1f, 0x80201000},
{ 1.0f, 1.0f, 0.1f, 0x80201000},
{{-1.0f, -1.0f, 0.1f}, 0x80201000},
{{-1.0f, 1.0f, 0.1f}, 0x80201000},
{{ 1.0f, -1.0f, 0.1f}, 0x80201000},
{{ 1.0f, 1.0f, 0.1f}, 0x80201000},
};
window = CreateWindowA("static", "d3d9_test", WS_OVERLAPPEDWINDOW | WS_VISIBLE,
......@@ -10296,12 +10345,17 @@ static void tssargtemp_test(void)
HWND window;
HRESULT hr;
static const struct vertex quad[] =
static const struct
{
{-1.0f, -1.0f, 0.1f, 0x00ff0000},
{-1.0f, 1.0f, 0.1f, 0x00ff0000},
{ 1.0f, -1.0f, 0.1f, 0x00ff0000},
{ 1.0f, 1.0f, 0.1f, 0x00ff0000},
struct vec3 position;
DWORD diffuse;
}
quad[] =
{
{{-1.0f, -1.0f, 0.1f}, 0x00ff0000},
{{-1.0f, 1.0f, 0.1f}, 0x00ff0000},
{{ 1.0f, -1.0f, 0.1f}, 0x00ff0000},
{{ 1.0f, 1.0f, 0.1f}, 0x00ff0000},
};
window = CreateWindowA("static", "d3d9_test", WS_OVERLAPPEDWINDOW | WS_VISIBLE,
......@@ -11430,12 +11484,17 @@ static void alphareplicate_test(void)
HWND window;
HRESULT hr;
static const struct vertex quad[] =
static const struct
{
{-1.0f, -1.0f, 0.1f, 0x80ff00ff},
{-1.0f, 1.0f, 0.1f, 0x80ff00ff},
{ 1.0f, -1.0f, 0.1f, 0x80ff00ff},
{ 1.0f, 1.0f, 0.1f, 0x80ff00ff},
struct vec3 position;
DWORD diffuse;
}
quad[] =
{
{{-1.0f, -1.0f, 0.1f}, 0x80ff00ff},
{{-1.0f, 1.0f, 0.1f}, 0x80ff00ff},
{{ 1.0f, -1.0f, 0.1f}, 0x80ff00ff},
{{ 1.0f, 1.0f, 0.1f}, 0x80ff00ff},
};
window = CreateWindowA("static", "d3d9_test", WS_OVERLAPPEDWINDOW | WS_VISIBLE,
......@@ -11489,12 +11548,17 @@ static void dp3_alpha_test(void)
HWND window;
HRESULT hr;
static const struct vertex quad[] =
static const struct
{
struct vec3 position;
DWORD diffuse;
}
quad[] =
{
{-1.0f, -1.0f, 0.1f, 0x408080c0},
{-1.0f, 1.0f, 0.1f, 0x408080c0},
{ 1.0f, -1.0f, 0.1f, 0x408080c0},
{ 1.0f, 1.0f, 0.1f, 0x408080c0},
{{-1.0f, -1.0f, 0.1f}, 0x408080c0},
{{-1.0f, 1.0f, 0.1f}, 0x408080c0},
{{ 1.0f, -1.0f, 0.1f}, 0x408080c0},
{{ 1.0f, 1.0f, 0.1f}, 0x408080c0},
};
window = CreateWindowA("static", "d3d9_test", WS_OVERLAPPEDWINDOW | WS_VISIBLE,
......@@ -11581,19 +11645,24 @@ static void zwriteenable_test(void)
HWND window;
HRESULT hr;
static const struct vertex quad1[] =
static const struct
{
{-1.0f, -1.0f, 0.1f, 0x00ff0000},
{-1.0f, 1.0f, 0.1f, 0x00ff0000},
{ 1.0f, -1.0f, 0.1f, 0x00ff0000},
{ 1.0f, 1.0f, 0.1f, 0x00ff0000},
};
static const struct vertex quad2[] =
struct vec3 position;
DWORD diffuse;
}
quad1[] =
{
{{-1.0f, -1.0f, 0.1f}, 0x00ff0000},
{{-1.0f, 1.0f, 0.1f}, 0x00ff0000},
{{ 1.0f, -1.0f, 0.1f}, 0x00ff0000},
{{ 1.0f, 1.0f, 0.1f}, 0x00ff0000},
},
quad2[] =
{
{-1.0f, -1.0f, 0.9f, 0x0000ff00},
{-1.0f, 1.0f, 0.9f, 0x0000ff00},
{ 1.0f, -1.0f, 0.9f, 0x0000ff00},
{ 1.0f, 1.0f, 0.9f, 0x0000ff00},
{{-1.0f, -1.0f, 0.9f}, 0x0000ff00},
{{-1.0f, 1.0f, 0.9f}, 0x0000ff00},
{{ 1.0f, -1.0f, 0.9f}, 0x0000ff00},
{{ 1.0f, 1.0f, 0.9f}, 0x0000ff00},
};
window = CreateWindowA("static", "d3d9_test", WS_OVERLAPPEDWINDOW | WS_VISIBLE,
......@@ -11685,12 +11754,17 @@ static void alphatest_test(void)
{D3DCMP_GREATEREQUAL, ALPHATEST_FAILED, ALPHATEST_PASSED, ALPHATEST_PASSED},
{D3DCMP_ALWAYS, ALPHATEST_PASSED, ALPHATEST_PASSED, ALPHATEST_PASSED},
};
static const struct vertex quad[] =
static const struct
{
{-1.0f, -1.0f, 0.1f, ALPHATEST_PASSED | 0x80000000},
{-1.0f, 1.0f, 0.1f, ALPHATEST_PASSED | 0x80000000},
{ 1.0f, -1.0f, 0.1f, ALPHATEST_PASSED | 0x80000000},
{ 1.0f, 1.0f, 0.1f, ALPHATEST_PASSED | 0x80000000},
struct vec3 position;
DWORD diffuse;
}
quad[] =
{
{{-1.0f, -1.0f, 0.1f}, ALPHATEST_PASSED | 0x80000000},
{{-1.0f, 1.0f, 0.1f}, ALPHATEST_PASSED | 0x80000000},
{{ 1.0f, -1.0f, 0.1f}, ALPHATEST_PASSED | 0x80000000},
{{ 1.0f, 1.0f, 0.1f}, ALPHATEST_PASSED | 0x80000000},
};
window = CreateWindowA("static", "d3d9_test", WS_OVERLAPPEDWINDOW | WS_VISIBLE,
......@@ -12266,19 +12340,24 @@ static void depth_clamp_test(void)
{ 42.0f, 108.0f, 10.0f, 1.0f, 0xffffffff},
{112.0f, 108.0f, 10.0f, 1.0f, 0xffffffff},
};
static const struct vertex quad5[] =
static const struct
{
{ -0.5f, 0.5f, 10.0f, 0xff14f914},
{ 0.5f, 0.5f, 10.0f, 0xff14f914},
{ -0.5f, -0.5f, 10.0f, 0xff14f914},
{ 0.5f, -0.5f, 10.0f, 0xff14f914},
};
static const struct vertex quad6[] =
struct vec3 position;
DWORD diffuse;
}
quad5[] =
{
{{-0.5f, 0.5f, 10.0f}, 0xff14f914},
{{ 0.5f, 0.5f, 10.0f}, 0xff14f914},
{{-0.5f, -0.5f, 10.0f}, 0xff14f914},
{{ 0.5f, -0.5f, 10.0f}, 0xff14f914},
},
quad6[] =
{
{ -1.0f, 0.5f, 10.0f, 0xfff91414},
{ 1.0f, 0.5f, 10.0f, 0xfff91414},
{ -1.0f, 0.25f, 10.0f, 0xfff91414},
{ 1.0f, 0.25f, 10.0f, 0xfff91414},
{{-1.0f, 0.5f, 10.0f}, 0xfff91414},
{{ 1.0f, 0.5f, 10.0f}, 0xfff91414},
{{-1.0f, 0.25f, 10.0f}, 0xfff91414},
{{ 1.0f, 0.25f, 10.0f}, 0xfff91414},
};
window = CreateWindowA("static", "d3d9_test", WS_OVERLAPPEDWINDOW | WS_VISIBLE,
......@@ -12534,26 +12613,31 @@ done:
static void depth_buffer_test(void)
{
static const struct vertex quad1[] =
static const struct
{
{ -1.0, 1.0, 0.33f, 0xff00ff00},
{ 1.0, 1.0, 0.33f, 0xff00ff00},
{ -1.0, -1.0, 0.33f, 0xff00ff00},
{ 1.0, -1.0, 0.33f, 0xff00ff00},
};
static const struct vertex quad2[] =
struct vec3 position;
DWORD diffuse;
}
quad1[] =
{
{ -1.0, 1.0, 0.50f, 0xffff00ff},
{ 1.0, 1.0, 0.50f, 0xffff00ff},
{ -1.0, -1.0, 0.50f, 0xffff00ff},
{ 1.0, -1.0, 0.50f, 0xffff00ff},
};
static const struct vertex quad3[] =
{{-1.0, 1.0, 0.33f}, 0xff00ff00},
{{ 1.0, 1.0, 0.33f}, 0xff00ff00},
{{-1.0, -1.0, 0.33f}, 0xff00ff00},
{{ 1.0, -1.0, 0.33f}, 0xff00ff00},
},
quad2[] =
{
{{-1.0, 1.0, 0.50f}, 0xffff00ff},
{{ 1.0, 1.0, 0.50f}, 0xffff00ff},
{{-1.0, -1.0, 0.50f}, 0xffff00ff},
{{ 1.0, -1.0, 0.50f}, 0xffff00ff},
},
quad3[] =
{
{ -1.0, 1.0, 0.66f, 0xffff0000},
{ 1.0, 1.0, 0.66f, 0xffff0000},
{ -1.0, -1.0, 0.66f, 0xffff0000},
{ 1.0, -1.0, 0.66f, 0xffff0000},
{{-1.0, 1.0, 0.66f}, 0xffff0000},
{{ 1.0, 1.0, 0.66f}, 0xffff0000},
{{-1.0, -1.0, 0.66f}, 0xffff0000},
{{ 1.0, -1.0, 0.66f}, 0xffff0000},
};
static const DWORD expected_colors[4][4] =
{
......@@ -12686,12 +12770,17 @@ done:
* the following draw should only copy back the part that was modified. */
static void depth_buffer2_test(void)
{
static const struct vertex quad[] =
static const struct
{
{ -1.0, 1.0, 0.66f, 0xffff0000},
{ 1.0, 1.0, 0.66f, 0xffff0000},
{ -1.0, -1.0, 0.66f, 0xffff0000},
{ 1.0, -1.0, 0.66f, 0xffff0000},
struct vec3 position;
DWORD diffuse;
}
quad[] =
{
{{-1.0f, 1.0f, 0.66f}, 0xffff0000},
{{ 1.0f, 1.0f, 0.66f}, 0xffff0000},
{{-1.0f, -1.0f, 0.66f}, 0xffff0000},
{{ 1.0f, -1.0f, 0.66f}, 0xffff0000},
};
IDirect3DSurface9 *backbuffer, *rt1, *rt2;
......@@ -12799,19 +12888,24 @@ done:
static void depth_blit_test(void)
{
static const struct vertex quad1[] =
static const struct
{
{ -1.0, 1.0, 0.33f, 0xff00ff00},
{ 1.0, 1.0, 0.33f, 0xff00ff00},
{ -1.0, -1.0, 0.33f, 0xff00ff00},
{ 1.0, -1.0, 0.33f, 0xff00ff00},
};
static const struct vertex quad2[] =
struct vec3 position;
DWORD diffuse;
}
quad1[] =
{
{ -1.0, 1.0, 0.66f, 0xff0000ff},
{ 1.0, 1.0, 0.66f, 0xff0000ff},
{ -1.0, -1.0, 0.66f, 0xff0000ff},
{ 1.0, -1.0, 0.66f, 0xff0000ff},
{{-1.0f, 1.0f, 0.33f}, 0xff00ff00},
{{ 1.0f, 1.0f, 0.33f}, 0xff00ff00},
{{-1.0f, -1.0f, 0.33f}, 0xff00ff00},
{{ 1.0f, -1.0f, 0.33f}, 0xff00ff00},
},
quad2[] =
{
{{-1.0f, 1.0f, 0.66f}, 0xff0000ff},
{{ 1.0f, 1.0f, 0.66f}, 0xff0000ff},
{{-1.0f, -1.0f, 0.66f}, 0xff0000ff},
{{ 1.0f, -1.0f, 0.66f}, 0xff0000ff},
};
static const DWORD expected_colors[4][4] =
{
......@@ -13479,19 +13573,24 @@ done:
static void clip_planes(IDirect3DDevice9 *device, const char *test_name)
{
static const struct vertex quad1[] =
static const struct
{
{-1.0f, -1.0f, 0.0f, 0xfff9e814},
{-1.0f, 1.0f, 0.0f, 0xfff9e814},
{ 1.0f, -1.0f, 0.0f, 0xfff9e814},
{ 1.0f, 1.0f, 0.0f, 0xfff9e814},
};
static const struct vertex quad2[] =
struct vec3 position;
DWORD diffuse;
}
quad1[] =
{
{{-1.0f, -1.0f, 0.0f}, 0xfff9e814},
{{-1.0f, 1.0f, 0.0f}, 0xfff9e814},
{{ 1.0f, -1.0f, 0.0f}, 0xfff9e814},
{{ 1.0f, 1.0f, 0.0f}, 0xfff9e814},
},
quad2[] =
{
{-1.0f, -1.0f, 0.0f, 0xff002b7f},
{-1.0f, 1.0f, 0.0f, 0xff002b7f},
{ 1.0f, -1.0f, 0.0f, 0xff002b7f},
{ 1.0f, 1.0f, 0.0f, 0xff002b7f},
{{-1.0f, -1.0f, 0.0f}, 0xff002b7f},
{{-1.0f, 1.0f, 0.0f}, 0xff002b7f},
{{ 1.0f, -1.0f, 0.0f}, 0xff002b7f},
{{ 1.0f, 1.0f, 0.0f}, 0xff002b7f},
};
D3DCOLOR color;
HRESULT hr;
......
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