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
664b58dc
Commit
664b58dc
authored
Dec 29, 2008
by
Henri Verbeet
Committed by
Alexandre Julliard
Dec 29, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d: Make sure the device is properly released when exiting the tests.
parent
a394dbec
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
52 additions
and
2 deletions
+52
-2
surface.c
dlls/d3d8/tests/surface.c
+4
-0
texture.c
dlls/d3d8/tests/texture.c
+4
-0
visual.c
dlls/d3d8/tests/visual.c
+4
-1
volume.c
dlls/d3d8/tests/volume.c
+4
-0
shader.c
dlls/d3d9/tests/shader.c
+10
-0
stateblock.c
dlls/d3d9/tests/stateblock.c
+6
-1
surface.c
dlls/d3d9/tests/surface.c
+4
-0
texture.c
dlls/d3d9/tests/texture.c
+5
-0
vertexdeclaration.c
dlls/d3d9/tests/vertexdeclaration.c
+7
-0
volume.c
dlls/d3d9/tests/volume.c
+4
-0
No files found.
dlls/d3d8/tests/surface.c
View file @
664b58dc
...
...
@@ -324,6 +324,7 @@ START_TEST(surface)
{
HMODULE
d3d8_handle
;
IDirect3DDevice8
*
device_ptr
;
ULONG
refcount
;
d3d8_handle
=
LoadLibraryA
(
"d3d8.dll"
);
if
(
!
d3d8_handle
)
...
...
@@ -339,4 +340,7 @@ START_TEST(surface)
test_surface_get_container
(
device_ptr
);
test_lockrect_invalid
(
device_ptr
);
test_private_data
(
device_ptr
);
refcount
=
IDirect3DDevice8_Release
(
device_ptr
);
ok
(
!
refcount
,
"Device has %u references left
\n
"
,
refcount
);
}
dlls/d3d8/tests/texture.c
View file @
664b58dc
...
...
@@ -135,6 +135,7 @@ START_TEST(texture)
D3DCAPS8
caps
;
HMODULE
d3d8_handle
;
IDirect3DDevice8
*
device_ptr
;
ULONG
refcount
;
d3d8_handle
=
LoadLibraryA
(
"d3d8.dll"
);
if
(
!
d3d8_handle
)
...
...
@@ -150,4 +151,7 @@ START_TEST(texture)
test_texture_stage_states
(
device_ptr
,
caps
.
MaxTextureBlendStages
);
test_cube_textures
(
device_ptr
,
caps
.
TextureCaps
);
refcount
=
IDirect3DDevice8_Release
(
device_ptr
);
ok
(
!
refcount
,
"Device has %u references left
\n
"
,
refcount
);
}
dlls/d3d8/tests/visual.c
View file @
664b58dc
...
...
@@ -1345,8 +1345,11 @@ START_TEST(visual)
cleanup
:
if
(
device_ptr
)
{
D3DDEVICE_CREATION_PARAMETERS
creation_parameters
;
ULONG
refcount
;
IDirect3DDevice8_GetCreationParameters
(
device_ptr
,
&
creation_parameters
);
IDirect3DDevice8_Release
(
device_ptr
);
refcount
=
IDirect3DDevice8_Release
(
device_ptr
);
ok
(
!
refcount
,
"Device has %u references left
\n
"
,
refcount
);
DestroyWindow
(
creation_parameters
.
hFocusWindow
);
}
}
dlls/d3d8/tests/volume.c
View file @
664b58dc
...
...
@@ -128,6 +128,7 @@ START_TEST(volume)
{
HMODULE
d3d8_handle
;
IDirect3DDevice8
*
device_ptr
;
ULONG
refcount
;
D3DCAPS8
caps
;
d3d8_handle
=
LoadLibraryA
(
"d3d8.dll"
);
...
...
@@ -147,4 +148,7 @@ START_TEST(volume)
}
test_volume_get_container
(
device_ptr
);
refcount
=
IDirect3DDevice8_Release
(
device_ptr
);
ok
(
!
refcount
,
"Device has %u references left
\n
"
,
refcount
);
}
dlls/d3d9/tests/shader.c
View file @
664b58dc
...
...
@@ -110,6 +110,9 @@ static void test_get_set_vertex_shader(IDirect3DDevice9 *device_ptr)
ok
(
hret
==
D3D_OK
&&
shader_refcount
==
i
&&
current_shader_ptr
==
shader_ptr
,
"GetVertexShader returned: hret 0x%x, current_shader_ptr %p refcount %d. "
"Expected hret 0x%x, current_shader_ptr %p, refcount %d.
\n
"
,
hret
,
current_shader_ptr
,
shader_refcount
,
D3D_OK
,
shader_ptr
,
i
);
IDirect3DVertexShader9_Release
(
current_shader_ptr
);
IDirect3DVertexShader9_Release
(
shader_ptr
);
}
static
void
test_vertex_shader_constant
(
IDirect3DDevice9
*
device_ptr
,
DWORD
consts
)
...
...
@@ -174,6 +177,9 @@ static void test_get_set_pixel_shader(IDirect3DDevice9 *device_ptr)
ok
(
hret
==
D3D_OK
&&
shader_refcount
==
i
&&
current_shader_ptr
==
shader_ptr
,
"GetPixelShader returned: hret 0x%x, current_shader_ptr %p refcount %d. "
"Expected hret 0x%x, current_shader_ptr %p, refcount %d.
\n
"
,
hret
,
current_shader_ptr
,
shader_refcount
,
D3D_OK
,
shader_ptr
,
i
);
IDirect3DPixelShader9_Release
(
current_shader_ptr
);
IDirect3DPixelShader9_Release
(
shader_ptr
);
}
static
void
test_pixel_shader_constant
(
IDirect3DDevice9
*
device_ptr
)
...
...
@@ -207,6 +213,7 @@ START_TEST(shader)
{
D3DCAPS9
caps
;
IDirect3DDevice9
*
device_ptr
;
ULONG
refcount
;
d3d9_handle
=
LoadLibraryA
(
"d3d9.dll"
);
if
(
!
d3d9_handle
)
...
...
@@ -234,4 +241,7 @@ START_TEST(shader)
test_pixel_shader_constant
(
device_ptr
);
}
else
skip
(
"No pixel shader support
\n
"
);
refcount
=
IDirect3DDevice9_Release
(
device_ptr
);
ok
(
!
refcount
,
"Device has %u references left
\n
"
,
refcount
);
}
dlls/d3d9/tests/stateblock.c
View file @
664b58dc
...
...
@@ -91,6 +91,7 @@ static void test_begin_end_state_block(IDirect3DDevice9 *device_ptr)
ok
(
hret
==
D3D_OK
&&
state_block_ptr
!=
0
&&
state_block_ptr
!=
(
IDirect3DStateBlock9
*
)
0xdeadbeef
,
"EndStateBlock returned: hret 0x%x, state_block_ptr %p. "
"Expected hret 0x%x, state_block_ptr != %p, state_block_ptr != 0xdeadbeef.
\n
"
,
hret
,
state_block_ptr
,
D3D_OK
,
NULL
);
IDirect3DStateBlock9_Release
(
state_block_ptr
);
/* Calling EndStateBlock while not recording should return D3DERR_INVALIDCALL. state_block_ptr should not be touched. */
state_block_ptr
=
(
IDirect3DStateBlock9
*
)
0xdeadbeef
;
...
...
@@ -1583,5 +1584,9 @@ START_TEST(stateblock)
test_state_management
(
device_ptr
,
&
device_pparams
);
test_shader_constant_apply
(
device_ptr
);
if
(
device_ptr
)
IUnknown_Release
(
device_ptr
);
if
(
device_ptr
)
{
ULONG
refcount
=
IDirect3DDevice9_Release
(
device_ptr
);
ok
(
!
refcount
,
"Device has %u references left
\n
"
,
refcount
);
}
}
dlls/d3d9/tests/surface.c
View file @
664b58dc
...
...
@@ -382,6 +382,7 @@ START_TEST(surface)
{
HMODULE
d3d9_handle
;
IDirect3DDevice9
*
device_ptr
;
ULONG
refcount
;
d3d9_handle
=
LoadLibraryA
(
"d3d9.dll"
);
if
(
!
d3d9_handle
)
...
...
@@ -398,4 +399,7 @@ START_TEST(surface)
test_lockrect_offset
(
device_ptr
);
test_lockrect_invalid
(
device_ptr
);
test_private_data
(
device_ptr
);
refcount
=
IDirect3DDevice9_Release
(
device_ptr
);
ok
(
!
refcount
,
"Device has %u references left
\n
"
,
refcount
);
}
dlls/d3d9/tests/texture.c
View file @
664b58dc
...
...
@@ -321,6 +321,7 @@ static void test_filter(IDirect3DDevice9 *device) {
}
hr
=
IDirect3DDevice9_SetTexture
(
device
,
0
,
NULL
);
IDirect3DTexture9_Release
(
texture
);
out:
IDirect3D9_Release
(
d3d9
);
...
...
@@ -342,6 +343,7 @@ START_TEST(texture)
D3DCAPS9
caps
;
HMODULE
d3d9_handle
;
IDirect3DDevice9
*
device_ptr
;
ULONG
refcount
;
d3d9_handle
=
LoadLibraryA
(
"d3d9.dll"
);
if
(
!
d3d9_handle
)
...
...
@@ -360,4 +362,7 @@ START_TEST(texture)
test_mipmap_gen
(
device_ptr
);
test_filter
(
device_ptr
);
test_gettexture
(
device_ptr
);
refcount
=
IDirect3DDevice9_Release
(
device_ptr
);
ok
(
!
refcount
,
"Device has %u references left
\n
"
,
refcount
);
}
dlls/d3d9/tests/vertexdeclaration.c
View file @
664b58dc
...
...
@@ -183,6 +183,7 @@ static void test_get_set_vertex_declaration(IDirect3DDevice9 *device_ptr, IDirec
ok
(
hret
==
D3D_OK
&&
decl_refcount
==
i
&&
current_decl_ptr
==
decl_ptr
,
"GetVertexDeclaration returned: hret 0x%x, current_decl_ptr %p refcount %d. "
"Expected hret 0x%x, current_decl_ptr %p, refcount %d.
\n
"
,
hret
,
current_decl_ptr
,
decl_refcount
,
D3D_OK
,
decl_ptr
,
i
);
IDirect3DVertexDeclaration9_Release
(
current_decl_ptr
);
}
static
void
test_get_declaration
(
IDirect3DVertexDeclaration9
*
decl_ptr
,
D3DVERTEXELEMENT9
*
vertex_decl
,
UINT
expected_num_elements
)
...
...
@@ -852,6 +853,7 @@ START_TEST(vertexdeclaration)
UINT
simple_decl_num_elements
=
sizeof
(
simple_decl
)
/
sizeof
(
*
simple_decl
);
IDirect3DDevice9
*
device_ptr
=
0
;
IDirect3DVertexDeclaration9
*
decl_ptr
=
0
;
ULONG
refcount
;
d3d9_handle
=
LoadLibraryA
(
"d3d9.dll"
);
if
(
!
d3d9_handle
)
...
...
@@ -880,4 +882,9 @@ START_TEST(vertexdeclaration)
test_fvf_decl_management
(
device_ptr
);
test_vertex_declaration_alignment
(
device_ptr
);
test_unused_type
(
device_ptr
);
IDirect3DVertexDeclaration9_Release
(
decl_ptr
);
refcount
=
IDirect3DDevice9_Release
(
device_ptr
);
ok
(
!
refcount
,
"Device has %u references left
\n
"
,
refcount
);
}
dlls/d3d9/tests/volume.c
View file @
664b58dc
...
...
@@ -125,6 +125,7 @@ START_TEST(volume)
{
HMODULE
d3d9_handle
;
IDirect3DDevice9
*
device_ptr
;
ULONG
refcount
;
D3DCAPS9
caps
;
memset
(
&
caps
,
0
,
sizeof
(
caps
));
...
...
@@ -145,4 +146,7 @@ START_TEST(volume)
}
test_volume_get_container
(
device_ptr
);
refcount
=
IDirect3DDevice9_Release
(
device_ptr
);
ok
(
!
refcount
,
"Device has %u references left
\n
"
,
refcount
);
}
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