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
1524cc2a
Commit
1524cc2a
authored
Aug 27, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Aug 27, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d8: Use proper helpers for iface calls.
parent
2097c5dd
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
20 additions
and
20 deletions
+20
-20
buffer.c
dlls/d3d8/buffer.c
+4
-4
device.c
dlls/d3d8/device.c
+2
-2
directx.c
dlls/d3d8/directx.c
+1
-1
surface.c
dlls/d3d8/surface.c
+3
-3
swapchain.c
dlls/d3d8/swapchain.c
+1
-1
device.c
dlls/d3d8/tests/device.c
+4
-4
texture.c
dlls/d3d8/texture.c
+4
-4
volume.c
dlls/d3d8/volume.c
+1
-1
No files found.
dlls/d3d8/buffer.c
View file @
1524cc2a
...
@@ -34,7 +34,7 @@ static HRESULT WINAPI d3d8_vertexbuffer_QueryInterface(IDirect3DVertexBuffer8 *i
...
@@ -34,7 +34,7 @@ static HRESULT WINAPI d3d8_vertexbuffer_QueryInterface(IDirect3DVertexBuffer8 *i
||
IsEqualGUID
(
riid
,
&
IID_IDirect3DResource8
)
||
IsEqualGUID
(
riid
,
&
IID_IDirect3DResource8
)
||
IsEqualGUID
(
riid
,
&
IID_IUnknown
))
||
IsEqualGUID
(
riid
,
&
IID_IUnknown
))
{
{
I
Unknown
_AddRef
(
iface
);
I
Direct3DVertexBuffer8
_AddRef
(
iface
);
*
object
=
iface
;
*
object
=
iface
;
return
S_OK
;
return
S_OK
;
}
}
...
@@ -302,7 +302,7 @@ HRESULT vertexbuffer_init(struct d3d8_vertexbuffer *buffer, struct d3d8_device *
...
@@ -302,7 +302,7 @@ HRESULT vertexbuffer_init(struct d3d8_vertexbuffer *buffer, struct d3d8_device *
}
}
buffer
->
parent_device
=
&
device
->
IDirect3DDevice8_iface
;
buffer
->
parent_device
=
&
device
->
IDirect3DDevice8_iface
;
I
Unknown
_AddRef
(
buffer
->
parent_device
);
I
Direct3DDevice8
_AddRef
(
buffer
->
parent_device
);
return
D3D_OK
;
return
D3D_OK
;
}
}
...
@@ -329,7 +329,7 @@ static HRESULT WINAPI d3d8_indexbuffer_QueryInterface(IDirect3DIndexBuffer8 *ifa
...
@@ -329,7 +329,7 @@ static HRESULT WINAPI d3d8_indexbuffer_QueryInterface(IDirect3DIndexBuffer8 *ifa
||
IsEqualGUID
(
riid
,
&
IID_IDirect3DResource8
)
||
IsEqualGUID
(
riid
,
&
IID_IDirect3DResource8
)
||
IsEqualGUID
(
riid
,
&
IID_IUnknown
))
||
IsEqualGUID
(
riid
,
&
IID_IUnknown
))
{
{
I
Unknown
_AddRef
(
iface
);
I
Direct3DIndexBuffer8
_AddRef
(
iface
);
*
object
=
iface
;
*
object
=
iface
;
return
S_OK
;
return
S_OK
;
}
}
...
@@ -596,7 +596,7 @@ HRESULT indexbuffer_init(struct d3d8_indexbuffer *buffer, struct d3d8_device *de
...
@@ -596,7 +596,7 @@ HRESULT indexbuffer_init(struct d3d8_indexbuffer *buffer, struct d3d8_device *de
}
}
buffer
->
parent_device
=
&
device
->
IDirect3DDevice8_iface
;
buffer
->
parent_device
=
&
device
->
IDirect3DDevice8_iface
;
I
Unknown
_AddRef
(
buffer
->
parent_device
);
I
Direct3DDevice8
_AddRef
(
buffer
->
parent_device
);
return
D3D_OK
;
return
D3D_OK
;
}
}
...
...
dlls/d3d8/device.c
View file @
1524cc2a
...
@@ -307,7 +307,7 @@ static HRESULT WINAPI d3d8_device_QueryInterface(IDirect3DDevice8 *iface, REFIID
...
@@ -307,7 +307,7 @@ static HRESULT WINAPI d3d8_device_QueryInterface(IDirect3DDevice8 *iface, REFIID
if
(
IsEqualGUID
(
riid
,
&
IID_IDirect3DDevice8
)
if
(
IsEqualGUID
(
riid
,
&
IID_IDirect3DDevice8
)
||
IsEqualGUID
(
riid
,
&
IID_IUnknown
))
||
IsEqualGUID
(
riid
,
&
IID_IUnknown
))
{
{
I
Unknown
_AddRef
(
iface
);
I
Direct3DDevice8
_AddRef
(
iface
);
*
out
=
iface
;
*
out
=
iface
;
return
S_OK
;
return
S_OK
;
}
}
...
@@ -2845,7 +2845,7 @@ static HRESULT CDECL device_parent_create_texture_surface(struct wined3d_device_
...
@@ -2845,7 +2845,7 @@ static HRESULT CDECL device_parent_create_texture_surface(struct wined3d_device_
wined3d_surface_incref
(
*
surface
);
wined3d_surface_incref
(
*
surface
);
d3d_surface
->
container
=
container_parent
;
d3d_surface
->
container
=
container_parent
;
I
Unknown
_Release
(
d3d_surface
->
parent_device
);
I
Direct3DDevice8
_Release
(
d3d_surface
->
parent_device
);
d3d_surface
->
parent_device
=
NULL
;
d3d_surface
->
parent_device
=
NULL
;
IDirect3DSurface8_Release
(
&
d3d_surface
->
IDirect3DSurface8_iface
);
IDirect3DSurface8_Release
(
&
d3d_surface
->
IDirect3DSurface8_iface
);
...
...
dlls/d3d8/directx.c
View file @
1524cc2a
...
@@ -49,7 +49,7 @@ static HRESULT WINAPI d3d8_QueryInterface(IDirect3D8 *iface, REFIID riid, void *
...
@@ -49,7 +49,7 @@ static HRESULT WINAPI d3d8_QueryInterface(IDirect3D8 *iface, REFIID riid, void *
if
(
IsEqualGUID
(
riid
,
&
IID_IDirect3D8
)
if
(
IsEqualGUID
(
riid
,
&
IID_IDirect3D8
)
||
IsEqualGUID
(
riid
,
&
IID_IUnknown
))
||
IsEqualGUID
(
riid
,
&
IID_IUnknown
))
{
{
I
Unknown
_AddRef
(
iface
);
I
Direct3D8
_AddRef
(
iface
);
*
out
=
iface
;
*
out
=
iface
;
return
S_OK
;
return
S_OK
;
}
}
...
...
dlls/d3d8/surface.c
View file @
1524cc2a
...
@@ -36,7 +36,7 @@ static HRESULT WINAPI d3d8_surface_QueryInterface(IDirect3DSurface8 *iface, REFI
...
@@ -36,7 +36,7 @@ static HRESULT WINAPI d3d8_surface_QueryInterface(IDirect3DSurface8 *iface, REFI
||
IsEqualGUID
(
riid
,
&
IID_IDirect3DResource8
)
||
IsEqualGUID
(
riid
,
&
IID_IDirect3DResource8
)
||
IsEqualGUID
(
riid
,
&
IID_IUnknown
))
||
IsEqualGUID
(
riid
,
&
IID_IUnknown
))
{
{
I
Unknown
_AddRef
(
iface
);
I
Direct3DSurface8
_AddRef
(
iface
);
*
out
=
iface
;
*
out
=
iface
;
return
S_OK
;
return
S_OK
;
}
}
...
@@ -69,7 +69,7 @@ static ULONG WINAPI d3d8_surface_AddRef(IDirect3DSurface8 *iface)
...
@@ -69,7 +69,7 @@ static ULONG WINAPI d3d8_surface_AddRef(IDirect3DSurface8 *iface)
if
(
ref
==
1
)
if
(
ref
==
1
)
{
{
if
(
surface
->
parent_device
)
if
(
surface
->
parent_device
)
I
Unknown
_AddRef
(
surface
->
parent_device
);
I
Direct3DDevice8
_AddRef
(
surface
->
parent_device
);
wined3d_mutex_lock
();
wined3d_mutex_lock
();
wined3d_surface_incref
(
surface
->
wined3d_surface
);
wined3d_surface_incref
(
surface
->
wined3d_surface
);
wined3d_mutex_unlock
();
wined3d_mutex_unlock
();
...
@@ -359,7 +359,7 @@ HRESULT surface_init(struct d3d8_surface *surface, struct d3d8_device *device,
...
@@ -359,7 +359,7 @@ HRESULT surface_init(struct d3d8_surface *surface, struct d3d8_device *device,
}
}
surface
->
parent_device
=
&
device
->
IDirect3DDevice8_iface
;
surface
->
parent_device
=
&
device
->
IDirect3DDevice8_iface
;
I
Unknown
_AddRef
(
surface
->
parent_device
);
I
Direct3DDevice8
_AddRef
(
surface
->
parent_device
);
return
D3D_OK
;
return
D3D_OK
;
}
}
...
...
dlls/d3d8/swapchain.c
View file @
1524cc2a
...
@@ -35,7 +35,7 @@ static HRESULT WINAPI d3d8_swapchain_QueryInterface(IDirect3DSwapChain8 *iface,
...
@@ -35,7 +35,7 @@ static HRESULT WINAPI d3d8_swapchain_QueryInterface(IDirect3DSwapChain8 *iface,
if
(
IsEqualGUID
(
riid
,
&
IID_IDirect3DSwapChain8
)
if
(
IsEqualGUID
(
riid
,
&
IID_IDirect3DSwapChain8
)
||
IsEqualGUID
(
riid
,
&
IID_IUnknown
))
||
IsEqualGUID
(
riid
,
&
IID_IUnknown
))
{
{
I
Unknown
_AddRef
(
iface
);
I
Direct3DSwapChain8
_AddRef
(
iface
);
*
out
=
iface
;
*
out
=
iface
;
return
S_OK
;
return
S_OK
;
}
}
...
...
dlls/d3d8/tests/device.c
View file @
1524cc2a
...
@@ -121,7 +121,7 @@ static HRESULT reset_device(IDirect3DDevice8 *device, HWND device_window, BOOL w
...
@@ -121,7 +121,7 @@ static HRESULT reset_device(IDirect3DDevice8 *device, HWND device_window, BOOL w
#define CHECK_RELEASE(obj,d,rc) \
#define CHECK_RELEASE(obj,d,rc) \
if (obj) { \
if (obj) { \
int tmp1, rc_new = rc; \
int tmp1, rc_new = rc; \
IUnknown_Release( obj ); \
IUnknown_Release(
(IUnknown*)
obj ); \
tmp1 = get_refcount( (IUnknown *)d ); \
tmp1 = get_refcount( (IUnknown *)d ); \
ok(tmp1 == rc_new, "Invalid refcount. Expected %d got %d\n", rc_new, tmp1); \
ok(tmp1 == rc_new, "Invalid refcount. Expected %d got %d\n", rc_new, tmp1); \
}
}
...
@@ -168,7 +168,7 @@ static void check_mipmap_levels(IDirect3DDevice8 *device, UINT width, UINT heigh
...
@@ -168,7 +168,7 @@ static void check_mipmap_levels(IDirect3DDevice8 *device, UINT width, UINT heigh
}
else
}
else
trace
(
"CreateTexture failed: %#08x
\n
"
,
hr
);
trace
(
"CreateTexture failed: %#08x
\n
"
,
hr
);
if
(
texture
)
I
Unknown
_Release
(
texture
);
if
(
texture
)
I
Direct3DDevice8
_Release
(
texture
);
}
}
static
void
test_mipmap_levels
(
void
)
static
void
test_mipmap_levels
(
void
)
...
@@ -210,10 +210,10 @@ static void test_mipmap_levels(void)
...
@@ -210,10 +210,10 @@ static void test_mipmap_levels(void)
cleanup:
cleanup:
if
(
pDevice
)
if
(
pDevice
)
{
{
UINT
refcount
=
I
Unknown
_Release
(
pDevice
);
UINT
refcount
=
I
Direct3DDevice8
_Release
(
pDevice
);
ok
(
!
refcount
,
"Device has %u references left.
\n
"
,
refcount
);
ok
(
!
refcount
,
"Device has %u references left.
\n
"
,
refcount
);
}
}
if
(
pD3d
)
I
Unknown
_Release
(
pD3d
);
if
(
pD3d
)
I
Direct3D8
_Release
(
pD3d
);
DestroyWindow
(
hwnd
);
DestroyWindow
(
hwnd
);
}
}
...
...
dlls/d3d8/texture.c
View file @
1524cc2a
...
@@ -45,7 +45,7 @@ static HRESULT WINAPI d3d8_texture_2d_QueryInterface(IDirect3DTexture8 *iface, R
...
@@ -45,7 +45,7 @@ static HRESULT WINAPI d3d8_texture_2d_QueryInterface(IDirect3DTexture8 *iface, R
||
IsEqualGUID
(
riid
,
&
IID_IDirect3DResource8
)
||
IsEqualGUID
(
riid
,
&
IID_IDirect3DResource8
)
||
IsEqualGUID
(
riid
,
&
IID_IUnknown
))
||
IsEqualGUID
(
riid
,
&
IID_IUnknown
))
{
{
I
Unknown
_AddRef
(
iface
);
I
Direct3DTexture8
_AddRef
(
iface
);
*
out
=
iface
;
*
out
=
iface
;
return
S_OK
;
return
S_OK
;
}
}
...
@@ -413,7 +413,7 @@ static HRESULT WINAPI d3d8_texture_cube_QueryInterface(IDirect3DCubeTexture8 *if
...
@@ -413,7 +413,7 @@ static HRESULT WINAPI d3d8_texture_cube_QueryInterface(IDirect3DCubeTexture8 *if
||
IsEqualGUID
(
riid
,
&
IID_IDirect3DResource8
)
||
IsEqualGUID
(
riid
,
&
IID_IDirect3DResource8
)
||
IsEqualGUID
(
riid
,
&
IID_IUnknown
))
||
IsEqualGUID
(
riid
,
&
IID_IUnknown
))
{
{
I
Unknown
_AddRef
(
iface
);
I
Direct3DCubeTexture8
_AddRef
(
iface
);
*
out
=
iface
;
*
out
=
iface
;
return
S_OK
;
return
S_OK
;
}
}
...
@@ -433,7 +433,7 @@ static ULONG WINAPI d3d8_texture_cube_AddRef(IDirect3DCubeTexture8 *iface)
...
@@ -433,7 +433,7 @@ static ULONG WINAPI d3d8_texture_cube_AddRef(IDirect3DCubeTexture8 *iface)
if
(
ref
==
1
)
if
(
ref
==
1
)
{
{
I
Unknown
_AddRef
(
texture
->
parent_device
);
I
Direct3DDevice8
_AddRef
(
texture
->
parent_device
);
wined3d_mutex_lock
();
wined3d_mutex_lock
();
wined3d_texture_incref
(
texture
->
wined3d_texture
);
wined3d_texture_incref
(
texture
->
wined3d_texture
);
wined3d_mutex_unlock
();
wined3d_mutex_unlock
();
...
@@ -806,7 +806,7 @@ static HRESULT WINAPI d3d8_texture_3d_QueryInterface(IDirect3DVolumeTexture8 *if
...
@@ -806,7 +806,7 @@ static HRESULT WINAPI d3d8_texture_3d_QueryInterface(IDirect3DVolumeTexture8 *if
||
IsEqualGUID
(
riid
,
&
IID_IDirect3DResource8
)
||
IsEqualGUID
(
riid
,
&
IID_IDirect3DResource8
)
||
IsEqualGUID
(
riid
,
&
IID_IUnknown
))
||
IsEqualGUID
(
riid
,
&
IID_IUnknown
))
{
{
I
Unknown
_AddRef
(
iface
);
I
Direct3DVolumeTexture8
_AddRef
(
iface
);
*
out
=
iface
;
*
out
=
iface
;
return
S_OK
;
return
S_OK
;
}
}
...
...
dlls/d3d8/volume.c
View file @
1524cc2a
...
@@ -35,7 +35,7 @@ static HRESULT WINAPI d3d8_volume_QueryInterface(IDirect3DVolume8 *iface, REFIID
...
@@ -35,7 +35,7 @@ static HRESULT WINAPI d3d8_volume_QueryInterface(IDirect3DVolume8 *iface, REFIID
if
(
IsEqualGUID
(
riid
,
&
IID_IDirect3DVolume8
)
if
(
IsEqualGUID
(
riid
,
&
IID_IDirect3DVolume8
)
||
IsEqualGUID
(
riid
,
&
IID_IUnknown
))
||
IsEqualGUID
(
riid
,
&
IID_IUnknown
))
{
{
I
Unknown
_AddRef
(
iface
);
I
Direct3DVolume8
_AddRef
(
iface
);
*
out
=
iface
;
*
out
=
iface
;
return
S_OK
;
return
S_OK
;
}
}
...
...
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