Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
25d2de7b
Commit
25d2de7b
authored
Apr 22, 2014
by
Henri Verbeet
Committed by
Alexandre Julliard
Apr 22, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d8/tests: Use a separate device for depth_clamp_test().
parent
f1706b03
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
19 deletions
+34
-19
visual.c
dlls/d3d8/tests/visual.c
+34
-19
No files found.
dlls/d3d8/tests/visual.c
View file @
25d2de7b
...
@@ -2606,44 +2606,53 @@ done:
...
@@ -2606,44 +2606,53 @@ done:
* clipped when D3DPMISCCAPS_CLIPTLVERTS is set, clamped when it isn't.
* clipped when D3DPMISCCAPS_CLIPTLVERTS is set, clamped when it isn't.
* - The viewport's MinZ/MaxZ is irrelevant for this.
* - The viewport's MinZ/MaxZ is irrelevant for this.
*/
*/
static
void
depth_clamp_test
(
IDirect3DDevice8
*
device
)
static
void
depth_clamp_test
(
void
)
{
{
const
struct
tvertex
quad1
[]
=
IDirect3DDevice8
*
device
;
D3DVIEWPORT8
vp
;
IDirect3D8
*
d3d
;
D3DCOLOR
color
;
ULONG
refcount
;
D3DCAPS8
caps
;
HWND
window
;
HRESULT
hr
;
static
const
struct
tvertex
quad1
[]
=
{
{
{
0
.
0
f
,
0
.
0
f
,
5
.
0
f
,
1
.
0
f
,
0xff002b7f
},
{
0
.
0
f
,
0
.
0
f
,
5
.
0
f
,
1
.
0
f
,
0xff002b7f
},
{
640
.
0
f
,
0
.
0
f
,
5
.
0
f
,
1
.
0
f
,
0xff002b7f
},
{
640
.
0
f
,
0
.
0
f
,
5
.
0
f
,
1
.
0
f
,
0xff002b7f
},
{
0
.
0
f
,
480
.
0
f
,
5
.
0
f
,
1
.
0
f
,
0xff002b7f
},
{
0
.
0
f
,
480
.
0
f
,
5
.
0
f
,
1
.
0
f
,
0xff002b7f
},
{
640
.
0
f
,
480
.
0
f
,
5
.
0
f
,
1
.
0
f
,
0xff002b7f
},
{
640
.
0
f
,
480
.
0
f
,
5
.
0
f
,
1
.
0
f
,
0xff002b7f
},
};
};
const
struct
tvertex
quad2
[]
=
static
const
struct
tvertex
quad2
[]
=
{
{
{
0
.
0
f
,
300
.
0
f
,
10
.
0
f
,
1
.
0
f
,
0xfff9e814
},
{
0
.
0
f
,
300
.
0
f
,
10
.
0
f
,
1
.
0
f
,
0xfff9e814
},
{
640
.
0
f
,
300
.
0
f
,
10
.
0
f
,
1
.
0
f
,
0xfff9e814
},
{
640
.
0
f
,
300
.
0
f
,
10
.
0
f
,
1
.
0
f
,
0xfff9e814
},
{
0
.
0
f
,
360
.
0
f
,
10
.
0
f
,
1
.
0
f
,
0xfff9e814
},
{
0
.
0
f
,
360
.
0
f
,
10
.
0
f
,
1
.
0
f
,
0xfff9e814
},
{
640
.
0
f
,
360
.
0
f
,
10
.
0
f
,
1
.
0
f
,
0xfff9e814
},
{
640
.
0
f
,
360
.
0
f
,
10
.
0
f
,
1
.
0
f
,
0xfff9e814
},
};
};
const
struct
tvertex
quad3
[]
=
static
const
struct
tvertex
quad3
[]
=
{
{
{
112
.
0
f
,
108
.
0
f
,
5
.
0
f
,
1
.
0
f
,
0xffffffff
},
{
112
.
0
f
,
108
.
0
f
,
5
.
0
f
,
1
.
0
f
,
0xffffffff
},
{
208
.
0
f
,
108
.
0
f
,
5
.
0
f
,
1
.
0
f
,
0xffffffff
},
{
208
.
0
f
,
108
.
0
f
,
5
.
0
f
,
1
.
0
f
,
0xffffffff
},
{
112
.
0
f
,
204
.
0
f
,
5
.
0
f
,
1
.
0
f
,
0xffffffff
},
{
112
.
0
f
,
204
.
0
f
,
5
.
0
f
,
1
.
0
f
,
0xffffffff
},
{
208
.
0
f
,
204
.
0
f
,
5
.
0
f
,
1
.
0
f
,
0xffffffff
},
{
208
.
0
f
,
204
.
0
f
,
5
.
0
f
,
1
.
0
f
,
0xffffffff
},
};
};
const
struct
tvertex
quad4
[]
=
static
const
struct
tvertex
quad4
[]
=
{
{
{
42
.
0
f
,
41
.
0
f
,
10
.
0
f
,
1
.
0
f
,
0xffffffff
},
{
42
.
0
f
,
41
.
0
f
,
10
.
0
f
,
1
.
0
f
,
0xffffffff
},
{
112
.
0
f
,
41
.
0
f
,
10
.
0
f
,
1
.
0
f
,
0xffffffff
},
{
112
.
0
f
,
41
.
0
f
,
10
.
0
f
,
1
.
0
f
,
0xffffffff
},
{
42
.
0
f
,
108
.
0
f
,
10
.
0
f
,
1
.
0
f
,
0xffffffff
},
{
42
.
0
f
,
108
.
0
f
,
10
.
0
f
,
1
.
0
f
,
0xffffffff
},
{
112
.
0
f
,
108
.
0
f
,
10
.
0
f
,
1
.
0
f
,
0xffffffff
},
{
112
.
0
f
,
108
.
0
f
,
10
.
0
f
,
1
.
0
f
,
0xffffffff
},
};
};
const
struct
vertex
quad5
[]
=
static
const
struct
vertex
quad5
[]
=
{
{
{
-
0
.
5
f
,
0
.
5
f
,
10
.
0
f
,
0xff14f914
},
{
-
0
.
5
f
,
0
.
5
f
,
10
.
0
f
,
0xff14f914
},
{
0
.
5
f
,
0
.
5
f
,
10
.
0
f
,
0xff14f914
},
{
0
.
5
f
,
0
.
5
f
,
10
.
0
f
,
0xff14f914
},
{
-
0
.
5
f
,
-
0
.
5
f
,
10
.
0
f
,
0xff14f914
},
{
-
0
.
5
f
,
-
0
.
5
f
,
10
.
0
f
,
0xff14f914
},
{
0
.
5
f
,
-
0
.
5
f
,
10
.
0
f
,
0xff14f914
},
{
0
.
5
f
,
-
0
.
5
f
,
10
.
0
f
,
0xff14f914
},
};
};
const
struct
vertex
quad6
[]
=
static
const
struct
vertex
quad6
[]
=
{
{
{
-
1
.
0
f
,
0
.
5
f
,
10
.
0
f
,
0xfff91414
},
{
-
1
.
0
f
,
0
.
5
f
,
10
.
0
f
,
0xfff91414
},
{
1
.
0
f
,
0
.
5
f
,
10
.
0
f
,
0xfff91414
},
{
1
.
0
f
,
0
.
5
f
,
10
.
0
f
,
0xfff91414
},
...
@@ -2651,10 +2660,18 @@ static void depth_clamp_test(IDirect3DDevice8 *device)
...
@@ -2651,10 +2660,18 @@ static void depth_clamp_test(IDirect3DDevice8 *device)
{
1
.
0
f
,
0
.
25
f
,
10
.
0
f
,
0xfff91414
},
{
1
.
0
f
,
0
.
25
f
,
10
.
0
f
,
0xfff91414
},
};
};
D3DVIEWPORT8
vp
;
window
=
CreateWindowA
(
"static"
,
"d3d8_test"
,
WS_OVERLAPPEDWINDOW
|
WS_VISIBLE
,
D3DCOLOR
color
;
0
,
0
,
640
,
480
,
NULL
,
NULL
,
NULL
,
NULL
);
D3DCAPS8
caps
;
d3d
=
Direct3DCreate8
(
D3D_SDK_VERSION
);
HRESULT
hr
;
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
=
IDirect3DDevice8_GetDeviceCaps
(
device
,
&
caps
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get device caps, hr %#x.
\n
"
,
hr
);
vp
.
X
=
0
;
vp
.
X
=
0
;
vp
.
Y
=
0
;
vp
.
Y
=
0
;
...
@@ -2663,9 +2680,6 @@ static void depth_clamp_test(IDirect3DDevice8 *device)
...
@@ -2663,9 +2680,6 @@ static void depth_clamp_test(IDirect3DDevice8 *device)
vp
.
MinZ
=
0
.
0
;
vp
.
MinZ
=
0
.
0
;
vp
.
MaxZ
=
7
.
5
;
vp
.
MaxZ
=
7
.
5
;
hr
=
IDirect3DDevice8_GetDeviceCaps
(
device
,
&
caps
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get device caps, hr %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice8_SetViewport
(
device
,
&
vp
);
hr
=
IDirect3DDevice8_SetViewport
(
device
,
&
vp
);
ok
(
SUCCEEDED
(
hr
),
"SetViewport failed, hr %#x.
\n
"
,
hr
);
ok
(
SUCCEEDED
(
hr
),
"SetViewport failed, hr %#x.
\n
"
,
hr
);
...
@@ -2747,10 +2761,11 @@ static void depth_clamp_test(IDirect3DDevice8 *device)
...
@@ -2747,10 +2761,11 @@ static void depth_clamp_test(IDirect3DDevice8 *device)
hr
=
IDirect3DDevice8_Present
(
device
,
NULL
,
NULL
,
NULL
,
NULL
);
hr
=
IDirect3DDevice8_Present
(
device
,
NULL
,
NULL
,
NULL
,
NULL
);
ok
(
SUCCEEDED
(
hr
),
"Present failed (0x%08x)
\n
"
,
hr
);
ok
(
SUCCEEDED
(
hr
),
"Present failed (0x%08x)
\n
"
,
hr
);
vp
.
MinZ
=
0
.
0
;
refcount
=
IDirect3DDevice8_Release
(
device
);
vp
.
MaxZ
=
1
.
0
;
ok
(
!
refcount
,
"Device has %u references left.
\n
"
,
refcount
);
hr
=
IDirect3DDevice8_SetViewport
(
device
,
&
vp
);
done:
ok
(
SUCCEEDED
(
hr
),
"SetViewport failed, hr %#x.
\n
"
,
hr
);
IDirect3D8_Release
(
d3d
);
DestroyWindow
(
window
);
}
}
static
void
depth_buffer_test
(
void
)
static
void
depth_buffer_test
(
void
)
...
@@ -5014,7 +5029,6 @@ START_TEST(visual)
...
@@ -5014,7 +5029,6 @@ START_TEST(visual)
}
}
test_sanity
(
device_ptr
);
test_sanity
(
device_ptr
);
depth_clamp_test
(
device_ptr
);
refcount
=
IDirect3DDevice8_Release
(
device_ptr
);
refcount
=
IDirect3DDevice8_Release
(
device_ptr
);
ok
(
!
refcount
,
"Device has %u references left.
\n
"
,
refcount
);
ok
(
!
refcount
,
"Device has %u references left.
\n
"
,
refcount
);
...
@@ -5022,6 +5036,7 @@ cleanup:
...
@@ -5022,6 +5036,7 @@ cleanup:
IDirect3D8_Release
(
d3d
);
IDirect3D8_Release
(
d3d
);
DestroyWindow
(
window
);
DestroyWindow
(
window
);
depth_clamp_test
();
lighting_test
();
lighting_test
();
clear_test
();
clear_test
();
fog_test
();
fog_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