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
71fe9ae7
Commit
71fe9ae7
authored
Apr 20, 2007
by
Fabian Bieler
Committed by
Alexandre Julliard
Apr 23, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d9/tests: Fix fog with shader test.
parent
db6d0d1e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
29 deletions
+29
-29
visual.c
dlls/d3d9/tests/visual.c
+29
-29
No files found.
dlls/d3d9/tests/visual.c
View file @
71fe9ae7
...
...
@@ -753,19 +753,19 @@ static void fog_with_shader_test(IDirect3DDevice9 *device)
/* only pixel shader: */
{
0
,
1
,
0
,
3
,
{
0x0000ff00
,
0x0000ff00
,
0x0020df00
,
0x0040bf00
,
0x005fa000
,
0x007f8000
,
0x009f6000
,
0x00bf4000
,
0x00df2000
,
0x00ff0000
,
0x00
df2
000
}},
0x009f6000
,
0x00bf4000
,
0x00df2000
,
0x00ff0000
,
0x00
ff0
000
}},
{
0
,
1
,
1
,
3
,
{
0x0000ff00
,
0x0000ff00
,
0x0020df00
,
0x0040bf00
,
0x005fa000
,
0x007f8000
,
0x009f6000
,
0x00bf4000
,
0x00df2000
,
0x00ff0000
,
0x00
df2
000
}},
0x009f6000
,
0x00bf4000
,
0x00df2000
,
0x00ff0000
,
0x00
ff0
000
}},
{
0
,
1
,
2
,
3
,
{
0x0000ff00
,
0x0000ff00
,
0x0020df00
,
0x0040bf00
,
0x005fa000
,
0x007f8000
,
0x009f6000
,
0x00bf4000
,
0x00df2000
,
0x00ff0000
,
0x00
df2
000
}},
0x009f6000
,
0x00bf4000
,
0x00df2000
,
0x00ff0000
,
0x00
ff0
000
}},
{
0
,
1
,
3
,
0
,
{
0x0000ff00
,
0x0000ff00
,
0x0020df00
,
0x0040bf00
,
0x005fa000
,
0x007f8000
,
0x009f6000
,
0x00bf4000
,
0x00df2000
,
0x00ff0000
,
0x00
df2
000
}},
0x009f6000
,
0x00bf4000
,
0x00df2000
,
0x00ff0000
,
0x00
ff0
000
}},
{
0
,
1
,
3
,
3
,
{
0x0000ff00
,
0x0000ff00
,
0x0020df00
,
0x0040bf00
,
0x005fa000
,
0x007f8000
,
0x009f6000
,
0x00bf4000
,
0x00df2000
,
0x00ff0000
,
0x00
df2
000
}},
0x009f6000
,
0x00bf4000
,
0x00df2000
,
0x00ff0000
,
0x00
ff0
000
}},
/* vertex shader */
{
1
,
0
,
0
,
0
,
...
...
@@ -773,58 +773,58 @@ static void fog_with_shader_test(IDirect3DDevice9 *device)
0x0000ff00
,
0x0000ff00
,
0x0000ff00
,
0x0000ff00
,
0x0000ff00
}},
{
1
,
0
,
0
,
3
,
{
0x0000ff00
,
0x0000ff00
,
0x0020df00
,
0x0040bf00
,
0x005fa000
,
0x007f8000
,
0x009f6000
,
0x00bf4000
,
0x00df2000
,
0x00ff0000
,
0x00
df2
000
}},
0x009f6000
,
0x00bf4000
,
0x00df2000
,
0x00ff0000
,
0x00
ff0
000
}},
{
1
,
0
,
1
,
3
,
{
0x0000ff00
,
0x0000ff00
,
0x0020df00
,
0x0040bf00
,
0x005fa000
,
0x007f8000
,
0x009f6000
,
0x00bf4000
,
0x00df2000
,
0x00ff0000
,
0x00
df2
000
}},
0x009f6000
,
0x00bf4000
,
0x00df2000
,
0x00ff0000
,
0x00
ff0
000
}},
{
1
,
0
,
2
,
3
,
{
0x0000ff00
,
0x0000ff00
,
0x0020df00
,
0x0040bf00
,
0x005fa000
,
0x007f8000
,
0x009f6000
,
0x00bf4000
,
0x00df2000
,
0x00ff0000
,
0x00
df2
000
}},
0x009f6000
,
0x00bf4000
,
0x00df2000
,
0x00ff0000
,
0x00
ff0
000
}},
{
1
,
0
,
3
,
3
,
{
0x0000ff00
,
0x0000ff00
,
0x0020df00
,
0x0040bf00
,
0x005fa000
,
0x007f8000
,
0x009f6000
,
0x00bf4000
,
0x00df2000
,
0x00ff0000
,
0x00
df2
000
}},
0x009f6000
,
0x00bf4000
,
0x00df2000
,
0x00ff0000
,
0x00
ff0
000
}},
/* vertex shader and pixel shader */
{
1
,
1
,
0
,
3
,
{
0x0000ff00
,
0x0000ff00
,
0x0020df00
,
0x0040bf00
,
0x005fa000
,
0x007f8000
,
0x009f6000
,
0x00bf4000
,
0x00df2000
,
0x00ff0000
,
0x00
df2
000
}},
0x009f6000
,
0x00bf4000
,
0x00df2000
,
0x00ff0000
,
0x00
ff0
000
}},
{
1
,
1
,
1
,
3
,
{
0x0000ff00
,
0x0000ff00
,
0x0020df00
,
0x0040bf00
,
0x005fa000
,
0x007f8000
,
0x009f6000
,
0x00bf4000
,
0x00df2000
,
0x00ff0000
,
0x00
df2
000
}},
0x009f6000
,
0x00bf4000
,
0x00df2000
,
0x00ff0000
,
0x00
ff0
000
}},
{
1
,
1
,
2
,
3
,
{
0x0000ff00
,
0x0000ff00
,
0x0020df00
,
0x0040bf00
,
0x005fa000
,
0x007f8000
,
0x009f6000
,
0x00bf4000
,
0x00df2000
,
0x00ff0000
,
0x00
df2
000
}},
0x009f6000
,
0x00bf4000
,
0x00df2000
,
0x00ff0000
,
0x00
ff0
000
}},
{
1
,
1
,
3
,
3
,
{
0x0000ff00
,
0x0000ff00
,
0x0020df00
,
0x0040bf00
,
0x005fa000
,
0x007f8000
,
0x009f6000
,
0x00bf4000
,
0x00df2000
,
0x00ff0000
,
0x00
df2
000
}},
0x009f6000
,
0x00bf4000
,
0x00df2000
,
0x00ff0000
,
0x00
ff0
000
}},
/* foggy vertex shader */
{
2
,
0
,
0
,
0
,
{
0x00ff0000
,
0x00fe0100
,
0x00de2100
,
0x00bf4000
,
0x009f6000
,
0x007f8000
,
0x005fa000
,
0x003fc000
,
0x001fe000
,
0x0000ff00
,
0x00
1fe0
00
}},
0x005fa000
,
0x003fc000
,
0x001fe000
,
0x0000ff00
,
0x00
00ff
00
}},
{
2
,
0
,
1
,
0
,
{
0x00ff0000
,
0x00fe0100
,
0x00de2100
,
0x00bf4000
,
0x009f6000
,
0x007f8000
,
0x005fa000
,
0x003fc000
,
0x001fe000
,
0x0000ff00
,
0x00
1fe0
00
}},
0x005fa000
,
0x003fc000
,
0x001fe000
,
0x0000ff00
,
0x00
00ff
00
}},
{
2
,
0
,
2
,
0
,
{
0x00ff0000
,
0x00fe0100
,
0x00de2100
,
0x00bf4000
,
0x009f6000
,
0x007f8000
,
0x005fa000
,
0x003fc000
,
0x001fe000
,
0x0000ff00
,
0x00
1fe0
00
}},
0x005fa000
,
0x003fc000
,
0x001fe000
,
0x0000ff00
,
0x00
00ff
00
}},
{
2
,
0
,
3
,
0
,
{
0x00ff0000
,
0x00fe0100
,
0x00de2100
,
0x00bf4000
,
0x009f6000
,
0x007f8000
,
0x005fa000
,
0x003fc000
,
0x001fe000
,
0x0000ff00
,
0x00
1fe0
00
}},
0x005fa000
,
0x003fc000
,
0x001fe000
,
0x0000ff00
,
0x00
00ff
00
}},
/* foggy vertex shader and pixel shader */
{
2
,
1
,
0
,
0
,
{
0x00ff0000
,
0x00fe0100
,
0x00de2100
,
0x00bf4000
,
0x009f6000
,
0x007f8000
,
0x005fa000
,
0x003fc000
,
0x001fe000
,
0x0000ff00
,
0x00
1fe0
00
}},
0x005fa000
,
0x003fc000
,
0x001fe000
,
0x0000ff00
,
0x00
00ff
00
}},
{
2
,
1
,
1
,
0
,
{
0x00ff0000
,
0x00fe0100
,
0x00de2100
,
0x00bf4000
,
0x009f6000
,
0x007f8000
,
0x005fa000
,
0x003fc000
,
0x001fe000
,
0x0000ff00
,
0x00
1fe0
00
}},
0x005fa000
,
0x003fc000
,
0x001fe000
,
0x0000ff00
,
0x00
00ff
00
}},
{
2
,
1
,
2
,
0
,
{
0x00ff0000
,
0x00fe0100
,
0x00de2100
,
0x00bf4000
,
0x009f6000
,
0x007f8000
,
0x005fa000
,
0x003fc000
,
0x001fe000
,
0x0000ff00
,
0x00
1fe0
00
}},
0x005fa000
,
0x003fc000
,
0x001fe000
,
0x0000ff00
,
0x00
00ff
00
}},
{
2
,
1
,
3
,
0
,
{
0x00ff0000
,
0x00fe0100
,
0x00de2100
,
0x00bf4000
,
0x009f6000
,
0x007f8000
,
0x005fa000
,
0x003fc000
,
0x001fe000
,
0x0000ff00
,
0x00
1fe0
00
}},
0x005fa000
,
0x003fc000
,
0x001fe000
,
0x0000ff00
,
0x00
00ff
00
}},
};
...
...
@@ -837,9 +837,6 @@ static void fog_with_shader_test(IDirect3DDevice9 *device)
hr
=
IDirect3DDevice9_CreateVertexDeclaration
(
device
,
decl_elements
,
&
vertex_declaration
);
ok
(
SUCCEEDED
(
hr
),
"CreateVertexDeclaration failed (%08x)
\n
"
,
hr
);
hr
=
IDirect3DDevice9_Clear
(
device
,
0
,
NULL
,
D3DCLEAR_TARGET
,
0xffff00ff
,
0
.
0
,
0
);
ok
(
hr
==
D3D_OK
,
"IDirect3DDevice9_Clear failed (%08x)
\n
"
,
hr
);
/* Setup initial states: No lighting, fog on, fog color */
hr
=
IDirect3DDevice9_SetRenderState
(
device
,
D3DRS_LIGHTING
,
FALSE
);
ok
(
hr
==
D3D_OK
,
"Turning off lighting failed (%08x)
\n
"
,
hr
);
...
...
@@ -875,10 +872,13 @@ static void fog_with_shader_test(IDirect3DDevice9 *device)
for
(
j
=
0
;
j
<
11
;
j
++
)
{
/* Don't use the whole zrange to prevent rounding errors */
quad
[
0
].
z
=
0
.
001
f
+
(
float
)
j
/
10
.
001
f
;
quad
[
1
].
z
=
0
.
001
f
+
(
float
)
j
/
10
.
001
f
;
quad
[
2
].
z
=
0
.
001
f
+
(
float
)
j
/
10
.
001
f
;
quad
[
3
].
z
=
0
.
001
f
+
(
float
)
j
/
10
.
001
f
;
quad
[
0
].
z
=
0
.
001
f
+
(
float
)
j
/
10
.
02
f
;
quad
[
1
].
z
=
0
.
001
f
+
(
float
)
j
/
10
.
02
f
;
quad
[
2
].
z
=
0
.
001
f
+
(
float
)
j
/
10
.
02
f
;
quad
[
3
].
z
=
0
.
001
f
+
(
float
)
j
/
10
.
02
f
;
hr
=
IDirect3DDevice9_Clear
(
device
,
0
,
NULL
,
D3DCLEAR_TARGET
,
0xffff00ff
,
0
.
0
,
0
);
ok
(
hr
==
D3D_OK
,
"IDirect3DDevice9_Clear failed (%08x)
\n
"
,
hr
);
hr
=
IDirect3DDevice9_BeginScene
(
device
);
ok
(
hr
==
D3D_OK
,
"BeginScene returned failed (%08x)
\n
"
,
hr
);
...
...
@@ -896,7 +896,7 @@ static void fog_with_shader_test(IDirect3DDevice9 *device)
ok
((
unsigned
char
)(
color
)
==
((
unsigned
char
)
test_data
[
i
].
color
[
j
])
&&
abs
(
((
unsigned
char
)(
color
>>
8
))
-
(
unsigned
char
)(
test_data
[
i
].
color
[
j
]
>>
8
)
)
<
13
&&
abs
(
((
unsigned
char
)(
color
>>
16
))
-
(
unsigned
char
)(
test_data
[
i
].
color
[
j
]
>>
16
)
)
<
13
,
"fog ps%i vs%i fvm%i ftm%i
: got color %08x, expected %08x +-5%%
\n
"
,
test_data
[
i
].
vshader
,
test_data
[
i
].
pshader
,
test_data
[
i
].
vfog
,
test_data
[
i
].
tfog
,
color
,
test_data
[
i
].
color
[
j
]);
"fog ps%i vs%i fvm%i ftm%i
%d: got color %08x, expected %08x +-5%%
\n
"
,
test_data
[
i
].
vshader
,
test_data
[
i
].
pshader
,
test_data
[
i
].
vfog
,
test_data
[
i
].
tfog
,
j
,
color
,
test_data
[
i
].
color
[
j
]);
}
}
...
...
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