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
878414a5
Commit
878414a5
authored
Jul 24, 2007
by
Stefan Dösinger
Committed by
Alexandre Julliard
Aug 03, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d9: Some visual test fixes.
parent
df75a7e0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
5 deletions
+26
-5
visual.c
dlls/d3d9/tests/visual.c
+26
-5
No files found.
dlls/d3d9/tests/visual.c
View file @
878414a5
...
@@ -429,6 +429,7 @@ static void fog_test(IDirect3DDevice9 *device)
...
@@ -429,6 +429,7 @@ static void fog_test(IDirect3DDevice9 *device)
HRESULT
hr
;
HRESULT
hr
;
DWORD
color
;
DWORD
color
;
float
start
=
0
.
0
f
,
end
=
1
.
0
f
;
float
start
=
0
.
0
f
,
end
=
1
.
0
f
;
D3DCAPS9
caps
;
/* Gets full z based fog with linear fog, no fog with specular color */
/* Gets full z based fog with linear fog, no fog with specular color */
struct
sVertex
unstransformed_1
[]
=
{
struct
sVertex
unstransformed_1
[]
=
{
...
@@ -461,6 +462,9 @@ static void fog_test(IDirect3DDevice9 *device)
...
@@ -461,6 +462,9 @@ static void fog_test(IDirect3DDevice9 *device)
};
};
WORD
Indices
[]
=
{
0
,
1
,
2
,
2
,
3
,
0
};
WORD
Indices
[]
=
{
0
,
1
,
2
,
2
,
3
,
0
};
memset
(
&
caps
,
0
,
sizeof
(
caps
));
hr
=
IDirect3DDevice9_GetDeviceCaps
(
device
,
&
caps
);
ok
(
hr
==
D3D_OK
,
"IDirect3DDevice9_GetDeviceCaps returned %s
\n
"
,
DXGetErrorString9
(
hr
));
hr
=
IDirect3DDevice9_Clear
(
device
,
0
,
NULL
,
D3DCLEAR_TARGET
,
0xffff00ff
,
0
.
0
,
0
);
hr
=
IDirect3DDevice9_Clear
(
device
,
0
,
NULL
,
D3DCLEAR_TARGET
,
0xffff00ff
,
0
.
0
,
0
);
ok
(
hr
==
D3D_OK
,
"IDirect3DDevice9_Clear returned %s
\n
"
,
DXGetErrorString9
(
hr
));
ok
(
hr
==
D3D_OK
,
"IDirect3DDevice9_Clear returned %s
\n
"
,
DXGetErrorString9
(
hr
));
...
@@ -538,8 +542,20 @@ static void fog_test(IDirect3DDevice9 *device)
...
@@ -538,8 +542,20 @@ static void fog_test(IDirect3DDevice9 *device)
ok
(
color
==
0x0000FF00
,
"Untransformed vertex with linear vertex fog has color %08x
\n
"
,
color
);
ok
(
color
==
0x0000FF00
,
"Untransformed vertex with linear vertex fog has color %08x
\n
"
,
color
);
color
=
getPixelColor
(
device
,
480
,
120
);
color
=
getPixelColor
(
device
,
480
,
120
);
ok
(
color
==
0x00FFFF00
,
"Transformed vertex with linear vertex fog has color %08x
\n
"
,
color
);
ok
(
color
==
0x00FFFF00
,
"Transformed vertex with linear vertex fog has color %08x
\n
"
,
color
);
color
=
getPixelColor
(
device
,
480
,
360
);
if
(
caps
.
RasterCaps
&
D3DPRASTERCAPS_FOGTABLE
)
ok
(
color
==
0x0000FF00
,
"Transformed vertex with linear table fog has color %08x
\n
"
,
color
);
{
color
=
getPixelColor
(
device
,
480
,
360
);
ok
(
color
==
0x0000FF00
,
"Transformed vertex with linear table fog has color %08x
\n
"
,
color
);
}
else
{
/* Without fog table support the vertex fog is still applied, even though table fog is turned on.
* The settings above result in no fogging with vertex fog
*/
color
=
getPixelColor
(
device
,
480
,
120
);
ok
(
color
==
0x00FFFF00
,
"Transformed vertex with linear vertex fog has color %08x
\n
"
,
color
);
trace
(
"Info: Table fog not supported by this device
\n
"
);
}
/* Turn off the fog master switch to avoid confusing other tests */
/* Turn off the fog master switch to avoid confusing other tests */
hr
=
IDirect3DDevice9_SetRenderState
(
device
,
D3DRS_FOGENABLE
,
FALSE
);
hr
=
IDirect3DDevice9_SetRenderState
(
device
,
D3DRS_FOGENABLE
,
FALSE
);
...
@@ -1222,7 +1238,12 @@ START_TEST(visual)
...
@@ -1222,7 +1238,12 @@ START_TEST(visual)
lighting_test
(
device_ptr
);
lighting_test
(
device_ptr
);
clear_test
(
device_ptr
);
clear_test
(
device_ptr
);
fog_test
(
device_ptr
);
fog_test
(
device_ptr
);
test_cube_wrap
(
device_ptr
);
if
(
caps
.
TextureCaps
&
D3DPTEXTURECAPS_CUBEMAP
)
{
test_cube_wrap
(
device_ptr
);
}
else
{
skip
(
"No cube texture support
\n
"
);
}
present_test
(
device_ptr
);
present_test
(
device_ptr
);
if
(
caps
.
VertexShaderVersion
>=
D3DVS_VERSION
(
2
,
0
))
if
(
caps
.
VertexShaderVersion
>=
D3DVS_VERSION
(
2
,
0
))
...
@@ -1231,13 +1252,13 @@ START_TEST(visual)
...
@@ -1231,13 +1252,13 @@ START_TEST(visual)
}
}
else
skip
(
"No vs_2_0 support
\n
"
);
else
skip
(
"No vs_2_0 support
\n
"
);
if
(
caps
.
VertexShaderVersion
>=
D3DVS_VERSION
(
1
,
1
)
&&
caps
.
PixelShaderVersion
>=
D3D
V
S_VERSION
(
1
,
1
))
if
(
caps
.
VertexShaderVersion
>=
D3DVS_VERSION
(
1
,
1
)
&&
caps
.
PixelShaderVersion
>=
D3D
P
S_VERSION
(
1
,
1
))
{
{
fog_with_shader_test
(
device_ptr
);
fog_with_shader_test
(
device_ptr
);
}
}
else
skip
(
"No vs_1_1 and ps_1_1 support
\n
"
);
else
skip
(
"No vs_1_1 and ps_1_1 support
\n
"
);
if
(
caps
.
PixelShaderVersion
>=
D3D
V
S_VERSION
(
1
,
1
))
if
(
caps
.
PixelShaderVersion
>=
D3D
P
S_VERSION
(
1
,
1
))
{
{
texbem_test
(
device_ptr
);
texbem_test
(
device_ptr
);
}
}
...
...
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