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
022e8843
Commit
022e8843
authored
Mar 04, 2007
by
Stefan Dösinger
Committed by
Alexandre Julliard
Mar 19, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d/ddraw: Forward DDSCL_MULTITHREADED to wined3d.
parent
63da5f26
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
43 additions
and
7 deletions
+43
-7
directx.c
dlls/d3d8/directx.c
+4
-0
directx.c
dlls/d3d9/directx.c
+5
-0
ddraw.c
dlls/ddraw/ddraw.c
+11
-5
device.c
dlls/wined3d/device.c
+17
-0
wined3d_private_types.h
dlls/wined3d/wined3d_private_types.h
+4
-1
wined3d_interface.h
include/wine/wined3d_interface.h
+2
-0
wined3d_types.h
include/wine/wined3d_types.h
+0
-1
No files found.
dlls/d3d8/directx.c
View file @
022e8843
...
...
@@ -377,6 +377,10 @@ static HRESULT WINAPI IDirect3D8Impl_CreateDevice(LPDIRECT3D8 iface, UINT Adapte
localParameters
.
FullScreen_RefreshRateInHz
=
pPresentationParameters
->
FullScreen_RefreshRateInHz
;
localParameters
.
PresentationInterval
=
pPresentationParameters
->
FullScreen_PresentationInterval
;
if
(
BehaviourFlags
&
D3DCREATE_MULTITHREADED
)
{
IWineD3DDevice_SetMultithreaded
(
object
->
WineD3DDevice
);
}
hr
=
IWineD3DDevice_Init3D
(
object
->
WineD3DDevice
,
&
localParameters
,
D3D8CB_CreateAdditionalSwapChain
);
pPresentationParameters
->
BackBufferWidth
=
localParameters
.
BackBufferWidth
;
...
...
dlls/d3d9/directx.c
View file @
022e8843
...
...
@@ -367,6 +367,10 @@ static HRESULT WINAPI IDirect3D9Impl_CreateDevice(LPDIRECT3D9 iface, UINT Adapte
localParameters
.
FullScreen_RefreshRateInHz
=
pPresentationParameters
->
FullScreen_RefreshRateInHz
;
localParameters
.
PresentationInterval
=
pPresentationParameters
->
PresentationInterval
;
if
(
BehaviourFlags
&
D3DCREATE_MULTITHREADED
)
{
IWineD3DDevice_SetMultithreaded
(
object
->
WineD3DDevice
);
}
hr
=
IWineD3DDevice_Init3D
(
object
->
WineD3DDevice
,
&
localParameters
,
D3D9CB_CreateAdditionalSwapChain
);
pPresentationParameters
->
BackBufferWidth
=
localParameters
.
BackBufferWidth
;
...
...
@@ -389,6 +393,7 @@ static HRESULT WINAPI IDirect3D9Impl_CreateDevice(LPDIRECT3D9 iface, UINT Adapte
HeapFree
(
GetProcessHeap
(),
0
,
object
);
*
ppReturnedDeviceInterface
=
NULL
;
}
return
hr
;
}
...
...
dlls/ddraw/ddraw.c
View file @
022e8843
...
...
@@ -323,7 +323,8 @@ IDirectDrawImpl_Release(IDirectDraw7 *iface)
* DDSCL_SETFOCUSWINDOW may only be used with DDSCL_NOWINDOWCHANGES
*
* Handled flags: DDSCL_NORMAL, DDSCL_FULLSCREEN, DDSCL_EXCLUSIVE,
* DDSCL_SETFOCUSWINDOW (partially)
* DDSCL_SETFOCUSWINDOW (partially),
* DDSCL_MULTITHREADED (work in progress)
*
* Unhandled flags, which should be implemented
* DDSCL_SETDEVICEWINDOW: Sets a window specially used for rendering (I don't
...
...
@@ -334,8 +335,7 @@ IDirectDrawImpl_Release(IDirectDraw7 *iface)
* Unsure about these: DDSCL_FPUSETUP DDSCL_FPURESERVE
*
* These seem not really imporant for wine
* DDSCL_ALLOWREBOOT, DDSCL_NOWINDOWCHANGES, DDSCL_ALLOWMODEX,
* DDSCL_MULTITHREDED
* DDSCL_ALLOWREBOOT, DDSCL_NOWINDOWCHANGES, DDSCL_ALLOWMODEX
*
* Returns:
* DD_OK if the cooperative level was set successfully
...
...
@@ -501,13 +501,19 @@ IDirectDrawImpl_SetCooperativeLevel(IDirectDraw7 *iface,
}
}
if
(
cooplevel
&
DDSCL_MULTITHREADED
&&
!
(
This
->
cooperative_level
&
DDSCL_MULTITHREADED
))
{
FIXME
(
"DirectDraw is not thread safe yet
\n
"
);
/* Enable thread safety in wined3d */
IWineD3DDevice_SetMultithreaded
(
This
->
wineD3DDevice
);
}
/* Unhandled flags */
if
(
cooplevel
&
DDSCL_ALLOWREBOOT
)
WARN
(
"(%p) Unhandled flag DDSCL_ALLOWREBOOT, harmless
\n
"
,
This
);
if
(
cooplevel
&
DDSCL_ALLOWMODEX
)
WARN
(
"(%p) Unhandled flag DDSCL_ALLOWMODEX, harmless
\n
"
,
This
);
if
(
cooplevel
&
DDSCL_MULTITHREADED
)
FIXME
(
"(%p) Unhandled flag DDSCL_MULTITHREADED, Uh Oh...
\n
"
,
This
);
if
(
cooplevel
&
DDSCL_FPUSETUP
)
WARN
(
"(%p) Unhandled flag DDSCL_FPUSETUP, harmless
\n
"
,
This
);
if
(
cooplevel
&
DDSCL_FPUPRESERVE
)
...
...
dlls/wined3d/device.c
View file @
022e8843
...
...
@@ -1830,6 +1830,22 @@ static void WINAPI IWineD3DDeviceImpl_SetFullscreen(IWineD3DDevice *iface, BOOL
This
->
ddraw_fullscreen
=
fullscreen
;
}
/* Enables thead safety in the wined3d device and its resources. Called by DirectDraw
* from SetCooperativeLeven if DDSCL_MULTITHREADED is specified, and by d3d8/9 from
* CreateDevice if D3DCREATE_MULTITHREADED is passed.
*
* There is no way to deactivate thread safety once it is enabled
*/
static
void
WINAPI
IWineD3DDeviceImpl_SetMultithreaded
(
IWineD3DDevice
*
iface
)
{
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
FIXME
(
"No thread safety in wined3d yet
\n
"
);
/*For now just store the flag(needed in case of ddraw) */
This
->
createParms
.
BehaviorFlags
|=
WINED3DCREATE_MULTITHREADED
;
return
;
}
static
HRESULT
WINAPI
IWineD3DDeviceImpl_SetDisplayMode
(
IWineD3DDevice
*
iface
,
UINT
iSwapChain
,
WINED3DDISPLAYMODE
*
pMode
)
{
DEVMODEW
devmode
;
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
...
...
@@ -5779,6 +5795,7 @@ const IWineD3DDeviceVtbl IWineD3DDevice_Vtbl =
IWineD3DDeviceImpl_Init3D
,
IWineD3DDeviceImpl_Uninit3D
,
IWineD3DDeviceImpl_SetFullscreen
,
IWineD3DDeviceImpl_SetMultithreaded
,
IWineD3DDeviceImpl_EvictManagedResources
,
IWineD3DDeviceImpl_GetAvailableTextureMem
,
IWineD3DDeviceImpl_GetBackBuffer
,
...
...
dlls/wined3d/wined3d_private_types.h
View file @
022e8843
...
...
@@ -299,5 +299,8 @@ typedef enum _WINED3DSHADER_INSTRUCTION_OPCODE_TYPE {
#define WINED3DSHADER_VERSION_MINOR(version) (((version) >> 0) & 0xFF)
#define WINED3DPS_END() 0x0000FFFF
#define WINED3DVS_END() 0x0000FFFF
/* Multithreaded flag. Removed from the public header to signal that IWineD3D::CreateDevice ignores it */
#define WINED3DCREATE_MULTITHREADED 0x00000004
#endif
include/wine/wined3d_interface.h
View file @
022e8843
...
...
@@ -356,6 +356,7 @@ DECLARE_INTERFACE_(IWineD3DDevice,IWineD3DBase)
STDMETHOD
(
Init3D
)(
THIS_
WINED3DPRESENT_PARAMETERS
*
pPresentationParameters
,
D3DCB_CREATEADDITIONALSWAPCHAIN
D3DCB_CreateAdditionalSwapChain
);
STDMETHOD
(
Uninit3D
)(
THIS
,
D3DCB_DESTROYSURFACEFN
pFn
,
D3DCB_DESTROYSWAPCHAINFN
pFn2
);
STDMETHOD_
(
void
,
SetFullscreen
)(
THIS_
BOOL
fullscreen
);
STDMETHOD_
(
void
,
SetMultithreaded
)(
THIS
);
STDMETHOD
(
EvictManagedResources
)(
THIS
)
PURE
;
STDMETHOD_
(
UINT
,
GetAvailableTextureMem
)(
THIS
)
PURE
;
STDMETHOD
(
GetBackBuffer
)(
THIS_
UINT
iSwapChain
,
UINT
BackBuffer
,
WINED3DBACKBUFFER_TYPE
,
struct
IWineD3DSurface
**
ppBackBuffer
)
PURE
;
...
...
@@ -492,6 +493,7 @@ DECLARE_INTERFACE_(IWineD3DDevice,IWineD3DBase)
#define IWineD3DDevice_Init3D(p, a, b) (p)->lpVtbl->Init3D(p, a, b)
#define IWineD3DDevice_Uninit3D(p, a, b) (p)->lpVtbl->Uninit3D(p, a, b)
#define IWineD3DDevice_SetFullscreen(p, a) (p)->lpVtbl->SetFullscreen(p, a)
#define IWineD3DDevice_SetMultithreaded(p) (p)->lpVtbl->SetMultithreaded(p)
#define IWineD3DDevice_EvictManagedResources(p) (p)->lpVtbl->EvictManagedResources(p)
#define IWineD3DDevice_GetAvailableTextureMem(p) (p)->lpVtbl->GetAvailableTextureMem(p)
#define IWineD3DDevice_GetBackBuffer(p,a,b,c,d) (p)->lpVtbl->GetBackBuffer(p,a,b,c,d)
...
...
include/wine/wined3d_types.h
View file @
022e8843
...
...
@@ -1569,7 +1569,6 @@ typedef enum _WINED3DSURFTYPE {
/* IWineD3D::CreateDevice behaviour flags */
#define WINED3DCREATE_FPU_PRESERVE 0x00000002
#define WINED3DCREATE_MULTITHREADED 0x00000004
#define WINED3DCREATE_PUREDEVICE 0x00000010
#define WINED3DCREATE_SOFTWARE_VERTEXPROCESSING 0x00000020
#define WINED3DCREATE_HARDWARE_VERTEXPROCESSING 0x00000040
...
...
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