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
2ef40090
Commit
2ef40090
authored
Aug 31, 2010
by
Henri Verbeet
Committed by
Alexandre Julliard
Sep 01, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Devices don't need parents.
parent
658b0489
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
22 additions
and
37 deletions
+22
-37
device.c
dlls/d3d8/device.c
+1
-1
device.c
dlls/d3d9/device.c
+1
-1
ddraw.c
dlls/ddraw/ddraw.c
+1
-1
device.c
dlls/dxgi/device.c
+1
-1
device.c
dlls/wined3d/device.c
+11
-21
directx.c
dlls/wined3d/directx.c
+5
-8
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-2
wined3d.idl
include/wine/wined3d.idl
+1
-2
No files found.
dlls/d3d8/device.c
View file @
2ef40090
...
...
@@ -2796,7 +2796,7 @@ HRESULT device_init(IDirect3DDevice8Impl *device, IWineD3D *wined3d, UINT adapte
if
(
!
(
flags
&
D3DCREATE_FPU_PRESERVE
))
setup_fpu
();
wined3d_mutex_lock
();
hr
=
IWineD3D_CreateDevice
(
wined3d
,
adapter
,
device_type
,
focus_window
,
flags
,
(
IUnknown
*
)
device
,
hr
=
IWineD3D_CreateDevice
(
wined3d
,
adapter
,
device_type
,
focus_window
,
flags
,
(
IWineD3DDeviceParent
*
)
&
device
->
device_parent_vtbl
,
&
device
->
WineD3DDevice
);
if
(
FAILED
(
hr
))
{
...
...
dlls/d3d9/device.c
View file @
2ef40090
...
...
@@ -2857,7 +2857,7 @@ HRESULT device_init(IDirect3DDevice9Impl *device, IWineD3D *wined3d, UINT adapte
if
(
!
(
flags
&
D3DCREATE_FPU_PRESERVE
))
setup_fpu
();
wined3d_mutex_lock
();
hr
=
IWineD3D_CreateDevice
(
wined3d
,
adapter
,
device_type
,
focus_window
,
flags
,
(
IUnknown
*
)
device
,
hr
=
IWineD3D_CreateDevice
(
wined3d
,
adapter
,
device_type
,
focus_window
,
flags
,
(
IWineD3DDeviceParent
*
)
&
device
->
device_parent_vtbl
,
&
device
->
WineD3DDevice
);
if
(
FAILED
(
hr
))
{
...
...
dlls/ddraw/ddraw.c
View file @
2ef40090
...
...
@@ -5722,7 +5722,7 @@ HRESULT ddraw_init(IDirectDrawImpl *ddraw, WINED3DDEVTYPE device_type)
return
E_OUTOFMEMORY
;
}
hr
=
IWineD3D_CreateDevice
(
ddraw
->
wineD3D
,
WINED3DADAPTER_DEFAULT
,
device_type
,
NULL
,
0
,
(
IUnknown
*
)
ddraw
,
hr
=
IWineD3D_CreateDevice
(
ddraw
->
wineD3D
,
WINED3DADAPTER_DEFAULT
,
device_type
,
NULL
,
0
,
(
IWineD3DDeviceParent
*
)
&
ddraw
->
device_parent_vtbl
,
&
ddraw
->
wineD3DDevice
);
if
(
FAILED
(
hr
))
{
...
...
dlls/dxgi/device.c
View file @
2ef40090
...
...
@@ -394,7 +394,7 @@ HRESULT dxgi_device_init(struct dxgi_device *device, struct dxgi_device_layer *l
FIXME
(
"Ignoring adapter type.
\n
"
);
EnterCriticalSection
(
&
dxgi_cs
);
hr
=
IWineD3D_CreateDevice
(
wined3d
,
adapter_ordinal
,
WINED3DDEVTYPE_HAL
,
NULL
,
0
,
(
IUnknown
*
)
device
,
wined3d_device_parent
,
&
device
->
wined3d_device
);
wined3d_device_parent
,
&
device
->
wined3d_device
);
IWineD3DDeviceParent_Release
(
wined3d_device_parent
);
IWineD3D_Release
(
wined3d
);
LeaveCriticalSection
(
&
dxgi_cs
);
...
...
dlls/wined3d/device.c
View file @
2ef40090
...
...
@@ -815,19 +815,21 @@ HRESULT device_clear_render_targets(IWineD3DDeviceImpl *device, UINT rt_count, I
* IUnknown parts follows
**********************************************************/
static
HRESULT
WINAPI
IWineD3DDeviceImpl_QueryInterface
(
IWineD3DDevice
*
iface
,
REFIID
riid
,
LPVOID
*
ppobj
)
static
HRESULT
WINAPI
IWineD3DDeviceImpl_QueryInterface
(
IWineD3DDevice
*
iface
,
REFIID
riid
,
void
**
object
)
{
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
TRACE
(
"iface %p, riid %s, object %p.
\n
"
,
iface
,
debugstr_guid
(
riid
),
object
)
;
TRACE
(
"(%p)->(%s,%p)
\n
"
,
This
,
debugstr_guid
(
riid
),
ppobj
);
if
(
IsEqualGUID
(
riid
,
&
IID_IUnknown
)
||
IsEqualGUID
(
riid
,
&
IID_IWineD3DBase
)
||
IsEqualGUID
(
riid
,
&
IID_IWineD3DDevice
))
{
if
(
IsEqualGUID
(
riid
,
&
IID_IWineD3DDevice
)
||
IsEqualGUID
(
riid
,
&
IID_IUnknown
))
{
IUnknown_AddRef
(
iface
);
*
ppobj
=
This
;
*
object
=
iface
;
return
S_OK
;
}
*
ppobj
=
NULL
;
WARN
(
"%s not implemented, returning E_NOINTERFACE.
\n
"
,
debugstr_guid
(
riid
));
*
object
=
NULL
;
return
E_NOINTERFACE
;
}
...
...
@@ -883,16 +885,6 @@ static ULONG WINAPI IWineD3DDeviceImpl_Release(IWineD3DDevice *iface) {
return
refCount
;
}
/**********************************************************
* IWineD3DDevice implementation follows
**********************************************************/
static
HRESULT
WINAPI
IWineD3DDeviceImpl_GetParent
(
IWineD3DDevice
*
iface
,
IUnknown
**
pParent
)
{
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
*
pParent
=
This
->
parent
;
IUnknown_AddRef
(
This
->
parent
);
return
WINED3D_OK
;
}
static
HRESULT
WINAPI
IWineD3DDeviceImpl_CreateBuffer
(
IWineD3DDevice
*
iface
,
struct
wined3d_buffer_desc
*
desc
,
const
void
*
data
,
IUnknown
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
,
IWineD3DBuffer
**
buffer
)
{
...
...
@@ -6646,7 +6638,6 @@ static const IWineD3DDeviceVtbl IWineD3DDevice_Vtbl =
IWineD3DDeviceImpl_AddRef
,
IWineD3DDeviceImpl_Release
,
/*** IWineD3DDevice methods ***/
IWineD3DDeviceImpl_GetParent
,
/*** Creation methods**/
IWineD3DDeviceImpl_CreateBuffer
,
IWineD3DDeviceImpl_CreateVertexBuffer
,
...
...
@@ -6791,7 +6782,7 @@ static const IWineD3DDeviceVtbl IWineD3DDevice_Vtbl =
HRESULT
device_init
(
IWineD3DDeviceImpl
*
device
,
IWineD3DImpl
*
wined3d
,
UINT
adapter_idx
,
WINED3DDEVTYPE
device_type
,
HWND
focus_window
,
DWORD
flags
,
I
Unknown
*
parent
,
I
WineD3DDeviceParent
*
device_parent
)
IWineD3DDeviceParent
*
device_parent
)
{
struct
wined3d_adapter
*
adapter
=
&
wined3d
->
adapters
[
adapter_idx
];
const
struct
fragment_pipeline
*
fragment_pipeline
;
...
...
@@ -6806,7 +6797,6 @@ HRESULT device_init(IWineD3DDeviceImpl *device, IWineD3DImpl *wined3d,
device
->
wined3d
=
(
IWineD3D
*
)
wined3d
;
IWineD3D_AddRef
(
device
->
wined3d
);
device
->
adapter
=
wined3d
->
adapter_count
?
adapter
:
NULL
;
device
->
parent
=
parent
;
device
->
device_parent
=
device_parent
;
list_init
(
&
device
->
resources
);
list_init
(
&
device
->
shaders
);
...
...
dlls/wined3d/directx.c
View file @
2ef40090
...
...
@@ -4831,18 +4831,15 @@ static HRESULT WINAPI IWineD3DImpl_GetDeviceCaps(IWineD3D *iface, UINT Adapter,
return
WINED3D_OK
;
}
static
HRESULT
WINAPI
IWineD3DImpl_CreateDevice
(
IWineD3D
*
iface
,
UINT
adapter_idx
,
WINED3DDEVTYPE
device_type
,
HWND
focus_window
,
DWORD
flags
,
IUnknown
*
parent
,
IWineD3DDeviceParent
*
device_parent
,
IWineD3DDevice
**
device
)
static
HRESULT
WINAPI
IWineD3DImpl_CreateDevice
(
IWineD3D
*
iface
,
UINT
adapter_idx
,
WINED3DDEVTYPE
device_type
,
HWND
focus_window
,
DWORD
flags
,
IWineD3DDeviceParent
*
device_parent
,
IWineD3DDevice
**
device
)
{
IWineD3DImpl
*
This
=
(
IWineD3DImpl
*
)
iface
;
IWineD3DDeviceImpl
*
object
;
HRESULT
hr
;
TRACE
(
"iface %p, adapter_idx %u, device_type %#x, focus_window %p, flags %#x.
\n
"
"parent %p, device_parent %p, device %p.
\n
"
,
iface
,
adapter_idx
,
device_type
,
focus_window
,
flags
,
parent
,
device_parent
,
device
);
TRACE
(
"iface %p, adapter_idx %u, device_type %#x, focus_window %p, flags %#x, device_parent %p, device %p.
\n
"
,
iface
,
adapter_idx
,
device_type
,
focus_window
,
flags
,
device_parent
,
device
);
/* Validate the adapter number. If no adapters are available(no GL), ignore the adapter
* number and create a device without a 3D adapter for 2D only operation. */
...
...
@@ -4858,7 +4855,7 @@ static HRESULT WINAPI IWineD3DImpl_CreateDevice(IWineD3D *iface, UINT adapter_id
return
E_OUTOFMEMORY
;
}
hr
=
device_init
(
object
,
This
,
adapter_idx
,
device_type
,
focus_window
,
flags
,
parent
,
device_parent
);
hr
=
device_init
(
object
,
This
,
adapter_idx
,
device_type
,
focus_window
,
flags
,
device_parent
);
if
(
FAILED
(
hr
))
{
WARN
(
"Failed to initialize device, hr %#x.
\n
"
,
hr
);
...
...
dlls/wined3d/wined3d_private.h
View file @
2ef40090
...
...
@@ -1567,7 +1567,6 @@ struct IWineD3DDeviceImpl
LONG
ref
;
/* Note: Ref counting not required */
/* WineD3D Information */
IUnknown
*
parent
;
IWineD3DDeviceParent
*
device_parent
;
IWineD3D
*
wined3d
;
struct
wined3d_adapter
*
adapter
;
...
...
@@ -1702,7 +1701,7 @@ void device_context_remove(IWineD3DDeviceImpl *device, struct wined3d_context *c
void
device_get_draw_rect
(
IWineD3DDeviceImpl
*
device
,
RECT
*
rect
)
DECLSPEC_HIDDEN
;
HRESULT
device_init
(
IWineD3DDeviceImpl
*
device
,
IWineD3DImpl
*
wined3d
,
UINT
adapter_idx
,
WINED3DDEVTYPE
device_type
,
HWND
focus_window
,
DWORD
flags
,
I
Unknown
*
parent
,
I
WineD3DDeviceParent
*
device_parent
)
DECLSPEC_HIDDEN
;
IWineD3DDeviceParent
*
device_parent
)
DECLSPEC_HIDDEN
;
void
device_preload_textures
(
IWineD3DDeviceImpl
*
device
)
DECLSPEC_HIDDEN
;
LRESULT
device_process_message
(
IWineD3DDeviceImpl
*
device
,
HWND
window
,
UINT
message
,
WPARAM
wparam
,
LPARAM
lparam
,
WNDPROC
proc
)
DECLSPEC_HIDDEN
;
...
...
include/wine/wined3d.idl
View file @
2ef40090
...
...
@@ -2264,7 +2264,6 @@ interface IWineD3D : IWineD3DBase
[
in
]
WINED3DDEVTYPE
device_type
,
[
in
]
HWND
focus_window
,
[
in
]
DWORD
behaviour_flags
,
[
in
]
IUnknown
*
parent
,
[
in
]
IWineD3DDeviceParent
*
device_parent
,
[
out
]
IWineD3DDevice
**
device
)
;
...
...
@@ -2793,7 +2792,7 @@ interface IWineD3DPixelShader : IWineD3DBaseShader
local
,
uuid
(
6
d10a2ce
-
09
d0
-
4
a53
-
a427
-
11388
f9f8ca5
)
]
interface
IWineD3DDevice
:
I
WineD3DBase
interface
IWineD3DDevice
:
I
Unknown
{
HRESULT
CreateBuffer
(
[
in
]
struct
wined3d_buffer_desc
*
desc
,
...
...
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