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
0048a037
Commit
0048a037
authored
Feb 23, 2009
by
Henri Verbeet
Committed by
Alexandre Julliard
Feb 23, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d10core: Keep a reference to the wined3d device in the d3d10 device.
parent
4fe84150
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
43 additions
and
7 deletions
+43
-7
d3d10core_private.h
dlls/d3d10core/d3d10core_private.h
+2
-0
device.c
dlls/d3d10core/device.c
+16
-7
device.c
dlls/d3d8/device.c
+6
-0
device.c
dlls/d3d9/device.c
+6
-0
ddraw.c
dlls/ddraw/ddraw.c
+6
-0
directx.c
dlls/wined3d/directx.c
+3
-0
wined3d.idl
include/wine/wined3d.idl
+4
-0
No files found.
dlls/d3d10core/d3d10core_private.h
View file @
0048a037
...
@@ -52,6 +52,8 @@ struct d3d10_device
...
@@ -52,6 +52,8 @@ struct d3d10_device
const
struct
IWineD3DDeviceParentVtbl
*
device_parent_vtbl
;
const
struct
IWineD3DDeviceParentVtbl
*
device_parent_vtbl
;
IUnknown
*
outer_unknown
;
IUnknown
*
outer_unknown
;
LONG
refcount
;
LONG
refcount
;
IWineD3DDevice
*
wined3d_device
;
};
};
/* ID3D10Texture2D */
/* ID3D10Texture2D */
...
...
dlls/d3d10core/device.c
View file @
0048a037
...
@@ -75,6 +75,8 @@ static ULONG STDMETHODCALLTYPE d3d10_device_inner_Release(IUnknown *iface)
...
@@ -75,6 +75,8 @@ static ULONG STDMETHODCALLTYPE d3d10_device_inner_Release(IUnknown *iface)
TRACE
(
"%p decreasing refcount to %u
\n
"
,
This
,
refcount
);
TRACE
(
"%p decreasing refcount to %u
\n
"
,
This
,
refcount
);
if
(
This
->
wined3d_device
)
IWineD3DDevice_Release
(
This
->
wined3d_device
);
return
refcount
;
return
refcount
;
}
}
...
@@ -590,6 +592,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreateTexture1D(ID3D10Device *ifac
...
@@ -590,6 +592,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreateTexture1D(ID3D10Device *ifac
static
HRESULT
STDMETHODCALLTYPE
d3d10_device_CreateTexture2D
(
ID3D10Device
*
iface
,
static
HRESULT
STDMETHODCALLTYPE
d3d10_device_CreateTexture2D
(
ID3D10Device
*
iface
,
const
D3D10_TEXTURE2D_DESC
*
desc
,
const
D3D10_SUBRESOURCE_DATA
*
data
,
ID3D10Texture2D
**
texture
)
const
D3D10_TEXTURE2D_DESC
*
desc
,
const
D3D10_SUBRESOURCE_DATA
*
data
,
ID3D10Texture2D
**
texture
)
{
{
struct
d3d10_device
*
This
=
(
struct
d3d10_device
*
)
iface
;
struct
d3d10_texture2d
*
object
;
struct
d3d10_texture2d
*
object
;
HRESULT
hr
;
HRESULT
hr
;
...
@@ -608,7 +611,6 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreateTexture2D(ID3D10Device *ifac
...
@@ -608,7 +611,6 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreateTexture2D(ID3D10Device *ifac
if
(
desc
->
MipLevels
==
1
&&
desc
->
ArraySize
==
1
)
if
(
desc
->
MipLevels
==
1
&&
desc
->
ArraySize
==
1
)
{
{
IWineD3DDevice
*
wined3d_device
;
IWineDXGIDevice
*
wine_device
;
IWineDXGIDevice
*
wine_device
;
hr
=
ID3D10Device_QueryInterface
(
iface
,
&
IID_IWineDXGIDevice
,
(
void
**
)
&
wine_device
);
hr
=
ID3D10Device_QueryInterface
(
iface
,
&
IID_IWineDXGIDevice
,
(
void
**
)
&
wine_device
);
...
@@ -621,24 +623,20 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreateTexture2D(ID3D10Device *ifac
...
@@ -621,24 +623,20 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreateTexture2D(ID3D10Device *ifac
hr
=
IWineDXGIDevice_create_surface
(
wine_device
,
NULL
,
0
,
NULL
,
hr
=
IWineDXGIDevice_create_surface
(
wine_device
,
NULL
,
0
,
NULL
,
(
IUnknown
*
)
object
,
(
void
**
)
&
object
->
dxgi_surface
);
(
IUnknown
*
)
object
,
(
void
**
)
&
object
->
dxgi_surface
);
IWineDXGIDevice_Release
(
wine_device
);
if
(
FAILED
(
hr
))
if
(
FAILED
(
hr
))
{
{
ERR
(
"Failed to create DXGI surface, returning %#x
\n
"
,
hr
);
ERR
(
"Failed to create DXGI surface, returning %#x
\n
"
,
hr
);
HeapFree
(
GetProcessHeap
(),
0
,
object
);
HeapFree
(
GetProcessHeap
(),
0
,
object
);
IWineDXGIDevice_Release
(
wine_device
);
return
hr
;
return
hr
;
}
}
wined3d_device
=
IWineDXGIDevice_get_wined3d_device
(
wine_device
);
IWineDXGIDevice_Release
(
wine_device
);
FIXME
(
"Implement DXGI<->wined3d usage conversion
\n
"
);
FIXME
(
"Implement DXGI<->wined3d usage conversion
\n
"
);
hr
=
IWineD3DDevice_CreateSurface
(
wined3d_device
,
desc
->
Width
,
desc
->
Height
,
hr
=
IWineD3DDevice_CreateSurface
(
This
->
wined3d_device
,
desc
->
Width
,
desc
->
Height
,
wined3dformat_from_dxgi_format
(
desc
->
Format
),
FALSE
,
FALSE
,
0
,
wined3dformat_from_dxgi_format
(
desc
->
Format
),
FALSE
,
FALSE
,
0
,
&
object
->
wined3d_surface
,
WINED3DRTYPE_SURFACE
,
desc
->
Usage
,
WINED3DPOOL_DEFAULT
,
&
object
->
wined3d_surface
,
WINED3DRTYPE_SURFACE
,
desc
->
Usage
,
WINED3DPOOL_DEFAULT
,
desc
->
SampleDesc
.
Count
,
desc
->
SampleDesc
.
Quality
,
NULL
,
SURFACE_OPENGL
,
(
IUnknown
*
)
object
);
desc
->
SampleDesc
.
Count
,
desc
->
SampleDesc
.
Quality
,
NULL
,
SURFACE_OPENGL
,
(
IUnknown
*
)
object
);
IWineD3DDevice_Release
(
wined3d_device
);
if
(
FAILED
(
hr
))
if
(
FAILED
(
hr
))
{
{
ERR
(
"CreateSurface failed, returning %#x
\n
"
,
hr
);
ERR
(
"CreateSurface failed, returning %#x
\n
"
,
hr
);
...
@@ -1144,6 +1142,16 @@ static ULONG STDMETHODCALLTYPE device_parent_Release(IWineD3DDeviceParent *iface
...
@@ -1144,6 +1142,16 @@ static ULONG STDMETHODCALLTYPE device_parent_Release(IWineD3DDeviceParent *iface
/* IWineD3DDeviceParent methods */
/* IWineD3DDeviceParent methods */
static
void
STDMETHODCALLTYPE
device_parent_WineD3DDeviceCreated
(
IWineD3DDeviceParent
*
iface
,
IWineD3DDevice
*
device
)
{
struct
d3d10_device
*
This
=
device_from_device_parent
(
iface
);
TRACE
(
"iface %p, device %p
\n
"
,
iface
,
device
);
IWineD3DDevice_AddRef
(
device
);
This
->
wined3d_device
=
device
;
}
static
HRESULT
STDMETHODCALLTYPE
device_parent_CreateSurface
(
IWineD3DDeviceParent
*
iface
,
static
HRESULT
STDMETHODCALLTYPE
device_parent_CreateSurface
(
IWineD3DDeviceParent
*
iface
,
IUnknown
*
superior
,
UINT
width
,
UINT
height
,
WINED3DFORMAT
format
,
DWORD
usage
,
IUnknown
*
superior
,
UINT
width
,
UINT
height
,
WINED3DFORMAT
format
,
DWORD
usage
,
WINED3DPOOL
pool
,
UINT
level
,
WINED3DCUBEMAP_FACES
face
,
IWineD3DSurface
**
surface
)
WINED3DPOOL
pool
,
UINT
level
,
WINED3DCUBEMAP_FACES
face
,
IWineD3DSurface
**
surface
)
...
@@ -1287,6 +1295,7 @@ const struct IWineD3DDeviceParentVtbl d3d10_wined3d_device_parent_vtbl =
...
@@ -1287,6 +1295,7 @@ const struct IWineD3DDeviceParentVtbl d3d10_wined3d_device_parent_vtbl =
device_parent_AddRef
,
device_parent_AddRef
,
device_parent_Release
,
device_parent_Release
,
/* IWineD3DDeviceParent methods */
/* IWineD3DDeviceParent methods */
device_parent_WineD3DDeviceCreated
,
device_parent_CreateSurface
,
device_parent_CreateSurface
,
device_parent_CreateRenderTarget
,
device_parent_CreateRenderTarget
,
device_parent_CreateDepthStencilSurface
,
device_parent_CreateDepthStencilSurface
,
...
...
dlls/d3d8/device.c
View file @
0048a037
...
@@ -2394,6 +2394,11 @@ static ULONG STDMETHODCALLTYPE device_parent_Release(IWineD3DDeviceParent *iface
...
@@ -2394,6 +2394,11 @@ static ULONG STDMETHODCALLTYPE device_parent_Release(IWineD3DDeviceParent *iface
/* IWineD3DDeviceParent methods */
/* IWineD3DDeviceParent methods */
static
void
STDMETHODCALLTYPE
device_parent_WineD3DDeviceCreated
(
IWineD3DDeviceParent
*
iface
,
IWineD3DDevice
*
device
)
{
TRACE
(
"iface %p, device %p
\n
"
,
iface
,
device
);
}
static
HRESULT
STDMETHODCALLTYPE
device_parent_CreateSurface
(
IWineD3DDeviceParent
*
iface
,
static
HRESULT
STDMETHODCALLTYPE
device_parent_CreateSurface
(
IWineD3DDeviceParent
*
iface
,
IUnknown
*
superior
,
UINT
width
,
UINT
height
,
WINED3DFORMAT
format
,
DWORD
usage
,
IUnknown
*
superior
,
UINT
width
,
UINT
height
,
WINED3DFORMAT
format
,
DWORD
usage
,
WINED3DPOOL
pool
,
UINT
level
,
WINED3DCUBEMAP_FACES
face
,
IWineD3DSurface
**
surface
)
WINED3DPOOL
pool
,
UINT
level
,
WINED3DCUBEMAP_FACES
face
,
IWineD3DSurface
**
surface
)
...
@@ -2591,6 +2596,7 @@ const IWineD3DDeviceParentVtbl d3d8_wined3d_device_parent_vtbl =
...
@@ -2591,6 +2596,7 @@ const IWineD3DDeviceParentVtbl d3d8_wined3d_device_parent_vtbl =
device_parent_AddRef
,
device_parent_AddRef
,
device_parent_Release
,
device_parent_Release
,
/* IWineD3DDeviceParent methods */
/* IWineD3DDeviceParent methods */
device_parent_WineD3DDeviceCreated
,
device_parent_CreateSurface
,
device_parent_CreateSurface
,
device_parent_CreateRenderTarget
,
device_parent_CreateRenderTarget
,
device_parent_CreateDepthStencilSurface
,
device_parent_CreateDepthStencilSurface
,
...
...
dlls/d3d9/device.c
View file @
0048a037
...
@@ -1929,6 +1929,11 @@ static ULONG STDMETHODCALLTYPE device_parent_Release(IWineD3DDeviceParent *iface
...
@@ -1929,6 +1929,11 @@ static ULONG STDMETHODCALLTYPE device_parent_Release(IWineD3DDeviceParent *iface
/* IWineD3DDeviceParent methods */
/* IWineD3DDeviceParent methods */
static
void
STDMETHODCALLTYPE
device_parent_WineD3DDeviceCreated
(
IWineD3DDeviceParent
*
iface
,
IWineD3DDevice
*
device
)
{
TRACE
(
"iface %p, device %p
\n
"
,
iface
,
device
);
}
static
HRESULT
STDMETHODCALLTYPE
device_parent_CreateSurface
(
IWineD3DDeviceParent
*
iface
,
static
HRESULT
STDMETHODCALLTYPE
device_parent_CreateSurface
(
IWineD3DDeviceParent
*
iface
,
IUnknown
*
superior
,
UINT
width
,
UINT
height
,
WINED3DFORMAT
format
,
DWORD
usage
,
IUnknown
*
superior
,
UINT
width
,
UINT
height
,
WINED3DFORMAT
format
,
DWORD
usage
,
WINED3DPOOL
pool
,
UINT
level
,
WINED3DCUBEMAP_FACES
face
,
IWineD3DSurface
**
surface
)
WINED3DPOOL
pool
,
UINT
level
,
WINED3DCUBEMAP_FACES
face
,
IWineD3DSurface
**
surface
)
...
@@ -2130,6 +2135,7 @@ const IWineD3DDeviceParentVtbl d3d9_wined3d_device_parent_vtbl =
...
@@ -2130,6 +2135,7 @@ const IWineD3DDeviceParentVtbl d3d9_wined3d_device_parent_vtbl =
device_parent_AddRef
,
device_parent_AddRef
,
device_parent_Release
,
device_parent_Release
,
/* IWineD3DDeviceParent methods */
/* IWineD3DDeviceParent methods */
device_parent_WineD3DDeviceCreated
,
device_parent_CreateSurface
,
device_parent_CreateSurface
,
device_parent_CreateRenderTarget
,
device_parent_CreateRenderTarget
,
device_parent_CreateDepthStencilSurface
,
device_parent_CreateDepthStencilSurface
,
...
...
dlls/ddraw/ddraw.c
View file @
0048a037
...
@@ -3409,6 +3409,11 @@ static ULONG STDMETHODCALLTYPE device_parent_Release(IWineD3DDeviceParent *iface
...
@@ -3409,6 +3409,11 @@ static ULONG STDMETHODCALLTYPE device_parent_Release(IWineD3DDeviceParent *iface
/* IWineD3DDeviceParent methods */
/* IWineD3DDeviceParent methods */
static
void
STDMETHODCALLTYPE
device_parent_WineD3DDeviceCreated
(
IWineD3DDeviceParent
*
iface
,
IWineD3DDevice
*
device
)
{
TRACE
(
"iface %p, device %p
\n
"
,
iface
,
device
);
}
static
HRESULT
STDMETHODCALLTYPE
device_parent_CreateSurface
(
IWineD3DDeviceParent
*
iface
,
static
HRESULT
STDMETHODCALLTYPE
device_parent_CreateSurface
(
IWineD3DDeviceParent
*
iface
,
IUnknown
*
superior
,
UINT
width
,
UINT
height
,
WINED3DFORMAT
format
,
DWORD
usage
,
IUnknown
*
superior
,
UINT
width
,
UINT
height
,
WINED3DFORMAT
format
,
DWORD
usage
,
WINED3DPOOL
pool
,
UINT
level
,
WINED3DCUBEMAP_FACES
face
,
IWineD3DSurface
**
surface
)
WINED3DPOOL
pool
,
UINT
level
,
WINED3DCUBEMAP_FACES
face
,
IWineD3DSurface
**
surface
)
...
@@ -3624,6 +3629,7 @@ const IWineD3DDeviceParentVtbl ddraw_wined3d_device_parent_vtbl =
...
@@ -3624,6 +3629,7 @@ const IWineD3DDeviceParentVtbl ddraw_wined3d_device_parent_vtbl =
device_parent_AddRef
,
device_parent_AddRef
,
device_parent_Release
,
device_parent_Release
,
/* IWineD3DDeviceParent methods */
/* IWineD3DDeviceParent methods */
device_parent_WineD3DDeviceCreated
,
device_parent_CreateSurface
,
device_parent_CreateSurface
,
device_parent_CreateRenderTarget
,
device_parent_CreateRenderTarget
,
device_parent_CreateDepthStencilSurface
,
device_parent_CreateDepthStencilSurface
,
...
...
dlls/wined3d/directx.c
View file @
0048a037
...
@@ -3722,6 +3722,9 @@ static HRESULT WINAPI IWineD3DImpl_CreateDevice(IWineD3D *iface, UINT Adapter,
...
@@ -3722,6 +3722,9 @@ static HRESULT WINAPI IWineD3DImpl_CreateDevice(IWineD3D *iface, UINT Adapter,
for
(
i
=
0
;
i
<
PATCHMAP_SIZE
;
i
++
)
{
for
(
i
=
0
;
i
<
PATCHMAP_SIZE
;
i
++
)
{
list_init
(
&
object
->
patches
[
i
]);
list_init
(
&
object
->
patches
[
i
]);
}
}
IWineD3DDeviceParent_WineD3DDeviceCreated
(
device_parent
,
*
ppReturnedDeviceInterface
);
return
WINED3D_OK
;
return
WINED3D_OK
;
}
}
#undef GLINFO_LOCATION
#undef GLINFO_LOCATION
...
...
include/wine/wined3d.idl
View file @
0048a037
...
@@ -2188,6 +2188,10 @@ interface IWineD3DDevice;
...
@@ -2188,6 +2188,10 @@ interface IWineD3DDevice;
]
]
interface
IWineD3DDeviceParent
:
IUnknown
interface
IWineD3DDeviceParent
:
IUnknown
{
{
void
WineD3DDeviceCreated
(
[
in
]
IWineD3DDevice
*
device
)
;
HRESULT
CreateSurface
(
HRESULT
CreateSurface
(
[
in
]
IUnknown
*
superior
,
[
in
]
IUnknown
*
superior
,
[
in
]
UINT
width
,
[
in
]
UINT
width
,
...
...
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