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
40ce3d16
Commit
40ce3d16
authored
Apr 29, 2015
by
Matteo Bruni
Committed by
Alexandre Julliard
Apr 29, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d9/tests: Add spotlight and light range tests.
parent
e4e78b0a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
71 additions
and
0 deletions
+71
-0
visual.c
dlls/d3d9/tests/visual.c
+71
-0
No files found.
dlls/d3d9/tests/visual.c
View file @
40ce3d16
...
...
@@ -28,6 +28,8 @@
* causes visible results in games can be tested in a way that does not depend on pixel exactness
*/
#include <math.h>
#define COBJMACROS
#include <d3d9.h>
#include "wine/test.h"
...
...
@@ -569,6 +571,33 @@ static void test_specular_lighting(void)
100
.
0
f
,
0
.
0
f
,
0
.
0
f
,
0
.
0
f
,
1
.
0
f
,
},
spot
=
{
D3DLIGHT_SPOT
,
{
0
.
0
f
,
0
.
0
f
,
0
.
0
f
,
0
.
0
f
},
{
1
.
0
f
,
1
.
0
f
,
1
.
0
f
,
0
.
0
f
},
{
0
.
0
f
,
0
.
0
f
,
0
.
0
f
,
0
.
0
f
},
{
0
.
0
f
,
0
.
0
f
,
0
.
0
f
},
{
0
.
0
f
,
0
.
0
f
,
1
.
0
f
},
100
.
0
f
,
1
.
0
f
,
0
.
0
f
,
0
.
0
f
,
1
.
0
f
,
M_PI
/
12
.
0
f
,
M_PI
/
3
.
0
f
},
/* The chosen range value makes the test fail when using a manhattan
* distance metric vs the correct euclidean distance. */
point_range
=
{
D3DLIGHT_POINT
,
{
0
.
0
f
,
0
.
0
f
,
0
.
0
f
,
0
.
0
f
},
{
1
.
0
f
,
1
.
0
f
,
1
.
0
f
,
0
.
0
f
},
{
0
.
0
f
,
0
.
0
f
,
0
.
0
f
,
0
.
0
f
},
{
0
.
0
f
,
0
.
0
f
,
0
.
0
f
},
{
0
.
0
f
,
0
.
0
f
,
0
.
0
f
},
1
.
2
f
,
0
.
0
f
,
0
.
0
f
,
0
.
0
f
,
1
.
0
f
,
};
static
const
struct
expected_color
{
...
...
@@ -622,6 +651,42 @@ static void test_specular_lighting(void)
{
160
,
360
,
0x00000000
},
{
320
,
360
,
0x00070707
},
{
480
,
360
,
0x00000000
},
},
expected_spot
[]
=
{
{
160
,
120
,
0x00000000
},
{
320
,
120
,
0x00141414
},
{
480
,
120
,
0x00000000
},
{
160
,
240
,
0x00141414
},
{
320
,
240
,
0x00ffffff
},
{
480
,
240
,
0x00141414
},
{
160
,
360
,
0x00000000
},
{
320
,
360
,
0x00141414
},
{
480
,
360
,
0x00000000
},
},
expected_spot_local
[]
=
{
{
160
,
120
,
0x00000000
},
{
320
,
120
,
0x00020202
},
{
480
,
120
,
0x00000000
},
{
160
,
240
,
0x00020202
},
{
320
,
240
,
0x00ffffff
},
{
480
,
240
,
0x00020202
},
{
160
,
360
,
0x00000000
},
{
320
,
360
,
0x00020202
},
{
480
,
360
,
0x00000000
},
},
expected_point_range
[]
=
{
{
160
,
120
,
0x00000000
},
{
320
,
120
,
0x005a5a5a
},
{
480
,
120
,
0x00000000
},
{
160
,
240
,
0x005a5a5a
},
{
320
,
240
,
0x00ffffff
},
{
480
,
240
,
0x005a5a5a
},
{
160
,
360
,
0x00000000
},
{
320
,
360
,
0x005a5a5a
},
{
480
,
360
,
0x00000000
},
};
static
const
struct
{
...
...
@@ -640,6 +705,12 @@ static void test_specular_lighting(void)
sizeof
(
expected_point
)
/
sizeof
(
expected_point
[
0
])},
{
&
point
,
TRUE
,
expected_point_local
,
sizeof
(
expected_point_local
)
/
sizeof
(
expected_point_local
[
0
])},
{
&
spot
,
FALSE
,
expected_spot
,
sizeof
(
expected_spot
)
/
sizeof
(
expected_spot
[
0
])},
{
&
spot
,
TRUE
,
expected_spot_local
,
sizeof
(
expected_spot_local
)
/
sizeof
(
expected_spot_local
[
0
])},
{
&
point_range
,
FALSE
,
expected_point_range
,
sizeof
(
expected_point_range
)
/
sizeof
(
expected_point_range
[
0
])},
};
IDirect3DDevice9
*
device
;
D3DMATERIAL9
material
;
...
...
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