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
d5739cd2
Commit
d5739cd2
authored
Apr 24, 2011
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Apr 25, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d9: Finish the COM cleanup of the IDirect3DDevice9Ex iface.
parent
5f57cc14
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
31 additions
and
33 deletions
+31
-33
buffer.c
dlls/d3d9/buffer.c
+2
-2
cubetexture.c
dlls/d3d9/cubetexture.c
+1
-1
d3d9_private.h
dlls/d3d9/d3d9_private.h
+3
-7
device.c
dlls/d3d9/device.c
+15
-13
directx.c
dlls/d3d9/directx.c
+1
-1
query.c
dlls/d3d9/query.c
+1
-1
shader.c
dlls/d3d9/shader.c
+2
-2
stateblock.c
dlls/d3d9/stateblock.c
+1
-1
surface.c
dlls/d3d9/surface.c
+1
-1
swapchain.c
dlls/d3d9/swapchain.c
+1
-1
texture.c
dlls/d3d9/texture.c
+1
-1
vertexdeclaration.c
dlls/d3d9/vertexdeclaration.c
+1
-1
volumetexture.c
dlls/d3d9/volumetexture.c
+1
-1
No files found.
dlls/d3d9/buffer.c
View file @
d5739cd2
...
...
@@ -281,7 +281,7 @@ HRESULT vertexbuffer_init(IDirect3DVertexBuffer9Impl *buffer, IDirect3DDevice9Im
return
hr
;
}
buffer
->
parentDevice
=
(
IDirect3DDevice9Ex
*
)
devi
ce
;
buffer
->
parentDevice
=
&
device
->
IDirect3DDevice9Ex_ifa
ce
;
IDirect3DDevice9Ex_AddRef
(
buffer
->
parentDevice
);
return
D3D_OK
;
...
...
@@ -544,7 +544,7 @@ HRESULT indexbuffer_init(IDirect3DIndexBuffer9Impl *buffer, IDirect3DDevice9Impl
return
hr
;
}
buffer
->
parentDevice
=
(
IDirect3DDevice9Ex
*
)
devi
ce
;
buffer
->
parentDevice
=
&
device
->
IDirect3DDevice9Ex_ifa
ce
;
IDirect3DDevice9Ex_AddRef
(
buffer
->
parentDevice
);
return
D3D_OK
;
...
...
dlls/d3d9/cubetexture.c
View file @
d5739cd2
...
...
@@ -480,7 +480,7 @@ HRESULT cubetexture_init(IDirect3DCubeTexture9Impl *texture, IDirect3DDevice9Imp
return
hr
;
}
texture
->
parentDevice
=
(
IDirect3DDevice9Ex
*
)
devi
ce
;
texture
->
parentDevice
=
&
device
->
IDirect3DDevice9Ex_ifa
ce
;
IDirect3DDevice9Ex_AddRef
(
texture
->
parentDevice
);
return
D3D_OK
;
...
...
dlls/d3d9/d3d9_private.h
View file @
d5739cd2
...
...
@@ -162,14 +162,10 @@ void filter_caps(D3DCAPS9* pCaps) DECLSPEC_HIDDEN;
*/
typedef
struct
IDirect3DDevice9Impl
{
/* IUnknown fields */
const
IDirect3DDevice9ExVtbl
*
lpVtbl
;
IDirect3DDevice9Ex
IDirect3DDevice9Ex_iface
;
const
IWineD3DDeviceParentVtbl
*
device_parent_vtbl
;
LONG
ref
;
/* IDirect3DDevice9 fields */
IWineD3DDevice
*
WineD3DDevice
;
LONG
ref
;
IWineD3DDevice
*
WineD3DDevice
;
/* Avoids recursion with nested ReleaseRef to 0 */
BOOL
inDestruction
;
...
...
dlls/d3d9/device.c
View file @
d5739cd2
...
...
@@ -183,7 +183,7 @@ static UINT vertex_count_from_primitive_count(D3DPRIMITIVETYPE primitive_type, U
static
inline
IDirect3DDevice9Impl
*
impl_from_IDirect3DDevice9Ex
(
IDirect3DDevice9Ex
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
IDirect3DDevice9Impl
,
lpVtbl
);
return
CONTAINING_RECORD
(
iface
,
IDirect3DDevice9Impl
,
IDirect3DDevice9Ex_iface
);
}
static
HRESULT
WINAPI
IDirect3DDevice9Impl_QueryInterface
(
IDirect3DDevice9Ex
*
iface
,
REFIID
riid
,
...
...
@@ -2213,7 +2213,8 @@ static IDirect3DVertexDeclaration9 *getConvertedDecl(IDirect3DDevice9Impl *This,
hr
=
vdecl_convert_fvf
(
fvf
,
&
elements
);
if
(
hr
!=
S_OK
)
return
NULL
;
hr
=
IDirect3DDevice9Impl_CreateVertexDeclaration
((
IDirect3DDevice9Ex
*
)
This
,
elements
,
&
pDecl
);
hr
=
IDirect3DDevice9Impl_CreateVertexDeclaration
(
&
This
->
IDirect3DDevice9Ex_iface
,
elements
,
&
pDecl
);
HeapFree
(
GetProcessHeap
(),
0
,
elements
);
/* CreateVertexDeclaration makes a copy */
if
(
hr
!=
S_OK
)
return
NULL
;
...
...
@@ -3142,22 +3143,23 @@ static inline struct IDirect3DDevice9Impl *device_from_device_parent(IWineD3DDev
-
FIELD_OFFSET
(
struct
IDirect3DDevice9Impl
,
device_parent_vtbl
));
}
static
HRESULT
STDMETHODCALLTYPE
device_parent_QueryInterface
(
IWineD3DDeviceParent
*
iface
,
REFIID
riid
,
void
**
object
)
static
HRESULT
STDMETHODCALLTYPE
device_parent_QueryInterface
(
IWineD3DDeviceParent
*
iface
,
REFIID
riid
,
void
**
object
)
{
struct
IDirect3DDevice9Impl
*
This
=
device_from_device_parent
(
iface
);
return
IDirect3DDevice9Impl_QueryInterface
(
(
IDirect3DDevice9Ex
*
)
This
,
riid
,
object
);
return
IDirect3DDevice9Impl_QueryInterface
(
&
This
->
IDirect3DDevice9Ex_iface
,
riid
,
object
);
}
static
ULONG
STDMETHODCALLTYPE
device_parent_AddRef
(
IWineD3DDeviceParent
*
iface
)
{
struct
IDirect3DDevice9Impl
*
This
=
device_from_device_parent
(
iface
);
return
IDirect3DDevice9Impl_AddRef
(
(
IDirect3DDevice9Ex
*
)
This
);
return
IDirect3DDevice9Impl_AddRef
(
&
This
->
IDirect3DDevice9Ex_iface
);
}
static
ULONG
STDMETHODCALLTYPE
device_parent_Release
(
IWineD3DDeviceParent
*
iface
)
{
struct
IDirect3DDevice9Impl
*
This
=
device_from_device_parent
(
iface
);
return
IDirect3DDevice9Impl_Release
(
(
IDirect3DDevice9Ex
*
)
This
);
return
IDirect3DDevice9Impl_Release
(
&
This
->
IDirect3DDevice9Ex_iface
);
}
/* IWineD3DDeviceParent methods */
...
...
@@ -3218,7 +3220,7 @@ static HRESULT STDMETHODCALLTYPE device_parent_CreateRenderTarget(IWineD3DDevice
"
\t
multisample_quality %u, lockable %u, surface %p
\n
"
,
iface
,
container_parent
,
width
,
height
,
format
,
multisample_type
,
multisample_quality
,
lockable
,
surface
);
hr
=
IDirect3DDevice9Impl_CreateRenderTarget
(
(
IDirect3DDevice9Ex
*
)
This
,
width
,
height
,
hr
=
IDirect3DDevice9Impl_CreateRenderTarget
(
&
This
->
IDirect3DDevice9Ex_iface
,
width
,
height
,
d3dformat_from_wined3dformat
(
format
),
multisample_type
,
multisample_quality
,
lockable
,
(
IDirect3DSurface9
**
)
&
d3d_surface
,
NULL
);
if
(
FAILED
(
hr
))
...
...
@@ -3249,9 +3251,9 @@ static HRESULT STDMETHODCALLTYPE device_parent_CreateDepthStencilSurface(IWineD3
"
\t
multisample_quality %u, discard %u, surface %p
\n
"
,
iface
,
width
,
height
,
format
,
multisample_type
,
multisample_quality
,
discard
,
surface
);
hr
=
IDirect3DDevice9Impl_CreateDepthStencilSurface
(
(
IDirect3DDevice9Ex
*
)
This
,
width
,
height
,
d3dformat_from_wined3dformat
(
format
),
multisample_type
,
multisample_quality
,
discard
,
(
IDirect3DSurface9
**
)
&
d3d_surface
,
NULL
);
hr
=
IDirect3DDevice9Impl_CreateDepthStencilSurface
(
&
This
->
IDirect3DDevice9Ex_iface
,
width
,
height
,
d3dformat_from_wined3dformat
(
format
),
multisample_type
,
multisample_quality
,
discard
,
(
IDirect3DSurface9
**
)
&
d3d_surface
,
NULL
);
if
(
FAILED
(
hr
))
{
ERR
(
"(%p) CreateDepthStencilSurface failed, returning %#x
\n
"
,
iface
,
hr
);
...
...
@@ -3260,7 +3262,7 @@ static HRESULT STDMETHODCALLTYPE device_parent_CreateDepthStencilSurface(IWineD3
*
surface
=
d3d_surface
->
wineD3DSurface
;
IWineD3DSurface_AddRef
(
*
surface
);
d3d_surface
->
container
=
(
IUnknown
*
)
This
;
d3d_surface
->
container
=
(
IUnknown
*
)
&
This
->
IDirect3DDevice9Ex_iface
;
/* Implicit surfaces are created with an refcount of 0 */
IDirect3DSurface9_Release
((
IDirect3DSurface9
*
)
d3d_surface
);
...
...
@@ -3333,7 +3335,7 @@ static HRESULT STDMETHODCALLTYPE device_parent_CreateSwapChain(IWineD3DDevicePar
local_parameters
.
FullScreen_RefreshRateInHz
=
present_parameters
->
FullScreen_RefreshRateInHz
;
local_parameters
.
PresentationInterval
=
present_parameters
->
PresentationInterval
;
hr
=
IDirect3DDevice9Impl_CreateAdditionalSwapChain
(
(
IDirect3DDevice9Ex
*
)
This
,
hr
=
IDirect3DDevice9Impl_CreateAdditionalSwapChain
(
&
This
->
IDirect3DDevice9Ex_iface
,
&
local_parameters
,
&
d3d_swapchain
);
if
(
FAILED
(
hr
))
{
...
...
@@ -3402,7 +3404,7 @@ HRESULT device_init(IDirect3DDevice9Impl *device, struct wined3d *wined3d, UINT
if
(
mode
)
FIXME
(
"Ignoring display mode.
\n
"
);
device
->
lpVtbl
=
&
Direct3DDevice9_Vtbl
;
device
->
IDirect3DDevice9Ex_iface
.
lpVtbl
=
&
Direct3DDevice9_Vtbl
;
device
->
device_parent_vtbl
=
&
d3d9_wined3d_device_parent_vtbl
;
device
->
ref
=
1
;
...
...
dlls/d3d9/directx.c
View file @
d5739cd2
...
...
@@ -516,7 +516,7 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH IDirect3D9ExImpl_CreateDeviceEx(IDirect3
}
TRACE
(
"Created device %p.
\n
"
,
object
);
*
device
=
(
IDirect3DDevice9Ex
*
)
object
;
*
device
=
&
object
->
IDirect3DDevice9Ex_iface
;
return
D3D_OK
;
}
...
...
dlls/d3d9/query.c
View file @
d5739cd2
...
...
@@ -179,7 +179,7 @@ HRESULT query_init(IDirect3DQuery9Impl *query, IDirect3DDevice9Impl *device, D3D
return
hr
;
}
query
->
parentDevice
=
(
IDirect3DDevice9Ex
*
)
devi
ce
;
query
->
parentDevice
=
&
device
->
IDirect3DDevice9Ex_ifa
ce
;
IDirect3DDevice9Ex_AddRef
(
query
->
parentDevice
);
return
D3D_OK
;
...
...
dlls/d3d9/shader.c
View file @
d5739cd2
...
...
@@ -144,7 +144,7 @@ HRESULT vertexshader_init(IDirect3DVertexShader9Impl *shader, IDirect3DDevice9Im
return
hr
;
}
shader
->
parentDevice
=
(
IDirect3DDevice9Ex
*
)
devi
ce
;
shader
->
parentDevice
=
&
device
->
IDirect3DDevice9Ex_ifa
ce
;
IDirect3DDevice9Ex_AddRef
(
shader
->
parentDevice
);
return
D3D_OK
;
...
...
@@ -271,7 +271,7 @@ HRESULT pixelshader_init(IDirect3DPixelShader9Impl *shader, IDirect3DDevice9Impl
return
hr
;
}
shader
->
parentDevice
=
(
IDirect3DDevice9Ex
*
)
devi
ce
;
shader
->
parentDevice
=
&
device
->
IDirect3DDevice9Ex_ifa
ce
;
IDirect3DDevice9Ex_AddRef
(
shader
->
parentDevice
);
return
D3D_OK
;
...
...
dlls/d3d9/stateblock.c
View file @
d5739cd2
...
...
@@ -159,7 +159,7 @@ HRESULT stateblock_init(IDirect3DStateBlock9Impl *stateblock, IDirect3DDevice9Im
}
}
stateblock
->
parentDevice
=
(
IDirect3DDevice9Ex
*
)
devi
ce
;
stateblock
->
parentDevice
=
&
device
->
IDirect3DDevice9Ex_ifa
ce
;
IDirect3DDevice9Ex_AddRef
(
stateblock
->
parentDevice
);
return
D3D_OK
;
...
...
dlls/d3d9/surface.c
View file @
d5739cd2
...
...
@@ -402,7 +402,7 @@ HRESULT surface_init(IDirect3DSurface9Impl *surface, IDirect3DDevice9Impl *devic
return
hr
;
}
surface
->
parentDevice
=
(
IDirect3DDevice9Ex
*
)
devi
ce
;
surface
->
parentDevice
=
&
device
->
IDirect3DDevice9Ex_ifa
ce
;
IDirect3DDevice9Ex_AddRef
(
surface
->
parentDevice
);
return
D3D_OK
;
...
...
dlls/d3d9/swapchain.c
View file @
d5739cd2
...
...
@@ -285,7 +285,7 @@ HRESULT swapchain_init(IDirect3DSwapChain9Impl *swapchain, IDirect3DDevice9Impl
return
hr
;
}
swapchain
->
parentDevice
=
(
IDirect3DDevice9Ex
*
)
devi
ce
;
swapchain
->
parentDevice
=
&
device
->
IDirect3DDevice9Ex_ifa
ce
;
IDirect3DDevice9Ex_AddRef
(
swapchain
->
parentDevice
);
return
D3D_OK
;
...
...
dlls/d3d9/texture.c
View file @
d5739cd2
...
...
@@ -467,7 +467,7 @@ HRESULT texture_init(IDirect3DTexture9Impl *texture, IDirect3DDevice9Impl *devic
return
hr
;
}
texture
->
parentDevice
=
(
IDirect3DDevice9Ex
*
)
devi
ce
;
texture
->
parentDevice
=
&
device
->
IDirect3DDevice9Ex_ifa
ce
;
IDirect3DDevice9Ex_AddRef
(
texture
->
parentDevice
);
return
D3D_OK
;
...
...
dlls/d3d9/vertexdeclaration.c
View file @
d5739cd2
...
...
@@ -406,7 +406,7 @@ HRESULT vertexdeclaration_init(IDirect3DVertexDeclaration9Impl *declaration,
return
hr
;
}
declaration
->
parentDevice
=
(
IDirect3DDevice9Ex
*
)
devi
ce
;
declaration
->
parentDevice
=
&
device
->
IDirect3DDevice9Ex_ifa
ce
;
IDirect3DDevice9Ex_AddRef
(
declaration
->
parentDevice
);
return
D3D_OK
;
...
...
dlls/d3d9/volumetexture.c
View file @
d5739cd2
...
...
@@ -453,7 +453,7 @@ HRESULT volumetexture_init(IDirect3DVolumeTexture9Impl *texture, IDirect3DDevice
return
hr
;
}
texture
->
parentDevice
=
(
IDirect3DDevice9Ex
*
)
devi
ce
;
texture
->
parentDevice
=
&
device
->
IDirect3DDevice9Ex_ifa
ce
;
IDirect3DDevice9Ex_AddRef
(
texture
->
parentDevice
);
return
D3D_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