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
9bb70e27
Commit
9bb70e27
authored
Aug 28, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Aug 28, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d9/tests: Use proper helpers for iface calls.
parent
242f9acd
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
21 deletions
+21
-21
device.c
dlls/d3d9/tests/device.c
+6
-6
stateblock.c
dlls/d3d9/tests/stateblock.c
+9
-9
surface.c
dlls/d3d9/tests/surface.c
+1
-1
vertexdeclaration.c
dlls/d3d9/tests/vertexdeclaration.c
+5
-5
No files found.
dlls/d3d9/tests/device.c
View file @
9bb70e27
...
...
@@ -107,7 +107,7 @@ static HRESULT reset_device(IDirect3DDevice9 *device, HWND device_window, BOOL w
#define CHECK_RELEASE(obj,d,rc) \
if (obj) { \
int tmp1, rc_new = rc; \
IUnknown_Release( obj ); \
IUnknown_Release(
(IUnknown*)
obj ); \
tmp1 = get_refcount( (IUnknown *)d ); \
ok(tmp1 == rc_new, "Invalid refcount. Expected %d got %d\n", rc_new, tmp1); \
}
...
...
@@ -154,7 +154,7 @@ static void check_mipmap_levels(IDirect3DDevice9 *device, UINT width, UINT heigh
}
else
trace
(
"CreateTexture failed: %08x
\n
"
,
hr
);
if
(
texture
)
I
Unknown
_Release
(
texture
);
if
(
texture
)
I
Direct3DBaseTexture9
_Release
(
texture
);
}
static
void
test_mipmap_levels
(
void
)
...
...
@@ -196,10 +196,10 @@ static void test_mipmap_levels(void)
cleanup:
if
(
pDevice
)
{
UINT
refcount
=
I
Unknown
_Release
(
pDevice
);
UINT
refcount
=
I
Direct3DDevice9
_Release
(
pDevice
);
ok
(
!
refcount
,
"Device has %u references left.
\n
"
,
refcount
);
}
if
(
pD3d
)
I
Unknown
_Release
(
pD3d
);
if
(
pD3d
)
I
Direct3D9
_Release
(
pD3d
);
DestroyWindow
(
hwnd
);
}
...
...
@@ -255,10 +255,10 @@ static void test_checkdevicemultisampletype(void)
cleanup:
if
(
pDevice
)
{
UINT
refcount
=
I
Unknown
_Release
(
pDevice
);
UINT
refcount
=
I
Direct3DDevice9
_Release
(
pDevice
);
ok
(
!
refcount
,
"Device has %u references left.
\n
"
,
refcount
);
}
if
(
pD3d
)
I
Unknown
_Release
(
pD3d
);
if
(
pD3d
)
I
Direct3D9
_Release
(
pD3d
);
DestroyWindow
(
hwnd
);
}
...
...
dlls/d3d9/tests/stateblock.c
View file @
9bb70e27
...
...
@@ -281,13 +281,13 @@ static int switch_render_target(IDirect3DDevice9 *device, struct event_data *eve
ok
(
hret
==
D3D_OK
,
"SetRenderTarget returned %#x.
\n
"
,
hret
);
if
(
hret
!=
D3D_OK
)
goto
error
;
I
Unknown
_Release
(
backbuffer
);
I
Direct3DSurface9
_Release
(
backbuffer
);
event_data
->
new_swap_chain
=
swapchain
;
return
EVENT_OK
;
error:
if
(
backbuffer
)
I
Unknown
_Release
(
backbuffer
);
if
(
swapchain
)
I
Unknown
_Release
(
swapchain
);
if
(
backbuffer
)
I
Direct3DSurface9
_Release
(
backbuffer
);
if
(
swapchain
)
I
Direct3DSwapChain9
_Release
(
swapchain
);
return
EVENT_ERROR
;
}
...
...
@@ -299,12 +299,12 @@ static int revert_render_target(IDirect3DDevice9 *device, struct event_data *eve
hret
=
IDirect3DDevice9_SetRenderTarget
(
device
,
0
,
event_data
->
original_render_target
);
ok
(
hret
==
D3D_OK
,
"SetRenderTarget returned %#x.
\n
"
,
hret
);
if
(
hret
!=
D3D_OK
)
{
I
Unknown
_Release
(
event_data
->
original_render_target
);
I
Direct3DSurface9
_Release
(
event_data
->
original_render_target
);
return
EVENT_ERROR
;
}
I
Unknown
_Release
(
event_data
->
original_render_target
);
I
Unknown
_Release
(
event_data
->
new_swap_chain
);
I
Direct3DSurface9
_Release
(
event_data
->
original_render_target
);
I
Direct3DSwapChain9
_Release
(
event_data
->
new_swap_chain
);
return
EVENT_OK
;
}
...
...
@@ -361,7 +361,7 @@ static int end_stateblock(IDirect3DDevice9 *device, struct event_data *event_dat
static
int
release_stateblock
(
IDirect3DDevice9
*
device
,
struct
event_data
*
event_data
)
{
I
Unknown
_Release
(
event_data
->
stateblock
);
I
Direct3DStateBlock9
_Release
(
event_data
->
stateblock
);
return
EVENT_OK
;
}
...
...
@@ -372,11 +372,11 @@ static int apply_stateblock(IDirect3DDevice9 *device, struct event_data *event_d
hret
=
IDirect3DStateBlock9_Apply
(
event_data
->
stateblock
);
ok
(
hret
==
D3D_OK
,
"Apply returned %#x.
\n
"
,
hret
);
if
(
hret
!=
D3D_OK
)
{
I
Unknown
_Release
(
event_data
->
stateblock
);
I
Direct3DStateBlock9
_Release
(
event_data
->
stateblock
);
return
EVENT_ERROR
;
}
I
Unknown
_Release
(
event_data
->
stateblock
);
I
Direct3DStateBlock9
_Release
(
event_data
->
stateblock
);
return
EVENT_OK
;
}
...
...
dlls/d3d9/tests/surface.c
View file @
9bb70e27
...
...
@@ -181,7 +181,7 @@ static void test_surface_alignment(IDirect3DDevice9 *device_ptr)
ok
(
rc
.
Pitch
==
pitch
,
"Wrong pitch for DXT%d lvl[%d (%dx%d)]: expected %d got %d
\n
"
,
i
+
1
,
j
,
descr
.
Width
,
descr
.
Height
,
pitch
,
rc
.
Pitch
);
}
I
Unknown
_Release
(
pTexture
);
I
Direct3DTexture9
_Release
(
pTexture
);
}
}
...
...
dlls/d3d9/tests/vertexdeclaration.c
View file @
9bb70e27
...
...
@@ -267,11 +267,11 @@ static HRESULT test_fvf_to_decl(IDirect3DDevice9 *device, IDirect3DVertexDeclara
else
if
(
compare_elements
(
result_decl
,
expected_elements
)
!=
S_OK
)
goto
fail
;
if
(
result_decl
)
I
Unknown
_Release
(
result_decl
);
if
(
result_decl
)
I
Direct3DVertexDeclaration9
_Release
(
result_decl
);
return
S_OK
;
fail:
if
(
result_decl
)
I
Unknown
_Release
(
result_decl
);
if
(
result_decl
)
I
Direct3DVertexDeclaration9
_Release
(
result_decl
);
return
E_FAIL
;
}
...
...
@@ -308,12 +308,12 @@ static HRESULT test_decl_to_fvf(IDirect3DDevice9* device, DWORD default_fvf,
if
(
test_fvf
!=
result_fvf
)
goto
fail
;
IDirect3DDevice9_SetVertexDeclaration
(
device
,
NULL
);
if
(
vdecl
)
I
Unknown
_Release
(
vdecl
);
if
(
vdecl
)
I
Direct3DVertexDeclaration9
_Release
(
vdecl
);
return
S_OK
;
fail:
IDirect3DDevice9_SetVertexDeclaration
(
device
,
NULL
);
if
(
vdecl
)
I
Unknown
_Release
(
vdecl
);
if
(
vdecl
)
I
Direct3DVertexDeclaration9
_Release
(
vdecl
);
return
E_FAIL
;
}
...
...
@@ -644,7 +644,7 @@ static void test_fvf_decl_conversion(IDirect3DDevice9 *pDevice)
cleanup:
IDirect3DDevice9_SetVertexDeclaration
(
pDevice
,
NULL
);
if
(
default_decl
)
I
Unknown
_Release
(
default_decl
);
if
(
default_decl
)
I
Direct3DVertexDeclaration9
_Release
(
default_decl
);
}
/* Check whether a declaration converted from FVF is shared.
...
...
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