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
8cd5f7fd
Commit
8cd5f7fd
authored
Apr 17, 2014
by
Henri Verbeet
Committed by
Alexandre Julliard
Apr 17, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d8/tests: Use a separate device for depth_buffer_test().
parent
f798db55
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
8 deletions
+27
-8
visual.c
dlls/d3d8/tests/visual.c
+27
-8
No files found.
dlls/d3d8/tests/visual.c
View file @
8cd5f7fd
...
@@ -2570,8 +2570,19 @@ static void depth_clamp_test(IDirect3DDevice8 *device)
...
@@ -2570,8 +2570,19 @@ static void depth_clamp_test(IDirect3DDevice8 *device)
ok
(
SUCCEEDED
(
hr
),
"SetViewport failed, hr %#x.
\n
"
,
hr
);
ok
(
SUCCEEDED
(
hr
),
"SetViewport failed, hr %#x.
\n
"
,
hr
);
}
}
static
void
depth_buffer_test
(
IDirect3DDevice8
*
device
)
static
void
depth_buffer_test
(
void
)
{
{
IDirect3DSurface8
*
backbuffer
,
*
rt1
,
*
rt2
,
*
rt3
;
IDirect3DSurface8
*
depth_stencil
;
IDirect3DDevice8
*
device
;
unsigned
int
i
,
j
;
D3DVIEWPORT8
vp
;
IDirect3D8
*
d3d
;
D3DCOLOR
color
;
ULONG
refcount
;
HWND
window
;
HRESULT
hr
;
static
const
struct
vertex
quad1
[]
=
static
const
struct
vertex
quad1
[]
=
{
{
{
-
1
.
0
,
1
.
0
,
0
.
33
f
,
0xff00ff00
},
{
-
1
.
0
,
1
.
0
,
0
.
33
f
,
0xff00ff00
},
...
@@ -2601,12 +2612,15 @@ static void depth_buffer_test(IDirect3DDevice8 *device)
...
@@ -2601,12 +2612,15 @@ static void depth_buffer_test(IDirect3DDevice8 *device)
{
0x00ff0000
,
0x00ff0000
,
0x00ff0000
,
0x00ff0000
},
{
0x00ff0000
,
0x00ff0000
,
0x00ff0000
,
0x00ff0000
},
};
};
IDirect3DSurface8
*
backbuffer
,
*
rt1
,
*
rt2
,
*
rt3
;
window
=
CreateWindowA
(
"static"
,
"d3d8_test"
,
WS_OVERLAPPEDWINDOW
|
WS_VISIBLE
,
IDirect3DSurface8
*
depth_stencil
;
0
,
0
,
640
,
480
,
NULL
,
NULL
,
NULL
,
NULL
);
unsigned
int
i
,
j
;
d3d
=
Direct3DCreate8
(
D3D_SDK_VERSION
);
D3DVIEWPORT8
vp
;
ok
(
!!
d3d
,
"Failed to create a D3D object.
\n
"
);
D3DCOLOR
color
;
if
(
!
(
device
=
create_device
(
d3d
,
window
,
window
,
TRUE
)))
HRESULT
hr
;
{
skip
(
"Failed to create a D3D device, skipping tests.
\n
"
);
goto
done
;
}
vp
.
X
=
0
;
vp
.
X
=
0
;
vp
.
Y
=
0
;
vp
.
Y
=
0
;
...
@@ -2702,6 +2716,11 @@ static void depth_buffer_test(IDirect3DDevice8 *device)
...
@@ -2702,6 +2716,11 @@ static void depth_buffer_test(IDirect3DDevice8 *device)
IDirect3DSurface8_Release
(
rt3
);
IDirect3DSurface8_Release
(
rt3
);
IDirect3DSurface8_Release
(
rt2
);
IDirect3DSurface8_Release
(
rt2
);
IDirect3DSurface8_Release
(
rt1
);
IDirect3DSurface8_Release
(
rt1
);
refcount
=
IDirect3DDevice8_Release
(
device
);
ok
(
!
refcount
,
"Device has %u references left.
\n
"
,
refcount
);
done:
IDirect3D8_Release
(
d3d
);
DestroyWindow
(
window
);
}
}
/* Test that partial depth copies work the way they're supposed to. The clear
/* Test that partial depth copies work the way they're supposed to. The clear
...
@@ -4841,7 +4860,6 @@ START_TEST(visual)
...
@@ -4841,7 +4860,6 @@ START_TEST(visual)
p8_texture_test
(
device_ptr
);
p8_texture_test
(
device_ptr
);
texop_test
(
device_ptr
);
texop_test
(
device_ptr
);
depth_buffer_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
);
...
@@ -4849,6 +4867,7 @@ cleanup:
...
@@ -4849,6 +4867,7 @@ cleanup:
IDirect3D8_Release
(
d3d
);
IDirect3D8_Release
(
d3d
);
DestroyWindow
(
window
);
DestroyWindow
(
window
);
depth_buffer_test
();
depth_buffer2_test
();
depth_buffer2_test
();
intz_test
();
intz_test
();
shadow_test
();
shadow_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