Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
9d9f580b
Commit
9d9f580b
authored
Apr 03, 2014
by
Henri Verbeet
Committed by
Alexandre Julliard
Apr 03, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d9/tests: Use a separate device for test_constant_clamp_vs().
parent
1e772e5d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
62 additions
and
37 deletions
+62
-37
visual.c
dlls/d3d9/tests/visual.c
+62
-37
No files found.
dlls/d3d9/tests/visual.c
View file @
9d9f580b
...
@@ -5444,12 +5444,18 @@ static void autogen_mipmap_test(IDirect3DDevice9 *device)
...
@@ -5444,12 +5444,18 @@ static void autogen_mipmap_test(IDirect3DDevice9 *device)
ok
(
hr
==
D3D_OK
,
"IDirect3DDevice9_Present failed with %08x
\n
"
,
hr
);
ok
(
hr
==
D3D_OK
,
"IDirect3DDevice9_Present failed with %08x
\n
"
,
hr
);
}
}
static
void
test_constant_clamp_vs
(
IDirect3DDevice9
*
device
)
static
void
test_constant_clamp_vs
(
void
)
{
{
IDirect3DVertexShader9
*
shader_11
,
*
shader_11_2
,
*
shader_20
,
*
shader_20_2
;
IDirect3DVertexShader9
*
shader_11
,
*
shader_11_2
,
*
shader_20
,
*
shader_20_2
;
IDirect3DVertexDeclaration9
*
decl
;
IDirect3DVertexDeclaration9
*
decl
;
IDirect3DDevice9
*
device
;
IDirect3D9
*
d3d
;
D3DCOLOR
color
;
ULONG
refcount
;
D3DCAPS9
caps
;
HWND
window
;
HRESULT
hr
;
HRESULT
hr
;
DWORD
color
;
static
const
DWORD
shader_code_11
[]
=
static
const
DWORD
shader_code_11
[]
=
{
{
0xfffe0101
,
/* vs_1_1 */
0xfffe0101
,
/* vs_1_1 */
...
@@ -5490,38 +5496,62 @@ static void test_constant_clamp_vs(IDirect3DDevice9 *device)
...
@@ -5490,38 +5496,62 @@ static void test_constant_clamp_vs(IDirect3DDevice9 *device)
0x02000001
,
0xc00f0000
,
0x90e40000
,
/* mov oPos, v0 */
0x02000001
,
0xc00f0000
,
0x90e40000
,
/* mov oPos, v0 */
0x0000ffff
/* end */
0x0000ffff
/* end */
};
};
static
const
D3DVERTEXELEMENT9
decl_elements
[]
=
{
static
const
D3DVERTEXELEMENT9
decl_elements
[]
=
{
{
0
,
0
,
D3DDECLTYPE_FLOAT3
,
D3DDECLMETHOD_DEFAULT
,
D3DDECLUSAGE_POSITION
,
0
},
{
0
,
0
,
D3DDECLTYPE_FLOAT3
,
D3DDECLMETHOD_DEFAULT
,
D3DDECLUSAGE_POSITION
,
0
},
D3DDECL_END
()
D3DDECL_END
()
};
};
float
quad1
[]
=
{
static
const
float
quad1
[]
=
-
1
.
0
,
-
1
.
0
,
0
.
1
,
{
0
.
0
,
-
1
.
0
,
0
.
1
,
-
1
.
0
f
,
-
1
.
0
f
,
0
.
1
f
,
-
1
.
0
,
0
.
0
,
0
.
1
,
-
1
.
0
f
,
0
.
0
f
,
0
.
1
f
,
0
.
0
,
0
.
0
,
0
.
1
0
.
0
f
,
-
1
.
0
f
,
0
.
1
f
,
0
.
0
f
,
0
.
0
f
,
0
.
1
f
,
};
};
float
quad2
[]
=
{
static
const
float
quad2
[]
=
0
.
0
,
-
1
.
0
,
0
.
1
,
{
1
.
0
,
-
1
.
0
,
0
.
1
,
0
.
0
f
,
-
1
.
0
f
,
0
.
1
f
,
0
.
0
,
0
.
0
,
0
.
1
,
0
.
0
f
,
0
.
0
f
,
0
.
1
f
,
1
.
0
,
0
.
0
,
0
.
1
1
.
0
f
,
-
1
.
0
f
,
0
.
1
f
,
1
.
0
f
,
0
.
0
f
,
0
.
1
f
,
};
};
float
quad3
[]
=
{
static
const
float
quad3
[]
=
0
.
0
,
0
.
0
,
0
.
1
,
{
1
.
0
,
0
.
0
,
0
.
1
,
0
.
0
f
,
0
.
0
f
,
0
.
1
f
,
0
.
0
,
1
.
0
,
0
.
1
,
0
.
0
f
,
1
.
0
f
,
0
.
1
f
,
1
.
0
,
1
.
0
,
0
.
1
1
.
0
f
,
0
.
0
f
,
0
.
1
f
,
1
.
0
f
,
1
.
0
f
,
0
.
1
f
,
};
};
float
quad4
[]
=
{
static
const
float
quad4
[]
=
-
1
.
0
,
0
.
0
,
0
.
1
,
{
0
.
0
,
0
.
0
,
0
.
1
,
-
1
.
0
f
,
0
.
0
f
,
0
.
1
f
,
-
1
.
0
,
1
.
0
,
0
.
1
,
-
1
.
0
f
,
1
.
0
f
,
0
.
1
f
,
0
.
0
,
1
.
0
,
0
.
1
0
.
0
f
,
0
.
0
f
,
0
.
1
f
,
0
.
0
f
,
1
.
0
f
,
0
.
1
f
,
};
};
float
test_data_c1
[
4
]
=
{
1
.
25
,
-
0
.
50
,
-
1
.
50
,
1
.
0
};
static
const
float
test_data_c1
[
4
]
=
{
1
.
25
f
,
-
0
.
50
f
,
-
1
.
50
f
,
1
.
0
f
};
float
test_data_c2
[
4
]
=
{
-
0
.
50
,
1
.
25
,
2
.
00
,
1
.
0
};
static
const
float
test_data_c2
[
4
]
=
{
-
0
.
50
f
,
1
.
25
f
,
2
.
00
f
,
1
.
0
f
};
hr
=
IDirect3DDevice9_Clear
(
device
,
0
,
NULL
,
D3DCLEAR_TARGET
,
0xff00ffff
,
0
.
0
,
0
);
window
=
CreateWindowA
(
"static"
,
"d3d9_test"
,
WS_OVERLAPPEDWINDOW
|
WS_VISIBLE
,
0
,
0
,
640
,
480
,
NULL
,
NULL
,
NULL
,
NULL
);
d3d
=
Direct3DCreate9
(
D3D_SDK_VERSION
);
ok
(
!!
d3d
,
"Failed to create a D3D object.
\n
"
);
if
(
!
(
device
=
create_device
(
d3d
,
window
,
window
,
TRUE
)))
{
skip
(
"Failed to create a D3D device, skipping tests.
\n
"
);
goto
done
;
}
hr
=
IDirect3DDevice9_GetDeviceCaps
(
device
,
&
caps
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get device caps, hr %#x.
\n
"
,
hr
);
if
(
caps
.
VertexShaderVersion
<
D3DVS_VERSION
(
1
,
1
))
{
skip
(
"No vs_1_1 support, skipping tests.
\n
"
);
IDirect3DDevice9_Release
(
device
);
goto
done
;
}
hr
=
IDirect3DDevice9_Clear
(
device
,
0
,
NULL
,
D3DCLEAR_TARGET
|
D3DCLEAR_ZBUFFER
,
0xff00ffff
,
1
.
0
f
,
0
);
ok
(
hr
==
D3D_OK
,
"IDirect3DDevice9_Clear returned %08x
\n
"
,
hr
);
ok
(
hr
==
D3D_OK
,
"IDirect3DDevice9_Clear returned %08x
\n
"
,
hr
);
hr
=
IDirect3DDevice9_CreateVertexShader
(
device
,
shader_code_11
,
&
shader_11
);
hr
=
IDirect3DDevice9_CreateVertexShader
(
device
,
shader_code_11
,
&
shader_11
);
...
@@ -5574,11 +5604,6 @@ static void test_constant_clamp_vs(IDirect3DDevice9 *device)
...
@@ -5574,11 +5604,6 @@ static void test_constant_clamp_vs(IDirect3DDevice9 *device)
ok
(
hr
==
D3D_OK
,
"IDirect3DDevice9_EndScene returned %08x
\n
"
,
hr
);
ok
(
hr
==
D3D_OK
,
"IDirect3DDevice9_EndScene returned %08x
\n
"
,
hr
);
}
}
hr
=
IDirect3DDevice9_SetVertexShader
(
device
,
NULL
);
ok
(
hr
==
D3D_OK
,
"IDirect3DDevice9_SetVertexShader returned %08x
\n
"
,
hr
);
hr
=
IDirect3DDevice9_SetVertexDeclaration
(
device
,
NULL
);
ok
(
hr
==
D3D_OK
,
"IDirect3DDevice9_SetVertexDeclaration returned %08x
\n
"
,
hr
);
color
=
getPixelColor
(
device
,
160
,
360
);
color
=
getPixelColor
(
device
,
160
,
360
);
ok
(
color_match
(
color
,
D3DCOLOR_ARGB
(
0x00
,
0xbf
,
0xbf
,
0x80
),
1
),
ok
(
color_match
(
color
,
D3DCOLOR_ARGB
(
0x00
,
0xbf
,
0xbf
,
0x80
),
1
),
"quad 1 has color %08x, expected 0x00bfbf80
\n
"
,
color
);
"quad 1 has color %08x, expected 0x00bfbf80
\n
"
,
color
);
...
@@ -5603,6 +5628,11 @@ static void test_constant_clamp_vs(IDirect3DDevice9 *device)
...
@@ -5603,6 +5628,11 @@ static void test_constant_clamp_vs(IDirect3DDevice9 *device)
if
(
shader_20
)
IDirect3DVertexShader9_Release
(
shader_20
);
if
(
shader_20
)
IDirect3DVertexShader9_Release
(
shader_20
);
IDirect3DVertexShader9_Release
(
shader_11_2
);
IDirect3DVertexShader9_Release
(
shader_11_2
);
IDirect3DVertexShader9_Release
(
shader_11
);
IDirect3DVertexShader9_Release
(
shader_11
);
refcount
=
IDirect3DDevice9_Release
(
device
);
ok
(
!
refcount
,
"Device has %u references left.
\n
"
,
refcount
);
done:
IDirect3D9_Release
(
d3d
);
DestroyWindow
(
window
);
}
}
static
void
constant_clamp_ps_test
(
void
)
static
void
constant_clamp_ps_test
(
void
)
...
@@ -16374,15 +16404,10 @@ START_TEST(visual)
...
@@ -16374,15 +16404,10 @@ START_TEST(visual)
alphatest_test
(
device_ptr
);
alphatest_test
(
device_ptr
);
viewport_test
(
device_ptr
);
viewport_test
(
device_ptr
);
if
(
caps
.
VertexShaderVersion
>=
D3DVS_VERSION
(
1
,
1
))
{
test_constant_clamp_vs
(
device_ptr
);
}
else
skip
(
"No vs_1_1 support
\n
"
);
cleanup_device
(
device_ptr
);
cleanup_device
(
device_ptr
);
device_ptr
=
NULL
;
device_ptr
=
NULL
;
test_constant_clamp_vs
();
test_compare_instructions
();
test_compare_instructions
();
test_mova
();
test_mova
();
loop_index_test
();
loop_index_test
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment