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
36d4268e
Commit
36d4268e
authored
Feb 01, 2011
by
Henri Verbeet
Committed by
Alexandre Julliard
Feb 02, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Remove COM from IWineD3D.
parent
1fd7c96a
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
208 additions
and
259 deletions
+208
-259
d3d8_main.c
dlls/d3d8/d3d8_main.c
+1
-1
d3d8_private.h
dlls/d3d8/d3d8_private.h
+2
-4
device.c
dlls/d3d8/device.c
+7
-7
directx.c
dlls/d3d8/directx.c
+14
-14
d3d9_main.c
dlls/d3d9/d3d9_main.c
+1
-1
d3d9_private.h
dlls/d3d9/d3d9_private.h
+2
-3
device.c
dlls/d3d9/device.c
+13
-10
directx.c
dlls/d3d9/directx.c
+15
-15
ddraw.c
dlls/ddraw/ddraw.c
+18
-26
ddraw_private.h
dlls/ddraw/ddraw_private.h
+3
-2
device.c
dlls/ddraw/device.c
+10
-27
adapter.c
dlls/dxgi/adapter.c
+3
-3
device.c
dlls/dxgi/device.c
+4
-4
dxgi_private.h
dlls/dxgi/dxgi_private.h
+1
-1
factory.c
dlls/dxgi/factory.c
+6
-6
output.c
dlls/dxgi/output.c
+6
-6
device.c
dlls/wined3d/device.c
+32
-24
directx.c
dlls/wined3d/directx.c
+0
-0
swapchain.c
dlls/wined3d/swapchain.c
+1
-1
swapchain_base.c
dlls/wined3d/swapchain_base.c
+1
-1
wined3d.spec
dlls/wined3d/wined3d.spec
+20
-1
wined3d_main.c
dlls/wined3d/wined3d_main.c
+1
-1
wined3d_private.h
dlls/wined3d/wined3d_private.h
+6
-12
wined3d.idl
include/wine/wined3d.idl
+40
-88
winedxgi.idl
include/wine/winedxgi.idl
+1
-1
No files found.
dlls/d3d8/d3d8_main.c
View file @
36d4268e
...
...
@@ -45,7 +45,7 @@ IDirect3D8* WINAPI DECLSPEC_HOTPATCH Direct3DCreate8(UINT SDKVersion) {
object
->
IDirect3D8_iface
.
lpVtbl
=
&
Direct3D8_Vtbl
;
object
->
ref
=
1
;
object
->
WineD3D
=
WineDirect3DCreate
(
8
,
(
IUnknown
*
)
&
object
->
IDirect3D8_iface
);
object
->
WineD3D
=
wined3d_create
(
8
,
&
object
->
IDirect3D8_iface
);
TRACE
(
"Created Direct3D object @ %p, WineObj @ %p
\n
"
,
object
,
object
->
WineD3D
);
...
...
dlls/d3d8/d3d8_private.h
View file @
36d4268e
...
...
@@ -133,9 +133,7 @@ struct IDirect3D8Impl
{
IDirect3D8
IDirect3D8_iface
;
LONG
ref
;
/* The WineD3D device */
IWineD3D
*
WineD3D
;
struct
wined3d
*
WineD3D
;
};
/*****************************************************************************
...
...
@@ -191,7 +189,7 @@ struct IDirect3DDevice8Impl
BOOL
inDestruction
;
};
HRESULT
device_init
(
IDirect3DDevice8Impl
*
device
,
IWineD3D
*
wined3d
,
UINT
adapter
,
HRESULT
device_init
(
IDirect3DDevice8Impl
*
device
,
struct
wined3d
*
wined3d
,
UINT
adapter
,
D3DDEVTYPE
device_type
,
HWND
focus_window
,
DWORD
flags
,
D3DPRESENT_PARAMETERS
*
parameters
)
DECLSPEC_HIDDEN
;
/* ---------------- */
...
...
dlls/d3d8/device.c
View file @
36d4268e
...
...
@@ -382,7 +382,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_ResourceManagerDiscardBytes(IDirect3D
static
HRESULT
WINAPI
IDirect3DDevice8Impl_GetDirect3D
(
IDirect3DDevice8
*
iface
,
IDirect3D8
**
ppD3D8
)
{
IDirect3DDevice8Impl
*
This
=
impl_from_IDirect3DDevice8
(
iface
);
IWineD3D
*
pWineD3D
;
struct
wined3d
*
wined3d
;
HRESULT
hr
;
TRACE
(
"iface %p, d3d8 %p.
\n
"
,
iface
,
ppD3D8
);
...
...
@@ -392,12 +392,12 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetDirect3D(IDirect3DDevice8 *iface,
}
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_GetDirect3D
(
This
->
WineD3DDevice
,
&
pWineD3D
);
if
(
SUCCEEDED
(
hr
)
&&
pWineD3D
)
hr
=
IWineD3DDevice_GetDirect3D
(
This
->
WineD3DDevice
,
&
wined3d
);
if
(
SUCCEEDED
(
hr
)
&&
wined3d
)
{
*
ppD3D8
=
IWineD3D_GetParent
(
pWineD3D
);
*
ppD3D8
=
wined3d_get_parent
(
wined3d
);
IDirect3D8_AddRef
(
*
ppD3D8
);
IWineD3D_Release
(
pWineD3D
);
wined3d_decref
(
wined3d
);
}
else
{
...
...
@@ -2966,7 +2966,7 @@ static void setup_fpu(void)
#endif
}
HRESULT
device_init
(
IDirect3DDevice8Impl
*
device
,
IWineD3D
*
wined3d
,
UINT
adapter
,
HRESULT
device_init
(
IDirect3DDevice8Impl
*
device
,
struct
wined3d
*
wined3d
,
UINT
adapter
,
D3DDEVTYPE
device_type
,
HWND
focus_window
,
DWORD
flags
,
D3DPRESENT_PARAMETERS
*
parameters
)
{
WINED3DPRESENT_PARAMETERS
wined3d_parameters
;
...
...
@@ -2987,7 +2987,7 @@ HRESULT device_init(IDirect3DDevice8Impl *device, IWineD3D *wined3d, UINT adapte
if
(
!
(
flags
&
D3DCREATE_FPU_PRESERVE
))
setup_fpu
();
wined3d_mutex_lock
();
hr
=
IWineD3D_CreateDevic
e
(
wined3d
,
adapter
,
device_type
,
focus_window
,
flags
,
hr
=
wined3d_device_creat
e
(
wined3d
,
adapter
,
device_type
,
focus_window
,
flags
,
&
device
->
IWineD3DDeviceParent_iface
,
&
device
->
WineD3DDevice
);
if
(
FAILED
(
hr
))
{
...
...
dlls/d3d8/directx.c
View file @
36d4268e
...
...
@@ -81,7 +81,7 @@ static ULONG WINAPI IDirect3D8Impl_Release(LPDIRECT3D8 iface)
TRACE
(
"Releasing wined3d %p
\n
"
,
This
->
WineD3D
);
wined3d_mutex_lock
();
IWineD3D_Release
(
This
->
WineD3D
);
wined3d_decref
(
This
->
WineD3D
);
wined3d_mutex_unlock
();
HeapFree
(
GetProcessHeap
(),
0
,
This
);
...
...
@@ -99,7 +99,7 @@ static HRESULT WINAPI IDirect3D8Impl_RegisterSoftwareDevice(LPDIRECT3D8 iface,
TRACE
(
"iface %p, init_function %p.
\n
"
,
iface
,
pInitializeFunction
);
wined3d_mutex_lock
();
hr
=
IWineD3D_RegisterSoftwareD
evice
(
This
->
WineD3D
,
pInitializeFunction
);
hr
=
wined3d_register_software_d
evice
(
This
->
WineD3D
,
pInitializeFunction
);
wined3d_mutex_unlock
();
return
hr
;
...
...
@@ -113,7 +113,7 @@ static UINT WINAPI IDirect3D8Impl_GetAdapterCount(LPDIRECT3D8 iface)
TRACE
(
"iface %p.
\n
"
,
iface
);
wined3d_mutex_lock
();
hr
=
IWineD3D_GetAdapterC
ount
(
This
->
WineD3D
);
hr
=
wined3d_get_adapter_c
ount
(
This
->
WineD3D
);
wined3d_mutex_unlock
();
return
hr
;
...
...
@@ -137,7 +137,7 @@ static HRESULT WINAPI IDirect3D8Impl_GetAdapterIdentifier(LPDIRECT3D8 iface, UIN
adapter_id
.
device_name_size
=
0
;
/* d3d9 only */
wined3d_mutex_lock
();
hr
=
IWineD3D_GetAdapterI
dentifier
(
This
->
WineD3D
,
Adapter
,
Flags
,
&
adapter_id
);
hr
=
wined3d_get_adapter_i
dentifier
(
This
->
WineD3D
,
Adapter
,
Flags
,
&
adapter_id
);
wined3d_mutex_unlock
();
pIdentifier
->
DriverVersion
=
adapter_id
.
driver_version
;
...
...
@@ -159,7 +159,7 @@ static UINT WINAPI IDirect3D8Impl_GetAdapterModeCount(LPDIRECT3D8 iface,UINT Ada
TRACE
(
"iface %p, adapter %u.
\n
"
,
iface
,
Adapter
);
wined3d_mutex_lock
();
hr
=
IWineD3D_GetAdapterModeCount
(
This
->
WineD3D
,
Adapter
,
0
/* format */
);
hr
=
wined3d_get_adapter_mode_count
(
This
->
WineD3D
,
Adapter
,
0
);
wined3d_mutex_unlock
();
return
hr
;
...
...
@@ -175,7 +175,7 @@ static HRESULT WINAPI IDirect3D8Impl_EnumAdapterModes(LPDIRECT3D8 iface, UINT Ad
iface
,
Adapter
,
Mode
,
pMode
);
wined3d_mutex_lock
();
hr
=
IWineD3D_EnumAdapterModes
(
This
->
WineD3D
,
Adapter
,
WINED3DFMT_UNKNOWN
,
Mode
,
(
WINED3DDISPLAYMODE
*
)
pMode
);
hr
=
wined3d_enum_adapter_modes
(
This
->
WineD3D
,
Adapter
,
WINED3DFMT_UNKNOWN
,
Mode
,
(
WINED3DDISPLAYMODE
*
)
pMode
);
wined3d_mutex_unlock
();
if
(
SUCCEEDED
(
hr
))
pMode
->
Format
=
d3dformat_from_wined3dformat
(
pMode
->
Format
);
...
...
@@ -193,7 +193,7 @@ static HRESULT WINAPI IDirect3D8Impl_GetAdapterDisplayMode(LPDIRECT3D8 iface, UI
iface
,
Adapter
,
pMode
);
wined3d_mutex_lock
();
hr
=
IWineD3D_GetAdapterDisplayMode
(
This
->
WineD3D
,
Adapter
,
(
WINED3DDISPLAYMODE
*
)
pMode
);
hr
=
wined3d_get_adapter_display_mode
(
This
->
WineD3D
,
Adapter
,
(
WINED3DDISPLAYMODE
*
)
pMode
);
wined3d_mutex_unlock
();
if
(
SUCCEEDED
(
hr
))
pMode
->
Format
=
d3dformat_from_wined3dformat
(
pMode
->
Format
);
...
...
@@ -211,7 +211,7 @@ static HRESULT WINAPI IDirect3D8Impl_CheckDeviceType(LPDIRECT3D8 iface, UINT Ada
iface
,
Adapter
,
CheckType
,
DisplayFormat
,
BackBufferFormat
,
Windowed
);
wined3d_mutex_lock
();
hr
=
IWineD3D_CheckDeviceT
ype
(
This
->
WineD3D
,
Adapter
,
CheckType
,
wined3dformat_from_d3dformat
(
DisplayFormat
),
hr
=
wined3d_check_device_t
ype
(
This
->
WineD3D
,
Adapter
,
CheckType
,
wined3dformat_from_d3dformat
(
DisplayFormat
),
wined3dformat_from_d3dformat
(
BackBufferFormat
),
Windowed
);
wined3d_mutex_unlock
();
...
...
@@ -249,7 +249,7 @@ static HRESULT WINAPI IDirect3D8Impl_CheckDeviceFormat(LPDIRECT3D8 iface, UINT A
}
wined3d_mutex_lock
();
hr
=
IWineD3D_CheckDeviceF
ormat
(
This
->
WineD3D
,
Adapter
,
DeviceType
,
wined3dformat_from_d3dformat
(
AdapterFormat
),
hr
=
wined3d_check_device_f
ormat
(
This
->
WineD3D
,
Adapter
,
DeviceType
,
wined3dformat_from_d3dformat
(
AdapterFormat
),
Usage
,
WineD3DRType
,
wined3dformat_from_d3dformat
(
CheckFormat
),
SURFACE_OPENGL
);
wined3d_mutex_unlock
();
...
...
@@ -267,8 +267,8 @@ static HRESULT WINAPI IDirect3D8Impl_CheckDeviceMultiSampleType(IDirect3D8 *ifac
iface
,
Adapter
,
DeviceType
,
SurfaceFormat
,
Windowed
,
MultiSampleType
);
wined3d_mutex_lock
();
hr
=
IWineD3D_CheckDeviceMultiSampleT
ype
(
This
->
WineD3D
,
Adapter
,
DeviceType
,
wined3dformat_from_d3dformat
(
SurfaceFormat
),
Windowed
,
(
WINED3DMULTISAMPLE_TYPE
)
MultiSampleType
,
NULL
);
hr
=
wined3d_check_device_multisample_t
ype
(
This
->
WineD3D
,
Adapter
,
DeviceType
,
wined3dformat_from_d3dformat
(
SurfaceFormat
),
Windowed
,
(
WINED3DMULTISAMPLE_TYPE
)
MultiSampleType
,
NULL
);
wined3d_mutex_unlock
();
return
hr
;
...
...
@@ -285,7 +285,7 @@ static HRESULT WINAPI IDirect3D8Impl_CheckDepthStencilMatch(IDirect3D8 *iface, U
iface
,
Adapter
,
DeviceType
,
AdapterFormat
,
RenderTargetFormat
,
DepthStencilFormat
);
wined3d_mutex_lock
();
hr
=
IWineD3D_CheckDepthStencilM
atch
(
This
->
WineD3D
,
Adapter
,
DeviceType
,
hr
=
wined3d_check_depth_stencil_m
atch
(
This
->
WineD3D
,
Adapter
,
DeviceType
,
wined3dformat_from_d3dformat
(
AdapterFormat
),
wined3dformat_from_d3dformat
(
RenderTargetFormat
),
wined3dformat_from_d3dformat
(
DepthStencilFormat
));
wined3d_mutex_unlock
();
...
...
@@ -325,7 +325,7 @@ static HRESULT WINAPI IDirect3D8Impl_GetDeviceCaps(LPDIRECT3D8 iface, UINT Ada
}
wined3d_mutex_lock
();
hrc
=
IWineD3D_GetDeviceC
aps
(
This
->
WineD3D
,
Adapter
,
DeviceType
,
pWineCaps
);
hrc
=
wined3d_get_device_c
aps
(
This
->
WineD3D
,
Adapter
,
DeviceType
,
pWineCaps
);
wined3d_mutex_unlock
();
fixup_caps
(
pWineCaps
);
...
...
@@ -344,7 +344,7 @@ static HMONITOR WINAPI IDirect3D8Impl_GetAdapterMonitor(LPDIRECT3D8 iface, UINT
TRACE
(
"iface %p, adapter %u.
\n
"
,
iface
,
Adapter
);
wined3d_mutex_lock
();
ret
=
IWineD3D_GetAdapterM
onitor
(
This
->
WineD3D
,
Adapter
);
ret
=
wined3d_get_adapter_m
onitor
(
This
->
WineD3D
,
Adapter
);
wined3d_mutex_unlock
();
return
ret
;
...
...
dlls/d3d9/d3d9_main.c
View file @
36d4268e
...
...
@@ -40,7 +40,7 @@ IDirect3D9* WINAPI DECLSPEC_HOTPATCH Direct3DCreate9(UINT SDKVersion) {
object
->
ref
=
1
;
wined3d_mutex_lock
();
object
->
WineD3D
=
WineDirect3DCreate
(
9
,
(
IUnknown
*
)
object
);
object
->
WineD3D
=
wined3d_create
(
9
,
object
);
wined3d_mutex_unlock
();
TRACE
(
"SDKVersion = %x, Created Direct3D object @ %p, WineObj @ %p
\n
"
,
SDKVersion
,
object
,
object
->
WineD3D
);
...
...
dlls/d3d9/d3d9_private.h
View file @
36d4268e
...
...
@@ -149,8 +149,7 @@ typedef struct IDirect3D9Impl
const
IDirect3D9ExVtbl
*
lpVtbl
;
LONG
ref
;
/* The WineD3D device */
IWineD3D
*
WineD3D
;
struct
wined3d
*
WineD3D
;
/* Created via Direct3DCreate9Ex? Can QI extended interfaces */
BOOL
extended
;
...
...
@@ -180,7 +179,7 @@ typedef struct IDirect3DDevice9Impl
BOOL
notreset
;
}
IDirect3DDevice9Impl
;
HRESULT
device_init
(
IDirect3DDevice9Impl
*
device
,
IWineD3D
*
wined3d
,
UINT
adapter
,
D3DDEVTYPE
device_type
,
HRESULT
device_init
(
IDirect3DDevice9Impl
*
device
,
struct
wined3d
*
wined3d
,
UINT
adapter
,
D3DDEVTYPE
device_type
,
HWND
focus_window
,
DWORD
flags
,
D3DPRESENT_PARAMETERS
*
parameters
,
D3DDISPLAYMODEEX
*
mode
)
DECLSPEC_HIDDEN
;
/*****************************************************************************
...
...
dlls/d3d9/device.c
View file @
36d4268e
...
...
@@ -323,10 +323,11 @@ static HRESULT WINAPI IDirect3DDevice9Impl_EvictManagedResources(LPDIRECT3DDEV
return
hr
;
}
static
HRESULT
WINAPI
IDirect3DDevice9Impl_GetDirect3D
(
LPDIRECT3DDEVICE9EX
iface
,
IDirect3D9
**
ppD3D9
)
{
static
HRESULT
WINAPI
IDirect3DDevice9Impl_GetDirect3D
(
IDirect3DDevice9Ex
*
iface
,
IDirect3D9
**
ppD3D9
)
{
IDirect3DDevice9Impl
*
This
=
(
IDirect3DDevice9Impl
*
)
iface
;
struct
wined3d
*
wined3d
;
HRESULT
hr
=
D3D_OK
;
IWineD3D
*
pWineD3D
;
TRACE
(
"iface %p, d3d9 %p.
\n
"
,
iface
,
ppD3D9
);
...
...
@@ -335,13 +336,15 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetDirect3D(LPDIRECT3DDEVICE9EX iface
}
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_GetDirect3D
(
This
->
WineD3DDevice
,
&
pWineD3D
);
if
(
hr
==
D3D_OK
&&
pWineD3D
!=
NULL
)
hr
=
IWineD3DDevice_GetDirect3D
(
This
->
WineD3DDevice
,
&
wined3d
);
if
(
hr
==
D3D_OK
&&
wined3d
)
{
*
ppD3D9
=
IWineD3D_GetParent
(
pWineD3D
);
*
ppD3D9
=
wined3d_get_parent
(
wined3d
);
IDirect3D9_AddRef
(
*
ppD3D9
);
IWineD3D_Release
(
pWineD3D
);
}
else
{
wined3d_decref
(
wined3d
);
}
else
{
FIXME
(
"Call to IWineD3DDevice_GetDirect3D failed
\n
"
);
*
ppD3D9
=
NULL
;
}
...
...
@@ -3251,7 +3254,7 @@ static void setup_fpu(void)
#endif
}
HRESULT
device_init
(
IDirect3DDevice9Impl
*
device
,
IWineD3D
*
wined3d
,
UINT
adapter
,
D3DDEVTYPE
device_type
,
HRESULT
device_init
(
IDirect3DDevice9Impl
*
device
,
struct
wined3d
*
wined3d
,
UINT
adapter
,
D3DDEVTYPE
device_type
,
HWND
focus_window
,
DWORD
flags
,
D3DPRESENT_PARAMETERS
*
parameters
,
D3DDISPLAYMODEEX
*
mode
)
{
WINED3DPRESENT_PARAMETERS
*
wined3d_parameters
;
...
...
@@ -3268,7 +3271,7 @@ HRESULT device_init(IDirect3DDevice9Impl *device, IWineD3D *wined3d, UINT adapte
if
(
!
(
flags
&
D3DCREATE_FPU_PRESERVE
))
setup_fpu
();
wined3d_mutex_lock
();
hr
=
IWineD3D_CreateDevic
e
(
wined3d
,
adapter
,
device_type
,
focus_window
,
flags
,
hr
=
wined3d_device_creat
e
(
wined3d
,
adapter
,
device_type
,
focus_window
,
flags
,
(
IWineD3DDeviceParent
*
)
&
device
->
device_parent_vtbl
,
&
device
->
WineD3DDevice
);
if
(
FAILED
(
hr
))
{
...
...
@@ -3281,7 +3284,7 @@ HRESULT device_init(IDirect3DDevice9Impl *device, IWineD3D *wined3d, UINT adapte
{
WINED3DCAPS
caps
;
IWineD3D_GetDeviceC
aps
(
wined3d
,
adapter
,
device_type
,
&
caps
);
wined3d_get_device_c
aps
(
wined3d
,
adapter
,
device_type
,
&
caps
);
count
=
caps
.
NumberOfAdaptersInGroup
;
}
...
...
dlls/d3d9/directx.c
View file @
36d4268e
...
...
@@ -72,7 +72,7 @@ static ULONG WINAPI IDirect3D9Impl_Release(LPDIRECT3D9EX iface) {
if
(
ref
==
0
)
{
wined3d_mutex_lock
();
IWineD3D_Release
(
This
->
WineD3D
);
wined3d_decref
(
This
->
WineD3D
);
wined3d_mutex_unlock
();
HeapFree
(
GetProcessHeap
(),
0
,
This
);
...
...
@@ -89,7 +89,7 @@ static HRESULT WINAPI IDirect3D9Impl_RegisterSoftwareDevice(LPDIRECT3D9EX ifac
TRACE
(
"iface %p, init_function %p.
\n
"
,
iface
,
pInitializeFunction
);
wined3d_mutex_lock
();
hr
=
IWineD3D_RegisterSoftwareD
evice
(
This
->
WineD3D
,
pInitializeFunction
);
hr
=
wined3d_register_software_d
evice
(
This
->
WineD3D
,
pInitializeFunction
);
wined3d_mutex_unlock
();
return
hr
;
...
...
@@ -102,7 +102,7 @@ static UINT WINAPI IDirect3D9Impl_GetAdapterCount(LPDIRECT3D9EX iface) {
TRACE
(
"iface %p.
\n
"
,
iface
);
wined3d_mutex_lock
();
hr
=
IWineD3D_GetAdapterC
ount
(
This
->
WineD3D
);
hr
=
wined3d_get_adapter_c
ount
(
This
->
WineD3D
);
wined3d_mutex_unlock
();
return
hr
;
...
...
@@ -124,7 +124,7 @@ static HRESULT WINAPI IDirect3D9Impl_GetAdapterIdentifier(LPDIRECT3D9EX iface, U
adapter_id
.
device_name_size
=
sizeof
(
pIdentifier
->
DeviceName
);
wined3d_mutex_lock
();
hr
=
IWineD3D_GetAdapterI
dentifier
(
This
->
WineD3D
,
Adapter
,
Flags
,
&
adapter_id
);
hr
=
wined3d_get_adapter_i
dentifier
(
This
->
WineD3D
,
Adapter
,
Flags
,
&
adapter_id
);
wined3d_mutex_unlock
();
pIdentifier
->
DriverVersion
=
adapter_id
.
driver_version
;
...
...
@@ -150,7 +150,7 @@ static UINT WINAPI IDirect3D9Impl_GetAdapterModeCount(LPDIRECT3D9EX iface, UINT
}
wined3d_mutex_lock
();
hr
=
IWineD3D_GetAdapterModeC
ount
(
This
->
WineD3D
,
Adapter
,
wined3dformat_from_d3dformat
(
Format
));
hr
=
wined3d_get_adapter_mode_c
ount
(
This
->
WineD3D
,
Adapter
,
wined3dformat_from_d3dformat
(
Format
));
wined3d_mutex_unlock
();
return
hr
;
...
...
@@ -169,7 +169,7 @@ static HRESULT WINAPI IDirect3D9Impl_EnumAdapterModes(LPDIRECT3D9EX iface, UINT
return
D3DERR_INVALIDCALL
;
wined3d_mutex_lock
();
hr
=
IWineD3D_EnumAdapterM
odes
(
This
->
WineD3D
,
Adapter
,
wined3dformat_from_d3dformat
(
Format
),
hr
=
wined3d_enum_adapter_m
odes
(
This
->
WineD3D
,
Adapter
,
wined3dformat_from_d3dformat
(
Format
),
Mode
,
(
WINED3DDISPLAYMODE
*
)
pMode
);
wined3d_mutex_unlock
();
...
...
@@ -185,7 +185,7 @@ static HRESULT WINAPI IDirect3D9Impl_GetAdapterDisplayMode(LPDIRECT3D9EX iface,
TRACE
(
"iface %p, adapter %u, mode %p.
\n
"
,
iface
,
Adapter
,
pMode
);
wined3d_mutex_lock
();
hr
=
IWineD3D_GetAdapterDisplayMode
(
This
->
WineD3D
,
Adapter
,
(
WINED3DDISPLAYMODE
*
)
pMode
);
hr
=
wined3d_get_adapter_display_mode
(
This
->
WineD3D
,
Adapter
,
(
WINED3DDISPLAYMODE
*
)
pMode
);
wined3d_mutex_unlock
();
if
(
SUCCEEDED
(
hr
))
pMode
->
Format
=
d3dformat_from_wined3dformat
(
pMode
->
Format
);
...
...
@@ -203,7 +203,7 @@ static HRESULT WINAPI IDirect3D9Impl_CheckDeviceType(IDirect3D9Ex *iface, UINT A
iface
,
Adapter
,
CheckType
,
DisplayFormat
,
BackBufferFormat
,
Windowed
);
wined3d_mutex_lock
();
hr
=
IWineD3D_CheckDeviceT
ype
(
This
->
WineD3D
,
Adapter
,
CheckType
,
wined3dformat_from_d3dformat
(
DisplayFormat
),
hr
=
wined3d_check_device_t
ype
(
This
->
WineD3D
,
Adapter
,
CheckType
,
wined3dformat_from_d3dformat
(
DisplayFormat
),
wined3dformat_from_d3dformat
(
BackBufferFormat
),
Windowed
);
wined3d_mutex_unlock
();
...
...
@@ -244,7 +244,7 @@ static HRESULT WINAPI IDirect3D9Impl_CheckDeviceFormat(IDirect3D9Ex *iface, UINT
}
wined3d_mutex_lock
();
hr
=
IWineD3D_CheckDeviceF
ormat
(
This
->
WineD3D
,
Adapter
,
DeviceType
,
wined3dformat_from_d3dformat
(
AdapterFormat
),
hr
=
wined3d_check_device_f
ormat
(
This
->
WineD3D
,
Adapter
,
DeviceType
,
wined3dformat_from_d3dformat
(
AdapterFormat
),
Usage
,
WineD3DRType
,
wined3dformat_from_d3dformat
(
CheckFormat
),
SURFACE_OPENGL
);
wined3d_mutex_unlock
();
...
...
@@ -262,7 +262,7 @@ static HRESULT WINAPI IDirect3D9Impl_CheckDeviceMultiSampleType(IDirect3D9Ex *if
iface
,
Adapter
,
DeviceType
,
SurfaceFormat
,
Windowed
,
MultiSampleType
,
pQualityLevels
);
wined3d_mutex_lock
();
hr
=
IWineD3D_CheckDeviceMultiSampleT
ype
(
This
->
WineD3D
,
Adapter
,
DeviceType
,
hr
=
wined3d_check_device_multisample_t
ype
(
This
->
WineD3D
,
Adapter
,
DeviceType
,
wined3dformat_from_d3dformat
(
SurfaceFormat
),
Windowed
,
MultiSampleType
,
pQualityLevels
);
wined3d_mutex_unlock
();
...
...
@@ -279,7 +279,7 @@ static HRESULT WINAPI IDirect3D9Impl_CheckDepthStencilMatch(IDirect3D9Ex *iface,
iface
,
Adapter
,
DeviceType
,
AdapterFormat
,
RenderTargetFormat
,
DepthStencilFormat
);
wined3d_mutex_lock
();
hr
=
IWineD3D_CheckDepthStencilM
atch
(
This
->
WineD3D
,
Adapter
,
DeviceType
,
hr
=
wined3d_check_depth_stencil_m
atch
(
This
->
WineD3D
,
Adapter
,
DeviceType
,
wined3dformat_from_d3dformat
(
AdapterFormat
),
wined3dformat_from_d3dformat
(
RenderTargetFormat
),
wined3dformat_from_d3dformat
(
DepthStencilFormat
));
wined3d_mutex_unlock
();
...
...
@@ -295,7 +295,7 @@ static HRESULT WINAPI IDirect3D9Impl_CheckDeviceFormatConversion(LPDIRECT3D9EX i
iface
,
Adapter
,
DeviceType
,
SourceFormat
,
TargetFormat
);
wined3d_mutex_lock
();
hr
=
IWineD3D_CheckDeviceFormatC
onversion
(
This
->
WineD3D
,
Adapter
,
DeviceType
,
hr
=
wined3d_check_device_format_c
onversion
(
This
->
WineD3D
,
Adapter
,
DeviceType
,
wined3dformat_from_d3dformat
(
SourceFormat
),
wined3dformat_from_d3dformat
(
TargetFormat
));
wined3d_mutex_unlock
();
...
...
@@ -379,7 +379,7 @@ static HRESULT WINAPI IDirect3D9Impl_GetDeviceCaps(LPDIRECT3D9EX iface, UINT Ada
memset
(
pCaps
,
0
,
sizeof
(
*
pCaps
));
wined3d_mutex_lock
();
hrc
=
IWineD3D_GetDeviceC
aps
(
This
->
WineD3D
,
Adapter
,
DeviceType
,
pWineCaps
);
hrc
=
wined3d_get_device_c
aps
(
This
->
WineD3D
,
Adapter
,
DeviceType
,
pWineCaps
);
wined3d_mutex_unlock
();
WINECAPSTOD3D9CAPS
(
pCaps
,
pWineCaps
)
...
...
@@ -401,7 +401,7 @@ static HMONITOR WINAPI IDirect3D9Impl_GetAdapterMonitor(LPDIRECT3D9EX iface, UIN
TRACE
(
"iface %p, adapter %u.
\n
"
,
iface
,
Adapter
);
wined3d_mutex_lock
();
ret
=
IWineD3D_GetAdapterM
onitor
(
This
->
WineD3D
,
Adapter
);
ret
=
wined3d_get_adapter_m
onitor
(
This
->
WineD3D
,
Adapter
);
wined3d_mutex_unlock
();
return
ret
;
...
...
@@ -510,7 +510,7 @@ static HRESULT WINAPI IDirect3D9ExImpl_GetAdapterLUID(IDirect3D9Ex *iface, UINT
adapter_id
.
device_name_size
=
0
;
wined3d_mutex_lock
();
hr
=
IWineD3D_GetAdapterI
dentifier
(
This
->
WineD3D
,
adapter
,
0
,
&
adapter_id
);
hr
=
wined3d_get_adapter_i
dentifier
(
This
->
WineD3D
,
adapter
,
0
,
&
adapter_id
);
wined3d_mutex_unlock
();
memcpy
(
luid
,
&
adapter_id
.
adapter_luid
,
sizeof
(
*
luid
));
...
...
dlls/ddraw/ddraw.c
View file @
36d4268e
...
...
@@ -454,7 +454,7 @@ static void ddraw_destroy(IDirectDrawImpl *This)
/* Release the attached WineD3D stuff */
IWineD3DDevice_Release
(
This
->
wineD3DDevice
);
IWineD3D_Release
(
This
->
wineD3D
);
wined3d_decref
(
This
->
wineD3D
);
/* Now free the object */
HeapFree
(
GetProcessHeap
(),
0
,
This
);
...
...
@@ -714,7 +714,7 @@ static HRESULT WINAPI ddraw7_SetCooperativeLevel(IDirectDraw7 *iface, HWND hwnd,
{
WINED3DDISPLAYMODE
display_mode
;
IWineD3D_GetAdapterDisplayM
ode
(
This
->
wineD3D
,
WINED3DADAPTER_DEFAULT
,
&
display_mode
);
wined3d_get_adapter_display_m
ode
(
This
->
wineD3D
,
WINED3DADAPTER_DEFAULT
,
&
display_mode
);
IWineD3DDevice_SetupFullscreenWindow
(
This
->
wineD3DDevice
,
hwnd
,
display_mode
.
Width
,
display_mode
.
Height
);
}
}
...
...
@@ -1364,20 +1364,15 @@ static HRESULT WINAPI ddraw7_GetFourCCCodes(IDirectDraw7 *iface, DWORD *NumCodes
if
(
type
==
SURFACE_UNKNOWN
)
type
=
SURFACE_GDI
;
for
(
i
=
0
;
i
<
(
sizeof
(
formats
)
/
sizeof
(
formats
[
0
]));
i
++
)
{
hr
=
IWineD3D_CheckDeviceFormat
(
This
->
wineD3D
,
WINED3DADAPTER_DEFAULT
,
WINED3DDEVTYPE_HAL
,
d3ddm
.
Format
/* AdapterFormat */
,
0
/* usage */
,
WINED3DRTYPE_SURFACE
,
formats
[
i
],
type
);
if
(
SUCCEEDED
(
hr
))
{
if
(
count
<
outsize
)
{
for
(
i
=
0
;
i
<
(
sizeof
(
formats
)
/
sizeof
(
formats
[
0
]));
++
i
)
{
hr
=
wined3d_check_device_format
(
This
->
wineD3D
,
WINED3DADAPTER_DEFAULT
,
WINED3DDEVTYPE_HAL
,
d3ddm
.
Format
,
0
,
WINED3DRTYPE_SURFACE
,
formats
[
i
],
type
);
if
(
SUCCEEDED
(
hr
))
{
if
(
count
<
outsize
)
Codes
[
count
]
=
formats
[
i
];
}
count
++
;
++
count
;
}
}
if
(
NumCodes
)
{
...
...
@@ -2145,11 +2140,8 @@ static HRESULT WINAPI ddraw7_EnumDisplayModes(IDirectDraw7 *iface, DWORD Flags,
}
modenum
=
0
;
while
(
IWineD3D_EnumAdapterModes
(
This
->
wineD3D
,
WINED3DADAPTER_DEFAULT
,
checkFormatList
[
fmt
],
modenum
++
,
&
mode
)
==
WINED3D_OK
)
while
(
wined3d_enum_adapter_modes
(
This
->
wineD3D
,
WINED3DADAPTER_DEFAULT
,
checkFormatList
[
fmt
],
modenum
++
,
&
mode
)
==
WINED3D_OK
)
{
if
(
DDSD
)
{
...
...
@@ -5027,7 +5019,7 @@ static HRESULT WINAPI d3d7_EnumZBufferFormats(IDirect3D7 *iface, REFCLSID device
for
(
i
=
0
;
i
<
(
sizeof
(
formats
)
/
sizeof
(
*
formats
));
++
i
)
{
hr
=
IWineD3D_CheckDeviceF
ormat
(
This
->
wineD3D
,
WINED3DADAPTER_DEFAULT
,
type
,
d3ddm
.
Format
,
hr
=
wined3d_check_device_f
ormat
(
This
->
wineD3D
,
WINED3DADAPTER_DEFAULT
,
type
,
d3ddm
.
Format
,
WINED3DUSAGE_DEPTHSTENCIL
,
WINED3DRTYPE_SURFACE
,
formats
[
i
],
SURFACE_OPENGL
);
if
(
SUCCEEDED
(
hr
))
{
...
...
@@ -5111,7 +5103,7 @@ static HRESULT WINAPI d3d3_EvictManagedTextures(IDirect3D3 *iface)
* D3D_OK on success, or the return value of IWineD3D::GetCaps
*
*****************************************************************************/
HRESULT
IDirect3DImpl_GetCaps
(
IWineD3D
*
wined3d
,
D3DDEVICEDESC
*
desc1
,
D3DDEVICEDESC7
*
desc7
)
HRESULT
IDirect3DImpl_GetCaps
(
const
struct
wined3d
*
wined3d
,
D3DDEVICEDESC
*
desc1
,
D3DDEVICEDESC7
*
desc7
)
{
WINED3DCAPS
wined3d_caps
;
HRESULT
hr
;
...
...
@@ -5121,7 +5113,7 @@ HRESULT IDirect3DImpl_GetCaps(IWineD3D *wined3d, D3DDEVICEDESC *desc1, D3DDEVICE
memset
(
&
wined3d_caps
,
0
,
sizeof
(
wined3d_caps
));
EnterCriticalSection
(
&
ddraw_cs
);
hr
=
IWineD3D_GetDeviceC
aps
(
wined3d
,
0
,
WINED3DDEVTYPE_HAL
,
&
wined3d_caps
);
hr
=
wined3d_get_device_c
aps
(
wined3d
,
0
,
WINED3DDEVTYPE_HAL
,
&
wined3d_caps
);
LeaveCriticalSection
(
&
ddraw_cs
);
if
(
FAILED
(
hr
))
{
...
...
@@ -6010,19 +6002,19 @@ HRESULT ddraw_init(IDirectDrawImpl *ddraw, WINED3DDEVTYPE device_type)
ddraw
->
orig_width
=
GetSystemMetrics
(
SM_CXSCREEN
);
ddraw
->
orig_height
=
GetSystemMetrics
(
SM_CYSCREEN
);
ddraw
->
wineD3D
=
WineDirect3DC
reate
(
7
,
&
ddraw
->
IDirectDraw7_iface
);
ddraw
->
wineD3D
=
wined3d_c
reate
(
7
,
&
ddraw
->
IDirectDraw7_iface
);
if
(
!
ddraw
->
wineD3D
)
{
WARN
(
"Failed to create a wined3d object.
\n
"
);
return
E_OUTOFMEMORY
;
}
hr
=
IWineD3D_CreateDevic
e
(
ddraw
->
wineD3D
,
WINED3DADAPTER_DEFAULT
,
device_type
,
NULL
,
0
,
hr
=
wined3d_device_creat
e
(
ddraw
->
wineD3D
,
WINED3DADAPTER_DEFAULT
,
device_type
,
NULL
,
0
,
(
IWineD3DDeviceParent
*
)
&
ddraw
->
device_parent_vtbl
,
&
ddraw
->
wineD3DDevice
);
if
(
FAILED
(
hr
))
{
WARN
(
"Failed to create a wined3d device, hr %#x.
\n
"
,
hr
);
IWineD3D_Release
(
ddraw
->
wineD3D
);
wined3d_decref
(
ddraw
->
wineD3D
);
return
hr
;
}
...
...
dlls/ddraw/ddraw_private.h
View file @
36d4268e
...
...
@@ -111,7 +111,7 @@ struct IDirectDrawImpl
LONG
ref7
,
ref4
,
ref2
,
ref3
,
ref1
,
numIfaces
;
/* WineD3D linkage */
IWineD3D
*
wineD3D
;
struct
wined3d
*
wineD3D
;
IWineD3DDevice
*
wineD3DDevice
;
BOOL
d3d_initialized
;
...
...
@@ -368,7 +368,8 @@ HRESULT d3d_device_init(IDirect3DDeviceImpl *device, IDirectDrawImpl *ddraw,
extern
const
GUID
IID_D3DDEVICE_WineD3D
DECLSPEC_HIDDEN
;
/* Helper functions */
HRESULT
IDirect3DImpl_GetCaps
(
IWineD3D
*
WineD3D
,
D3DDEVICEDESC
*
Desc123
,
D3DDEVICEDESC7
*
Desc7
)
DECLSPEC_HIDDEN
;
HRESULT
IDirect3DImpl_GetCaps
(
const
struct
wined3d
*
wined3d
,
D3DDEVICEDESC
*
Desc123
,
D3DDEVICEDESC7
*
Desc7
)
DECLSPEC_HIDDEN
;
WINED3DZBUFFERTYPE
IDirect3DDeviceImpl_UpdateDepthStencil
(
IDirect3DDeviceImpl
*
This
)
DECLSPEC_HIDDEN
;
static
inline
IDirect3DDeviceImpl
*
device_from_device1
(
IDirect3DDevice
*
iface
)
...
...
dlls/ddraw/device.c
View file @
36d4268e
...
...
@@ -1114,15 +1114,9 @@ IDirect3DDeviceImpl_7_EnumTextureFormats(IDirect3DDevice7 *iface,
for
(
i
=
0
;
i
<
sizeof
(
FormatList
)
/
sizeof
(
*
FormatList
);
++
i
)
{
hr
=
IWineD3D_CheckDeviceFormat
(
This
->
ddraw
->
wineD3D
,
WINED3DADAPTER_DEFAULT
,
WINED3DDEVTYPE_HAL
,
mode
.
Format
,
0
/* Usage */
,
WINED3DRTYPE_TEXTURE
,
FormatList
[
i
],
SURFACE_OPENGL
);
if
(
hr
==
D3D_OK
)
hr
=
wined3d_check_device_format
(
This
->
ddraw
->
wineD3D
,
WINED3DADAPTER_DEFAULT
,
WINED3DDEVTYPE_HAL
,
mode
.
Format
,
0
,
WINED3DRTYPE_TEXTURE
,
FormatList
[
i
],
SURFACE_OPENGL
);
if
(
hr
==
D3D_OK
)
{
DDPIXELFORMAT
pformat
;
...
...
@@ -1143,15 +1137,10 @@ IDirect3DDeviceImpl_7_EnumTextureFormats(IDirect3DDevice7 *iface,
for
(
i
=
0
;
i
<
sizeof
(
BumpFormatList
)
/
sizeof
(
*
BumpFormatList
);
++
i
)
{
hr
=
IWineD3D_CheckDeviceFormat
(
This
->
ddraw
->
wineD3D
,
WINED3DADAPTER_DEFAULT
,
WINED3DDEVTYPE_HAL
,
mode
.
Format
,
WINED3DUSAGE_QUERY_LEGACYBUMPMAP
,
WINED3DRTYPE_TEXTURE
,
BumpFormatList
[
i
],
SURFACE_OPENGL
);
if
(
hr
==
D3D_OK
)
hr
=
wined3d_check_device_format
(
This
->
ddraw
->
wineD3D
,
WINED3DADAPTER_DEFAULT
,
WINED3DDEVTYPE_HAL
,
mode
.
Format
,
WINED3DUSAGE_QUERY_LEGACYBUMPMAP
,
WINED3DRTYPE_TEXTURE
,
BumpFormatList
[
i
],
SURFACE_OPENGL
);
if
(
hr
==
D3D_OK
)
{
DDPIXELFORMAT
pformat
;
...
...
@@ -1264,15 +1253,9 @@ IDirect3DDeviceImpl_2_EnumTextureFormats(IDirect3DDevice2 *iface,
for
(
i
=
0
;
i
<
sizeof
(
FormatList
)
/
sizeof
(
*
FormatList
);
++
i
)
{
hr
=
IWineD3D_CheckDeviceFormat
(
This
->
ddraw
->
wineD3D
,
0
/* Adapter */
,
WINED3DDEVTYPE_HAL
,
mode
.
Format
,
0
/* Usage */
,
WINED3DRTYPE_TEXTURE
,
FormatList
[
i
],
SURFACE_OPENGL
);
if
(
hr
==
D3D_OK
)
hr
=
wined3d_check_device_format
(
This
->
ddraw
->
wineD3D
,
0
,
WINED3DDEVTYPE_HAL
,
mode
.
Format
,
0
,
WINED3DRTYPE_TEXTURE
,
FormatList
[
i
],
SURFACE_OPENGL
);
if
(
hr
==
D3D_OK
)
{
DDSURFACEDESC
sdesc
;
...
...
dlls/dxgi/adapter.c
View file @
36d4268e
...
...
@@ -135,7 +135,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_adapter_GetDesc(IWineDXGIAdapter *iface, D
struct
dxgi_adapter
*
This
=
(
struct
dxgi_adapter
*
)
iface
;
WINED3DADAPTER_IDENTIFIER
adapter_id
;
char
description
[
128
];
IWineD3D
*
wined3d
;
struct
wined3d
*
wined3d
;
HRESULT
hr
;
TRACE
(
"iface %p, desc %p.
\n
"
,
iface
,
desc
);
...
...
@@ -149,8 +149,8 @@ static HRESULT STDMETHODCALLTYPE dxgi_adapter_GetDesc(IWineDXGIAdapter *iface, D
adapter_id
.
device_name_size
=
0
;
EnterCriticalSection
(
&
dxgi_cs
);
hr
=
IWineD3D_GetAdapterI
dentifier
(
wined3d
,
This
->
ordinal
,
0
,
&
adapter_id
);
IWineD3D_Release
(
wined3d
);
hr
=
wined3d_get_adapter_i
dentifier
(
wined3d
,
This
->
ordinal
,
0
,
&
adapter_id
);
wined3d_decref
(
wined3d
);
LeaveCriticalSection
(
&
dxgi_cs
);
if
(
SUCCEEDED
(
hr
))
...
...
dlls/dxgi/device.c
View file @
36d4268e
...
...
@@ -340,7 +340,7 @@ HRESULT dxgi_device_init(struct dxgi_device *device, struct dxgi_device_layer *l
IWineD3DDeviceParent
*
wined3d_device_parent
;
IWineDXGIAdapter
*
wine_adapter
;
UINT
adapter_ordinal
;
IWineD3D
*
wined3d
;
struct
wined3d
*
wined3d
;
void
*
layer_base
;
HRESULT
hr
;
...
...
@@ -370,7 +370,7 @@ HRESULT dxgi_device_init(struct dxgi_device *device, struct dxgi_device_layer *l
{
WARN
(
"This is not the adapter we're looking for, returning %#x.
\n
"
,
hr
);
EnterCriticalSection
(
&
dxgi_cs
);
IWineD3D_Release
(
wined3d
);
wined3d_decref
(
wined3d
);
LeaveCriticalSection
(
&
dxgi_cs
);
goto
fail
;
}
...
...
@@ -386,10 +386,10 @@ HRESULT dxgi_device_init(struct dxgi_device *device, struct dxgi_device_layer *l
FIXME
(
"Ignoring adapter type.
\n
"
);
EnterCriticalSection
(
&
dxgi_cs
);
hr
=
IWineD3D_CreateDevic
e
(
wined3d
,
adapter_ordinal
,
WINED3DDEVTYPE_HAL
,
NULL
,
0
,
hr
=
wined3d_device_creat
e
(
wined3d
,
adapter_ordinal
,
WINED3DDEVTYPE_HAL
,
NULL
,
0
,
wined3d_device_parent
,
&
device
->
wined3d_device
);
IWineD3DDeviceParent_Release
(
wined3d_device_parent
);
IWineD3D_Release
(
wined3d
);
wined3d_decref
(
wined3d
);
LeaveCriticalSection
(
&
dxgi_cs
);
if
(
FAILED
(
hr
))
{
...
...
dlls/dxgi/dxgi_private.h
View file @
36d4268e
...
...
@@ -79,7 +79,7 @@ struct dxgi_factory
{
const
struct
IWineDXGIFactoryVtbl
*
vtbl
;
LONG
refcount
;
IWineD3D
*
wined3d
;
struct
wined3d
*
wined3d
;
UINT
adapter_count
;
IDXGIAdapter
**
adapters
;
};
...
...
dlls/dxgi/factory.c
View file @
36d4268e
...
...
@@ -74,7 +74,7 @@ static ULONG STDMETHODCALLTYPE dxgi_factory_Release(IWineDXGIFactory *iface)
HeapFree
(
GetProcessHeap
(),
0
,
This
->
adapters
);
EnterCriticalSection
(
&
dxgi_cs
);
IWineD3D_Release
(
This
->
wined3d
);
wined3d_decref
(
This
->
wined3d
);
LeaveCriticalSection
(
&
dxgi_cs
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
...
...
@@ -256,14 +256,14 @@ static HRESULT STDMETHODCALLTYPE dxgi_factory_CreateSoftwareAdapter(IWineDXGIFac
/* IWineDXGIFactory methods */
static
IWineD3D
*
STDMETHODCALLTYPE
dxgi_factory_get_wined3d
(
IWineDXGIFactory
*
iface
)
static
struct
wined3d
*
STDMETHODCALLTYPE
dxgi_factory_get_wined3d
(
IWineDXGIFactory
*
iface
)
{
struct
dxgi_factory
*
This
=
(
struct
dxgi_factory
*
)
iface
;
TRACE
(
"iface %p
\n
"
,
iface
);
EnterCriticalSection
(
&
dxgi_cs
);
IWineD3D_AddR
ef
(
This
->
wined3d
);
wined3d_incr
ef
(
This
->
wined3d
);
LeaveCriticalSection
(
&
dxgi_cs
);
return
This
->
wined3d
;
}
...
...
@@ -298,14 +298,14 @@ HRESULT dxgi_factory_init(struct dxgi_factory *factory)
factory
->
refcount
=
1
;
EnterCriticalSection
(
&
dxgi_cs
);
factory
->
wined3d
=
WineDirect3DCreate
(
10
,
(
IUnknown
*
)
factory
);
factory
->
wined3d
=
wined3d_create
(
10
,
factory
);
if
(
!
factory
->
wined3d
)
{
LeaveCriticalSection
(
&
dxgi_cs
);
return
DXGI_ERROR_UNSUPPORTED
;
}
factory
->
adapter_count
=
IWineD3D_GetAdapterC
ount
(
factory
->
wined3d
);
factory
->
adapter_count
=
wined3d_get_adapter_c
ount
(
factory
->
wined3d
);
LeaveCriticalSection
(
&
dxgi_cs
);
factory
->
adapters
=
HeapAlloc
(
GetProcessHeap
(),
0
,
factory
->
adapter_count
*
sizeof
(
*
factory
->
adapters
));
if
(
!
factory
->
adapters
)
...
...
@@ -355,7 +355,7 @@ HRESULT dxgi_factory_init(struct dxgi_factory *factory)
fail:
HeapFree
(
GetProcessHeap
(),
0
,
factory
->
adapters
);
EnterCriticalSection
(
&
dxgi_cs
);
IWineD3D_Release
(
factory
->
wined3d
);
wined3d_decref
(
factory
->
wined3d
);
LeaveCriticalSection
(
&
dxgi_cs
);
return
hr
;
}
dlls/dxgi/output.c
View file @
36d4268e
...
...
@@ -119,7 +119,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_output_GetDisplayModeList(IDXGIOutput *ifa
{
struct
dxgi_output
*
This
=
(
struct
dxgi_output
*
)
iface
;
enum
wined3d_format_id
wined3d_format
;
IWineD3D
*
wined3d
;
struct
wined3d
*
wined3d
;
UINT
i
;
TRACE
(
"iface %p, format %s, flags %#x, mode_count %p, desc %p.
\n
"
,
...
...
@@ -131,8 +131,8 @@ static HRESULT STDMETHODCALLTYPE dxgi_output_GetDisplayModeList(IDXGIOutput *ifa
if
(
!
desc
)
{
EnterCriticalSection
(
&
dxgi_cs
);
*
mode_count
=
IWineD3D_GetAdapterModeC
ount
(
wined3d
,
This
->
adapter
->
ordinal
,
wined3d_format
);
IWineD3D_Release
(
wined3d
);
*
mode_count
=
wined3d_get_adapter_mode_c
ount
(
wined3d
,
This
->
adapter
->
ordinal
,
wined3d_format
);
wined3d_decref
(
wined3d
);
LeaveCriticalSection
(
&
dxgi_cs
);
return
S_OK
;
...
...
@@ -144,11 +144,11 @@ static HRESULT STDMETHODCALLTYPE dxgi_output_GetDisplayModeList(IDXGIOutput *ifa
WINED3DDISPLAYMODE
mode
;
HRESULT
hr
;
hr
=
IWineD3D_EnumAdapterM
odes
(
wined3d
,
This
->
adapter
->
ordinal
,
wined3d_format
,
i
,
&
mode
);
hr
=
wined3d_enum_adapter_m
odes
(
wined3d
,
This
->
adapter
->
ordinal
,
wined3d_format
,
i
,
&
mode
);
if
(
FAILED
(
hr
))
{
WARN
(
"EnumAdapterModes failed, hr %#x.
\n
"
,
hr
);
IWineD3D_Release
(
wined3d
);
wined3d_decref
(
wined3d
);
LeaveCriticalSection
(
&
dxgi_cs
);
return
hr
;
}
...
...
@@ -161,7 +161,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_output_GetDisplayModeList(IDXGIOutput *ifa
desc
[
i
].
ScanlineOrdering
=
DXGI_MODE_SCANLINE_ORDER_UNSPECIFIED
;
/* FIXME */
desc
[
i
].
Scaling
=
DXGI_MODE_SCALING_UNSPECIFIED
;
/* FIXME */
}
IWineD3D_Release
(
wined3d
);
wined3d_decref
(
wined3d
);
LeaveCriticalSection
(
&
dxgi_cs
);
return
S_OK
;
...
...
dlls/wined3d/device.c
View file @
36d4268e
...
...
@@ -882,7 +882,7 @@ static ULONG WINAPI IWineD3DDeviceImpl_Release(IWineD3DDevice *iface) {
if
(
This
->
hardwareCursor
)
DestroyCursor
(
This
->
hardwareCursor
);
This
->
haveHardwareCursor
=
FALSE
;
IWineD3D_Release
(
This
->
wined3d
);
wined3d_decref
(
This
->
wined3d
);
This
->
wined3d
=
NULL
;
HeapFree
(
GetProcessHeap
(),
0
,
This
);
TRACE
(
"Freed device %p
\n
"
,
This
);
...
...
@@ -2359,12 +2359,18 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetDisplayMode(IWineD3DDevice *iface, U
return
WINED3D_OK
;
}
static
HRESULT
WINAPI
IWineD3DDeviceImpl_GetDirect3D
(
IWineD3DDevice
*
iface
,
IWineD3D
**
ppD3D
)
{
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
*
ppD3D
=
This
->
wined3d
;
TRACE
(
"Returning %p.
\n
"
,
*
ppD3D
);
IWineD3D_AddRef
(
*
ppD3D
);
return
WINED3D_OK
;
static
HRESULT
WINAPI
IWineD3DDeviceImpl_GetDirect3D
(
IWineD3DDevice
*
iface
,
struct
wined3d
**
wined3d
)
{
IWineD3DDeviceImpl
*
device
=
(
IWineD3DDeviceImpl
*
)
iface
;
TRACE
(
"iface %p, wined3d %p.
\n
"
,
iface
,
wined3d
);
*
wined3d
=
device
->
wined3d
;
wined3d_incref
(
*
wined3d
);
TRACE
(
"Returning %p.
\n
"
,
*
wined3d
);
return
WINED3D_OK
;
}
static
UINT
WINAPI
IWineD3DDeviceImpl_GetAvailableTextureMem
(
IWineD3DDevice
*
iface
)
{
...
...
@@ -4596,10 +4602,13 @@ static HRESULT WINAPI IWineD3DDeviceImpl_GetBackBuffer(IWineD3DDevice *iface, UI
return
WINED3D_OK
;
}
static
HRESULT
WINAPI
IWineD3DDeviceImpl_GetDeviceCaps
(
IWineD3DDevice
*
iface
,
WINED3DCAPS
*
pCaps
)
{
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
WARN
(
"(%p) : stub, calling idirect3d for now
\n
"
,
This
);
return
IWineD3D_GetDeviceCaps
(
This
->
wined3d
,
This
->
adapter
->
ordinal
,
This
->
devType
,
pCaps
);
static
HRESULT
WINAPI
IWineD3DDeviceImpl_GetDeviceCaps
(
IWineD3DDevice
*
iface
,
WINED3DCAPS
*
caps
)
{
IWineD3DDeviceImpl
*
device
=
(
IWineD3DDeviceImpl
*
)
iface
;
TRACE
(
"iface %p, caps %p.
\n
"
,
iface
,
caps
);
return
wined3d_get_device_caps
(
device
->
wined3d
,
device
->
adapter
->
ordinal
,
device
->
devType
,
caps
);
}
static
HRESULT
WINAPI
IWineD3DDeviceImpl_GetDisplayMode
(
IWineD3DDevice
*
iface
,
UINT
iSwapChain
,
WINED3DDISPLAYMODE
*
pMode
)
{
...
...
@@ -6180,17 +6189,16 @@ static BOOL is_display_mode_supported(IWineD3DDeviceImpl *This, const WINED3DPRE
if
(
!
pp
->
BackBufferWidth
)
return
TRUE
;
if
(
!
pp
->
BackBufferHeight
)
return
TRUE
;
count
=
IWineD3D_GetAdapterModeCount
(
This
->
wined3d
,
This
->
adapter
->
ordinal
,
WINED3DFMT_UNKNOWN
);
for
(
i
=
0
;
i
<
count
;
i
++
)
{
count
=
wined3d_get_adapter_mode_count
(
This
->
wined3d
,
This
->
adapter
->
ordinal
,
WINED3DFMT_UNKNOWN
);
for
(
i
=
0
;
i
<
count
;
++
i
)
{
memset
(
&
m
,
0
,
sizeof
(
m
));
hr
=
IWineD3D_EnumAdapterModes
(
This
->
wined3d
,
This
->
adapter
->
ordinal
,
WINED3DFMT_UNKNOWN
,
i
,
&
m
);
if
(
FAILED
(
hr
))
{
ERR
(
"EnumAdapterModes failed
\n
"
);
}
if
(
m
.
Width
==
pp
->
BackBufferWidth
&&
m
.
Height
==
pp
->
BackBufferHeight
)
{
/* Mode found, it is supported */
hr
=
wined3d_enum_adapter_modes
(
This
->
wined3d
,
This
->
adapter
->
ordinal
,
WINED3DFMT_UNKNOWN
,
i
,
&
m
);
if
(
FAILED
(
hr
))
ERR
(
"Failed to enumerate adapter mode.
\n
"
);
if
(
m
.
Width
==
pp
->
BackBufferWidth
&&
m
.
Height
==
pp
->
BackBufferHeight
)
/* Mode found, it is supported. */
return
TRUE
;
}
}
/* Mode not found -> not supported */
return
FALSE
;
...
...
@@ -6935,7 +6943,7 @@ HRESULT device_init(IWineD3DDeviceImpl *device, IWineD3DImpl *wined3d,
device
->
lpVtbl
=
&
IWineD3DDevice_Vtbl
;
device
->
ref
=
1
;
device
->
wined3d
=
(
IWineD3D
*
)
wined3d
;
IWineD3D_AddR
ef
(
device
->
wined3d
);
wined3d_incr
ef
(
device
->
wined3d
);
device
->
adapter
=
wined3d
->
adapter_count
?
adapter
:
NULL
;
device
->
device_parent
=
device_parent
;
list_init
(
&
device
->
resources
);
...
...
@@ -6944,11 +6952,11 @@ HRESULT device_init(IWineD3DDeviceImpl *device, IWineD3DImpl *wined3d,
device
->
surface_alignment
=
wined3d
->
dxVersion
==
7
?
DDRAW_PITCH_ALIGNMENT
:
D3D8_PITCH_ALIGNMENT
;
/* Get the initial screen setup for ddraw. */
hr
=
IWineD3D_GetAdapterDisplayMode
((
IWineD3D
*
)
wined3d
,
adapter_idx
,
&
mode
);
hr
=
wined3d_get_adapter_display_mode
(
wined3d
,
adapter_idx
,
&
mode
);
if
(
FAILED
(
hr
))
{
ERR
(
"Failed to get the adapter's display mode, hr %#x.
\n
"
,
hr
);
IWineD3D_Release
(
device
->
wined3d
);
wined3d_decref
(
device
->
wined3d
);
return
hr
;
}
device
->
ddraw_width
=
mode
.
Width
;
...
...
@@ -6986,7 +6994,7 @@ HRESULT device_init(IWineD3DDeviceImpl *device, IWineD3DImpl *wined3d,
if
(
FAILED
(
hr
))
{
ERR
(
"Failed to compile state table, hr %#x.
\n
"
,
hr
);
IWineD3D_Release
(
device
->
wined3d
);
wined3d_decref
(
device
->
wined3d
);
return
hr
;
}
}
...
...
dlls/wined3d/directx.c
View file @
36d4268e
This diff is collapsed.
Click to expand it.
dlls/wined3d/swapchain.c
View file @
36d4268e
...
...
@@ -540,7 +540,7 @@ HRESULT swapchain_init(IWineD3DSwapChainImpl *swapchain, WINED3DSURFTYPE surface
swapchain
->
win_handle
=
window
;
swapchain
->
device_window
=
window
;
IWineD3D_GetAdapterDisplayM
ode
(
device
->
wined3d
,
adapter
->
ordinal
,
&
mode
);
wined3d_get_adapter_display_m
ode
(
device
->
wined3d
,
adapter
->
ordinal
,
&
mode
);
swapchain
->
orig_width
=
mode
.
Width
;
swapchain
->
orig_height
=
mode
.
Height
;
swapchain
->
orig_fmt
=
mode
.
Format
;
...
...
dlls/wined3d/swapchain_base.c
View file @
36d4268e
...
...
@@ -142,7 +142,7 @@ HRESULT WINAPI IWineD3DBaseSwapChainImpl_GetDisplayMode(IWineD3DSwapChain *iface
HRESULT
hr
;
TRACE
(
"(%p)->(%p): Calling GetAdapterDisplayMode
\n
"
,
This
,
pMode
);
hr
=
IWineD3D_GetAdapterDisplayM
ode
(
This
->
device
->
wined3d
,
This
->
device
->
adapter
->
ordinal
,
pMode
);
hr
=
wined3d_get_adapter_display_m
ode
(
This
->
device
->
wined3d
,
This
->
device
->
adapter
->
ordinal
,
pMode
);
TRACE
(
"(%p) : returning w(%d) h(%d) rr(%d) fmt(%u,%s)
\n
"
,
This
,
pMode
->
Width
,
pMode
->
Height
,
pMode
->
RefreshRate
,
pMode
->
Format
,
debug_d3dformat
(
pMode
->
Format
));
...
...
dlls/wined3d/wined3d.spec
View file @
36d4268e
@ stdcall WineDirect3DCreate(long ptr)
@ stdcall WineDirect3DCreateClipper()
@ stdcall wined3d_mutex_lock()
@ stdcall wined3d_mutex_unlock()
@ cdecl wined3d_check_depth_stencil_match(ptr long long long long long)
@ cdecl wined3d_check_device_format(ptr long long long long long long long)
@ cdecl wined3d_check_device_format_conversion(ptr long long long long)
@ cdecl wined3d_check_device_multisample_type(ptr long long long long long ptr)
@ cdecl wined3d_check_device_type(ptr long long long long long)
@ cdecl wined3d_create(long ptr)
@ cdecl wined3d_decref(ptr)
@ cdecl wined3d_enum_adapter_modes(ptr long long long ptr)
@ cdecl wined3d_get_adapter_count(ptr)
@ cdecl wined3d_get_adapter_display_mode(ptr long ptr)
@ cdecl wined3d_get_adapter_identifier(ptr long long ptr)
@ cdecl wined3d_get_adapter_mode_count(ptr long long)
@ cdecl wined3d_get_adapter_monitor(ptr long)
@ cdecl wined3d_get_device_caps(ptr long long ptr)
@ cdecl wined3d_get_parent(ptr)
@ cdecl wined3d_incref(ptr)
@ cdecl wined3d_register_software_device(ptr ptr);
@ cdecl wined3d_device_create(ptr long long ptr long ptr ptr);
@ cdecl wined3d_stateblock_apply(ptr)
@ cdecl wined3d_stateblock_capture(ptr)
@ cdecl wined3d_stateblock_decref(ptr)
...
...
dlls/wined3d/wined3d_main.c
View file @
36d4268e
...
...
@@ -78,7 +78,7 @@ wined3d_settings_t wined3d_settings =
};
/* Do not call while under the GL lock. */
IWineD3D
*
WINAPI
WineDirect3DC
reate
(
UINT
version
,
void
*
parent
)
struct
wined3d
*
CDECL
wined3d_c
reate
(
UINT
version
,
void
*
parent
)
{
IWineD3DImpl
*
object
;
HRESULT
hr
;
...
...
dlls/wined3d/wined3d_private.h
View file @
36d4268e
...
...
@@ -59,6 +59,8 @@ typedef struct IWineD3DSwapChainImpl IWineD3DSwapChainImpl;
struct
IWineD3DBaseShaderImpl
;
struct
IWineD3DBaseTextureImpl
;
struct
IWineD3DResourceImpl
;
typedef
struct
wined3d
IWineD3DImpl
;
typedef
struct
wined3d
IWineD3D
;
/* Texture format fixups */
...
...
@@ -1611,22 +1613,14 @@ const struct ffp_frag_desc *find_ffp_frag_shader(const struct wine_rb_tree *frag
const
struct
ffp_frag_settings
*
settings
)
DECLSPEC_HIDDEN
;
void
add_ffp_frag_shader
(
struct
wine_rb_tree
*
shaders
,
struct
ffp_frag_desc
*
desc
)
DECLSPEC_HIDDEN
;
/*****************************************************************************
* IWineD3D implementation structure
*/
typedef
struct
IWineD3DImpl
struct
wined3d
{
/* IUnknown fields */
const
IWineD3DVtbl
*
lpVtbl
;
LONG
ref
;
/* Note: Ref counting not required */
/* WineD3D Information */
LONG
ref
;
void
*
parent
;
UINT
dxVersion
;
UINT
dxVersion
;
UINT
adapter_count
;
struct
wined3d_adapter
adapters
[
1
];
}
IWineD3DImpl
;
};
HRESULT
wined3d_init
(
IWineD3DImpl
*
wined3d
,
UINT
version
,
void
*
parent
)
DECLSPEC_HIDDEN
;
BOOL
wined3d_register_window
(
HWND
window
,
struct
IWineD3DDeviceImpl
*
device
)
DECLSPEC_HIDDEN
;
...
...
include/wine/wined3d.idl
View file @
36d4268e
...
...
@@ -2110,6 +2110,7 @@ interface IWineD3DSurface;
interface
IWineD3DVolume
;
interface
IWineD3DSwapChain
;
interface
IWineD3DDevice
;
struct
wined3d
;
struct
wined3d_stateblock
;
[
...
...
@@ -2189,92 +2190,6 @@ interface IWineD3DBase : IUnknown
[
object
,
local
,
uuid
(
108
f9c44
-
6
f30
-
11
d9
-
c687
-
00046142
c14f
)
]
interface
IWineD3D
:
IWineD3DBase
{
UINT
GetAdapterCount
(
)
;
HRESULT
RegisterSoftwareDevice
(
[
in
]
void
*
pInitializeFunction
)
;
HMONITOR
GetAdapterMonitor
(
[
in
]
UINT
adapter_idx
)
;
UINT
GetAdapterModeCount
(
[
in
]
UINT
adapter_idx
,
[
in
]
enum
wined3d_format_id
format_id
)
;
HRESULT
EnumAdapterModes
(
[
in
]
UINT
adapter_idx
,
[
in
]
enum
wined3d_format_id
format_id
,
[
in
]
UINT
mode_idx
,
[
out
]
WINED3DDISPLAYMODE
*
mode
)
;
HRESULT
GetAdapterDisplayMode
(
[
in
]
UINT
adapter_idx
,
[
out
]
WINED3DDISPLAYMODE
*
mode
)
;
HRESULT
GetAdapterIdentifier
(
[
in
]
UINT
adapter_idx
,
[
in
]
DWORD
flags
,
[
out
]
WINED3DADAPTER_IDENTIFIER
*
identifier
)
;
HRESULT
CheckDeviceMultiSampleType
(
[
in
]
UINT
adapter_idx
,
[
in
]
WINED3DDEVTYPE
device_type
,
[
in
]
enum
wined3d_format_id
surface_format_id
,
[
in
]
BOOL
windowed
,
[
in
]
WINED3DMULTISAMPLE_TYPE
multisample_type
,
[
out
]
DWORD
*
quality_levels
)
;
HRESULT
CheckDepthStencilMatch
(
[
in
]
UINT
adapter_idx
,
[
in
]
WINED3DDEVTYPE
device_type
,
[
in
]
enum
wined3d_format_id
adapter_format_id
,
[
in
]
enum
wined3d_format_id
render_target_format_id
,
[
in
]
enum
wined3d_format_id
depth_stencil_format_id
)
;
HRESULT
CheckDeviceType
(
[
in
]
UINT
adapter_idx
,
[
in
]
WINED3DDEVTYPE
device_type
,
[
in
]
enum
wined3d_format_id
display_format_id
,
[
in
]
enum
wined3d_format_id
backbuffer_format_id
,
[
in
]
BOOL
windowed
)
;
HRESULT
CheckDeviceFormat
(
[
in
]
UINT
adaper_idx
,
[
in
]
WINED3DDEVTYPE
device_type
,
[
in
]
enum
wined3d_format_id
adapter_format_id
,
[
in
]
DWORD
usage
,
[
in
]
WINED3DRESOURCETYPE
resource_type
,
[
in
]
enum
wined3d_format_id
check_format
,
[
in
]
WINED3DSURFTYPE
surface_type
)
;
HRESULT
CheckDeviceFormatConversion
(
[
in
]
UINT
adapter_idx
,
[
in
]
WINED3DDEVTYPE
device_type
,
[
in
]
enum
wined3d_format_id
source_format_id
,
[
in
]
enum
wined3d_format_id
target_format_id
)
;
HRESULT
GetDeviceCaps
(
[
in
]
UINT
adapter_idx
,
[
in
]
WINED3DDEVTYPE
device_type
,
[
out
]
WINED3DCAPS
*
caps
)
;
HRESULT
CreateDevice
(
[
in
]
UINT
adapter_idx
,
[
in
]
WINED3DDEVTYPE
device_type
,
[
in
]
HWND
focus_window
,
[
in
]
DWORD
behaviour_flags
,
[
in
]
IWineD3DDeviceParent
*
device_parent
,
[
out
]
IWineD3DDevice
**
device
)
;
}
[
object
,
local
,
uuid
(
1
f3bfb34
-
6
f30
-
11
d9
-
c687
-
00046142
c14f
)
]
interface
IWineD3DResource
:
IWineD3DBase
...
...
@@ -2926,7 +2841,7 @@ interface IWineD3DDevice : IUnknown
[
out
]
WINED3DCAPS
*
caps
)
;
HRESULT
GetDirect3D
(
[
out
]
IWineD3D
**
d3d
[
out
]
struct
wined3d
**
d3d
)
;
HRESULT
GetDisplayMode
(
[
in
]
UINT
swapchain_idx
,
...
...
@@ -3349,11 +3264,48 @@ interface IWineD3DDevice : IUnknown
)
;
}
IWineD3D
*
__stdcall
WineDirect3DCreate
(
UINT
dxVersion
,
void
*
parent
)
;
IWineD3DClipper
*
__stdcall
WineDirect3DCreateClipper
(
void
)
;
void
__stdcall
wined3d_mutex_lock
(
void
)
;
void
__stdcall
wined3d_mutex_unlock
(
void
)
;
HRESULT
__cdecl
wined3d_check_depth_stencil_match
(
const
struct
wined3d
*
wined3d
,
UINT
adapter_idx
,
WINED3DDEVTYPE
device_type
,
enum
wined3d_format_id
adapter_format_id
,
enum
wined3d_format_id
render_target_format_id
,
enum
wined3d_format_id
depth_stencil_format_id
)
;
HRESULT
__cdecl
wined3d_check_device_format
(
const
struct
wined3d
*
wined3d
,
UINT
adaper_idx
,
WINED3DDEVTYPE
device_type
,
enum
wined3d_format_id
adapter_format_id
,
DWORD
usage
,
WINED3DRESOURCETYPE
resource_type
,
enum
wined3d_format_id
check_format_id
,
WINED3DSURFTYPE
surface_type
)
;
HRESULT
__cdecl
wined3d_check_device_format_conversion
(
const
struct
wined3d
*
wined3d
,
UINT
adapter_idx
,
WINED3DDEVTYPE
device_type
,
enum
wined3d_format_id
source_format_id
,
enum
wined3d_format_id
target_format_id
)
;
HRESULT
__cdecl
wined3d_check_device_multisample_type
(
const
struct
wined3d
*
wined3d
,
UINT
adapter_idx
,
WINED3DDEVTYPE
device_type
,
enum
wined3d_format_id
surface_format_id
,
BOOL
windowed
,
WINED3DMULTISAMPLE_TYPE
multisample_type
,
DWORD
*
quality_levels
)
;
HRESULT
__cdecl
wined3d_check_device_type
(
const
struct
wined3d
*
wined3d
,
UINT
adapter_idx
,
WINED3DDEVTYPE
device_type
,
enum
wined3d_format_id
display_format_id
,
enum
wined3d_format_id
backbuffer_format_id
,
BOOL
windowed
)
;
struct
wined3d
*
__cdecl
wined3d_create
(
UINT
dxVersion
,
void
*
parent
)
;
ULONG
__cdecl
wined3d_decref
(
struct
wined3d
*
wined3d
)
;
HRESULT
__cdecl
wined3d_enum_adapter_modes
(
const
struct
wined3d
*
wined3d
,
UINT
adapter_idx
,
enum
wined3d_format_id
format_id
,
UINT
mode_idx
,
WINED3DDISPLAYMODE
*
mode
)
;
UINT
__cdecl
wined3d_get_adapter_count
(
const
struct
wined3d
*
wined3d
)
;
HRESULT
__cdecl
wined3d_get_adapter_display_mode
(
const
struct
wined3d
*
wined3d
,
UINT
adapter_idx
,
WINED3DDISPLAYMODE
*
mode
)
;
HRESULT
__cdecl
wined3d_get_adapter_identifier
(
const
struct
wined3d
*
wined3d
,
UINT
adapter_idx
,
DWORD
flags
,
WINED3DADAPTER_IDENTIFIER
*
identifier
)
;
UINT
__cdecl
wined3d_get_adapter_mode_count
(
const
struct
wined3d
*
wined3d
,
UINT
adapter_idx
,
enum
wined3d_format_id
format_id
)
;
HMONITOR
__cdecl
wined3d_get_adapter_monitor
(
const
struct
wined3d
*
wined3d
,
UINT
adapter_idx
)
;
HRESULT
__cdecl
wined3d_get_device_caps
(
const
struct
wined3d
*
wined3d
,
UINT
adapter_idx
,
WINED3DDEVTYPE
device_type
,
WINED3DCAPS
*
caps
)
;
void
*
__cdecl
wined3d_get_parent
(
const
struct
wined3d
*
wined3d
)
;
ULONG
__cdecl
wined3d_incref
(
struct
wined3d
*
wined3d
)
;
HRESULT
__cdecl
wined3d_register_software_device
(
struct
wined3d
*
wined3d
,
void
*
init_function
)
;
HRESULT
__cdecl
wined3d_device_create
(
struct
wined3d
*
wined3d
,
UINT
adapter_idx
,
WINED3DDEVTYPE
device_type
,
HWND
focus_window
,
DWORD
behaviour_flags
,
IWineD3DDeviceParent
*
device_parent
,
IWineD3DDevice
**
device
)
;
HRESULT
__cdecl
wined3d_stateblock_apply
(
const
struct
wined3d_stateblock
*
stateblock
)
;
HRESULT
__cdecl
wined3d_stateblock_capture
(
struct
wined3d_stateblock
*
stateblock
)
;
ULONG
__cdecl
wined3d_stateblock_decref
(
struct
wined3d_stateblock
*
stateblock
)
;
...
...
include/wine/winedxgi.idl
View file @
36d4268e
...
...
@@ -25,7 +25,7 @@ import "dxgi.idl";
]
interface
IWineDXGIFactory
:
IDXGIFactory
{
struct
IWineD3D
*
get_wined3d
()
;
struct
wined3d
*
get_wined3d
()
;
}
[
...
...
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