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
61a9efc4
Commit
61a9efc4
authored
Feb 19, 2009
by
Henri Verbeet
Committed by
Alexandre Julliard
Feb 20, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d9: Explicitly convert between D3DFORMAT and WINED3DFORMAT values.
parent
d575b5fe
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
85 additions
and
35 deletions
+85
-35
cubetexture.c
dlls/d3d9/cubetexture.c
+7
-2
d3d9_private.h
dlls/d3d9/d3d9_private.h
+2
-0
device.c
dlls/d3d9/device.c
+0
-0
directx.c
dlls/d3d9/directx.c
+28
-18
indexbuffer.c
dlls/d3d9/indexbuffer.c
+6
-1
surface.c
dlls/d3d9/surface.c
+5
-1
swapchain.c
dlls/d3d9/swapchain.c
+9
-6
texture.c
dlls/d3d9/texture.c
+7
-2
vertexbuffer.c
dlls/d3d9/vertexbuffer.c
+3
-0
volume.c
dlls/d3d9/volume.c
+8
-2
volumetexture.c
dlls/d3d9/volumetexture.c
+10
-3
No files found.
dlls/d3d9/cubetexture.c
View file @
61a9efc4
...
...
@@ -228,12 +228,13 @@ static HRESULT WINAPI IDirect3DCubeTexture9Impl_GetLevelDesc(LPDIRECT3DCUBETEXTU
IDirect3DCubeTexture9Impl
*
This
=
(
IDirect3DCubeTexture9Impl
*
)
iface
;
WINED3DSURFACE_DESC
wined3ddesc
;
UINT
tmpInt
=
-
1
;
WINED3DFORMAT
format
;
HRESULT
hr
;
TRACE
(
"(%p) Relay
\n
"
,
This
);
/* As d3d8 and d3d9 structures differ, pass in ptrs to where data needs to go */
wined3ddesc
.
Format
=
(
WINED3DFORMAT
*
)
&
pDesc
->
F
ormat
;
wined3ddesc
.
Format
=
&
f
ormat
;
wined3ddesc
.
Type
=
(
WINED3DRESOURCETYPE
*
)
&
pDesc
->
Type
;
wined3ddesc
.
Usage
=
&
pDesc
->
Usage
;
wined3ddesc
.
Pool
=
(
WINED3DPOOL
*
)
&
pDesc
->
Pool
;
...
...
@@ -246,6 +247,9 @@ static HRESULT WINAPI IDirect3DCubeTexture9Impl_GetLevelDesc(LPDIRECT3DCUBETEXTU
EnterCriticalSection
(
&
d3d9_cs
);
hr
=
IWineD3DCubeTexture_GetLevelDesc
(
This
->
wineD3DCubeTexture
,
Level
,
&
wined3ddesc
);
LeaveCriticalSection
(
&
d3d9_cs
);
if
(
SUCCEEDED
(
hr
))
pDesc
->
Format
=
d3dformat_from_wined3dformat
(
format
);
return
hr
;
}
...
...
@@ -355,7 +359,8 @@ HRESULT WINAPI IDirect3DDevice9Impl_CreateCubeTexture(LPDIRECT3DDEVICE9EX ifac
object
->
ref
=
1
;
EnterCriticalSection
(
&
d3d9_cs
);
hr
=
IWineD3DDevice_CreateCubeTexture
(
This
->
WineD3DDevice
,
EdgeLength
,
Levels
,
Usage
,
Format
,
Pool
,
&
object
->
wineD3DCubeTexture
,
pSharedHandle
,
(
IUnknown
*
)
object
);
wined3dformat_from_d3dformat
(
Format
),
Pool
,
&
object
->
wineD3DCubeTexture
,
pSharedHandle
,
(
IUnknown
*
)
object
);
LeaveCriticalSection
(
&
d3d9_cs
);
if
(
hr
!=
D3D_OK
){
...
...
dlls/d3d9/d3d9_private.h
View file @
61a9efc4
...
...
@@ -45,6 +45,8 @@ extern HRESULT vdecl_convert_fvf(
DWORD
FVF
,
D3DVERTEXELEMENT9
**
ppVertexElements
);
extern
CRITICAL_SECTION
d3d9_cs
;
D3DFORMAT
d3dformat_from_wined3dformat
(
WINED3DFORMAT
format
);
WINED3DFORMAT
wined3dformat_from_d3dformat
(
D3DFORMAT
format
);
/* ===========================================================================
Macros
...
...
dlls/d3d9/device.c
View file @
61a9efc4
This diff is collapsed.
Click to expand it.
dlls/d3d9/directx.c
View file @
61a9efc4
...
...
@@ -137,7 +137,7 @@ static UINT WINAPI IDirect3D9Impl_GetAdapterModeCount(LPDIRECT3D9EX iface, UINT
}
EnterCriticalSection
(
&
d3d9_cs
);
hr
=
IWineD3D_GetAdapterModeCount
(
This
->
WineD3D
,
Adapter
,
Format
);
hr
=
IWineD3D_GetAdapterModeCount
(
This
->
WineD3D
,
Adapter
,
wined3dformat_from_d3dformat
(
Format
)
);
LeaveCriticalSection
(
&
d3d9_cs
);
return
hr
;
}
...
...
@@ -148,18 +148,27 @@ static HRESULT WINAPI IDirect3D9Impl_EnumAdapterModes(LPDIRECT3D9EX iface, UINT
TRACE
(
"(%p)->(%d, %d, %d, %p)
\n
"
,
This
,
Adapter
,
Format
,
Mode
,
pMode
);
/* We can't pass this to WineD3D, otherwise it'll think it came from D3D8 or DDraw.
It's supposed to fail anyway, so no harm returning failure. */
if
(
Format
!=
WINED3DFMT_X8R8G8B8
&&
Format
!=
WINE
D3DFMT_R5G6B5
)
if
(
Format
!=
D3DFMT_X8R8G8B8
&&
Format
!=
D3DFMT_R5G6B5
)
return
D3DERR_INVALIDCALL
;
EnterCriticalSection
(
&
d3d9_cs
);
hr
=
IWineD3D_EnumAdapterModes
(
This
->
WineD3D
,
Adapter
,
Format
,
Mode
,
(
WINED3DDISPLAYMODE
*
)
pMode
);
hr
=
IWineD3D_EnumAdapterModes
(
This
->
WineD3D
,
Adapter
,
wined3dformat_from_d3dformat
(
Format
),
Mode
,
(
WINED3DDISPLAYMODE
*
)
pMode
);
LeaveCriticalSection
(
&
d3d9_cs
);
if
(
SUCCEEDED
(
hr
))
pMode
->
Format
=
d3dformat_from_wined3dformat
(
pMode
->
Format
);
return
hr
;
}
static
HRESULT
WINAPI
IDirect3D9Impl_GetAdapterDisplayMode
(
LPDIRECT3D9EX
iface
,
UINT
Adapter
,
D3DDISPLAYMODE
*
pMode
)
{
IDirect3D9Impl
*
This
=
(
IDirect3D9Impl
*
)
iface
;
return
IWineD3D_GetAdapterDisplayMode
(
This
->
WineD3D
,
Adapter
,
(
WINED3DDISPLAYMODE
*
)
pMode
);
HRESULT
hr
;
hr
=
IWineD3D_GetAdapterDisplayMode
(
This
->
WineD3D
,
Adapter
,
(
WINED3DDISPLAYMODE
*
)
pMode
);
if
(
SUCCEEDED
(
hr
))
pMode
->
Format
=
d3dformat_from_wined3dformat
(
pMode
->
Format
);
return
hr
;
}
static
HRESULT
WINAPI
IDirect3D9Impl_CheckDeviceType
(
LPDIRECT3D9EX
iface
,
...
...
@@ -171,8 +180,8 @@ static HRESULT WINAPI IDirect3D9Impl_CheckDeviceType(LPDIRECT3D9EX iface,
BackBufferFormat
,
Windowed
?
"true"
:
"false"
);
EnterCriticalSection
(
&
d3d9_cs
);
hr
=
IWineD3D_CheckDeviceType
(
This
->
WineD3D
,
Adapter
,
CheckType
,
DisplayFormat
,
BackBufferFormat
,
Windowed
);
hr
=
IWineD3D_CheckDeviceType
(
This
->
WineD3D
,
Adapter
,
CheckType
,
wined3dformat_from_d3dformat
(
DisplayFormat
)
,
wined3dformat_from_d3dformat
(
BackBufferFormat
)
,
Windowed
);
LeaveCriticalSection
(
&
d3d9_cs
);
return
hr
;
}
...
...
@@ -185,8 +194,8 @@ static HRESULT WINAPI IDirect3D9Impl_CheckDeviceFormat(LPDIRECT3D9EX iface,
TRACE
(
"%p
\n
"
,
This
);
EnterCriticalSection
(
&
d3d9_cs
);
hr
=
IWineD3D_CheckDeviceFormat
(
This
->
WineD3D
,
Adapter
,
DeviceType
,
AdapterFormat
,
Usage
,
RType
,
CheckFormat
,
SURFACE_OPENGL
);
hr
=
IWineD3D_CheckDeviceFormat
(
This
->
WineD3D
,
Adapter
,
DeviceType
,
wined3dformat_from_d3dformat
(
AdapterFormat
)
,
Usage
,
RType
,
wined3dformat_from_d3dformat
(
CheckFormat
)
,
SURFACE_OPENGL
);
LeaveCriticalSection
(
&
d3d9_cs
);
return
hr
;
}
...
...
@@ -199,8 +208,8 @@ static HRESULT WINAPI IDirect3D9Impl_CheckDeviceMultiSampleType(LPDIRECT3D9EX if
TRACE
(
"%p
\n
"
,
This
);
EnterCriticalSection
(
&
d3d9_cs
);
hr
=
IWineD3D_CheckDeviceMultiSampleType
(
This
->
WineD3D
,
Adapter
,
DeviceType
,
SurfaceFormat
,
Windowed
,
MultiSampleType
,
pQualityLevels
);
hr
=
IWineD3D_CheckDeviceMultiSampleType
(
This
->
WineD3D
,
Adapter
,
DeviceType
,
wined3dformat_from_d3dformat
(
SurfaceFormat
),
Windowed
,
MultiSampleType
,
pQualityLevels
);
LeaveCriticalSection
(
&
d3d9_cs
);
return
hr
;
}
...
...
@@ -213,8 +222,9 @@ static HRESULT WINAPI IDirect3D9Impl_CheckDepthStencilMatch(LPDIRECT3D9EX iface,
TRACE
(
"%p
\n
"
,
This
);
EnterCriticalSection
(
&
d3d9_cs
);
hr
=
IWineD3D_CheckDepthStencilMatch
(
This
->
WineD3D
,
Adapter
,
DeviceType
,
AdapterFormat
,
RenderTargetFormat
,
DepthStencilFormat
);
hr
=
IWineD3D_CheckDepthStencilMatch
(
This
->
WineD3D
,
Adapter
,
DeviceType
,
wined3dformat_from_d3dformat
(
AdapterFormat
),
wined3dformat_from_d3dformat
(
RenderTargetFormat
),
wined3dformat_from_d3dformat
(
DepthStencilFormat
));
LeaveCriticalSection
(
&
d3d9_cs
);
return
hr
;
}
...
...
@@ -225,8 +235,8 @@ static HRESULT WINAPI IDirect3D9Impl_CheckDeviceFormatConversion(LPDIRECT3D9EX i
TRACE
(
"%p
\n
"
,
This
);
EnterCriticalSection
(
&
d3d9_cs
);
hr
=
IWineD3D_CheckDeviceFormatConversion
(
This
->
WineD3D
,
Adapter
,
DeviceType
,
SourceFormat
,
TargetFormat
);
hr
=
IWineD3D_CheckDeviceFormatConversion
(
This
->
WineD3D
,
Adapter
,
DeviceType
,
wined3dformat_from_d3dformat
(
SourceFormat
),
wined3dformat_from_d3dformat
(
TargetFormat
)
);
LeaveCriticalSection
(
&
d3d9_cs
);
return
hr
;
}
...
...
@@ -404,7 +414,7 @@ static HRESULT WINAPI IDirect3D9Impl_CreateDevice(LPDIRECT3D9EX iface, UINT Adap
localParameters
.
BackBufferWidth
=
pPresentationParameters
->
BackBufferWidth
;
localParameters
.
BackBufferHeight
=
pPresentationParameters
->
BackBufferHeight
;
localParameters
.
BackBufferFormat
=
pPresentationParameters
->
BackBufferFormat
;
localParameters
.
BackBufferFormat
=
wined3dformat_from_d3dformat
(
pPresentationParameters
->
BackBufferFormat
)
;
localParameters
.
BackBufferCount
=
pPresentationParameters
->
BackBufferCount
;
localParameters
.
MultiSampleType
=
pPresentationParameters
->
MultiSampleType
;
localParameters
.
MultiSampleQuality
=
pPresentationParameters
->
MultiSampleQuality
;
...
...
@@ -412,7 +422,7 @@ static HRESULT WINAPI IDirect3D9Impl_CreateDevice(LPDIRECT3D9EX iface, UINT Adap
localParameters
.
hDeviceWindow
=
pPresentationParameters
->
hDeviceWindow
;
localParameters
.
Windowed
=
pPresentationParameters
->
Windowed
;
localParameters
.
EnableAutoDepthStencil
=
pPresentationParameters
->
EnableAutoDepthStencil
;
localParameters
.
AutoDepthStencilFormat
=
pPresentationParameters
->
AutoDepthStencilFormat
;
localParameters
.
AutoDepthStencilFormat
=
wined3dformat_from_d3dformat
(
pPresentationParameters
->
AutoDepthStencilFormat
)
;
localParameters
.
Flags
=
pPresentationParameters
->
Flags
;
localParameters
.
FullScreen_RefreshRateInHz
=
pPresentationParameters
->
FullScreen_RefreshRateInHz
;
localParameters
.
PresentationInterval
=
pPresentationParameters
->
PresentationInterval
;
...
...
@@ -426,7 +436,7 @@ static HRESULT WINAPI IDirect3D9Impl_CreateDevice(LPDIRECT3D9EX iface, UINT Adap
pPresentationParameters
->
BackBufferWidth
=
localParameters
.
BackBufferWidth
;
pPresentationParameters
->
BackBufferHeight
=
localParameters
.
BackBufferHeight
;
pPresentationParameters
->
BackBufferFormat
=
localParameters
.
BackBufferFormat
;
pPresentationParameters
->
BackBufferFormat
=
d3dformat_from_wined3dformat
(
localParameters
.
BackBufferFormat
)
;
pPresentationParameters
->
BackBufferCount
=
localParameters
.
BackBufferCount
;
pPresentationParameters
->
MultiSampleType
=
localParameters
.
MultiSampleType
;
pPresentationParameters
->
MultiSampleQuality
=
localParameters
.
MultiSampleQuality
;
...
...
@@ -434,7 +444,7 @@ static HRESULT WINAPI IDirect3D9Impl_CreateDevice(LPDIRECT3D9EX iface, UINT Adap
pPresentationParameters
->
hDeviceWindow
=
localParameters
.
hDeviceWindow
;
pPresentationParameters
->
Windowed
=
localParameters
.
Windowed
;
pPresentationParameters
->
EnableAutoDepthStencil
=
localParameters
.
EnableAutoDepthStencil
;
pPresentationParameters
->
AutoDepthStencilFormat
=
localParameters
.
AutoDepthStencilFormat
;
pPresentationParameters
->
AutoDepthStencilFormat
=
d3dformat_from_wined3dformat
(
localParameters
.
AutoDepthStencilFormat
)
;
pPresentationParameters
->
Flags
=
localParameters
.
Flags
;
pPresentationParameters
->
FullScreen_RefreshRateInHz
=
localParameters
.
FullScreen_RefreshRateInHz
;
pPresentationParameters
->
PresentationInterval
=
localParameters
.
PresentationInterval
;
...
...
dlls/d3d9/indexbuffer.c
View file @
61a9efc4
...
...
@@ -184,6 +184,9 @@ static HRESULT WINAPI IDirect3DIndexBuffer9Impl_GetDesc(LPDIRECT3DINDEXB
EnterCriticalSection
(
&
d3d9_cs
);
hr
=
IWineD3DIndexBuffer_GetDesc
(
This
->
wineD3DIndexBuffer
,
(
WINED3DINDEXBUFFER_DESC
*
)
pDesc
);
LeaveCriticalSection
(
&
d3d9_cs
);
if
(
SUCCEEDED
(
hr
))
pDesc
->
Format
=
d3dformat_from_wined3dformat
(
pDesc
->
Format
);
return
hr
;
}
...
...
@@ -230,7 +233,9 @@ HRESULT WINAPI IDirect3DDevice9Impl_CreateIndexBuffer(LPDIRECT3DDEVICE9EX iface,
object
->
lpVtbl
=
&
Direct3DIndexBuffer9_Vtbl
;
object
->
ref
=
1
;
TRACE
(
"Calling wined3d create index buffer
\n
"
);
hrc
=
IWineD3DDevice_CreateIndexBuffer
(
This
->
WineD3DDevice
,
Length
,
Usage
&
WINED3DUSAGE_MASK
,
Format
,
(
WINED3DPOOL
)
Pool
,
&
object
->
wineD3DIndexBuffer
,
pSharedHandle
,
(
IUnknown
*
)
object
);
hrc
=
IWineD3DDevice_CreateIndexBuffer
(
This
->
WineD3DDevice
,
Length
,
Usage
&
WINED3DUSAGE_MASK
,
wined3dformat_from_d3dformat
(
Format
),
(
WINED3DPOOL
)
Pool
,
&
object
->
wineD3DIndexBuffer
,
pSharedHandle
,
(
IUnknown
*
)
object
);
if
(
hrc
!=
D3D_OK
)
{
/* free up object */
...
...
dlls/d3d9/surface.c
View file @
61a9efc4
...
...
@@ -201,11 +201,12 @@ static HRESULT WINAPI IDirect3DSurface9Impl_GetDesc(LPDIRECT3DSURFACE9 iface, D3
IDirect3DSurface9Impl
*
This
=
(
IDirect3DSurface9Impl
*
)
iface
;
WINED3DSURFACE_DESC
wined3ddesc
;
UINT
tmpInt
=
-
1
;
WINED3DFORMAT
format
;
HRESULT
hr
;
TRACE
(
"(%p) Relay
\n
"
,
This
);
/* As d3d8 and d3d9 structures differ, pass in ptrs to where data needs to go */
wined3ddesc
.
Format
=
(
WINED3DFORMAT
*
)
&
pDesc
->
F
ormat
;
wined3ddesc
.
Format
=
&
f
ormat
;
wined3ddesc
.
Type
=
(
WINED3DRESOURCETYPE
*
)
&
pDesc
->
Type
;
wined3ddesc
.
Usage
=
&
pDesc
->
Usage
;
wined3ddesc
.
Pool
=
(
WINED3DPOOL
*
)
&
pDesc
->
Pool
;
...
...
@@ -218,6 +219,9 @@ static HRESULT WINAPI IDirect3DSurface9Impl_GetDesc(LPDIRECT3DSURFACE9 iface, D3
EnterCriticalSection
(
&
d3d9_cs
);
hr
=
IWineD3DSurface_GetDesc
(
This
->
wineD3DSurface
,
&
wined3ddesc
);
LeaveCriticalSection
(
&
d3d9_cs
);
if
(
SUCCEEDED
(
hr
))
pDesc
->
Format
=
d3dformat_from_wined3dformat
(
format
);
return
hr
;
}
...
...
dlls/d3d9/swapchain.c
View file @
61a9efc4
...
...
@@ -126,6 +126,9 @@ static HRESULT WINAPI IDirect3DSwapChain9Impl_GetDisplayMode(LPDIRECT3DSWAPCHAIN
EnterCriticalSection
(
&
d3d9_cs
);
hr
=
IWineD3DSwapChain_GetDisplayMode
(
This
->
wineD3DSwapChain
,
(
WINED3DDISPLAYMODE
*
)
pMode
);
LeaveCriticalSection
(
&
d3d9_cs
);
if
(
SUCCEEDED
(
hr
))
pMode
->
Format
=
d3dformat_from_wined3dformat
(
pMode
->
Format
);
return
hr
;
}
...
...
@@ -159,7 +162,7 @@ static HRESULT WINAPI IDirect3DSwapChain9Impl_GetPresentParameters(LPDIRECT3DSWA
pPresentationParameters
->
BackBufferWidth
=
winePresentParameters
.
BackBufferWidth
;
pPresentationParameters
->
BackBufferHeight
=
winePresentParameters
.
BackBufferHeight
;
pPresentationParameters
->
BackBufferFormat
=
winePresentParameters
.
BackBufferFormat
;
pPresentationParameters
->
BackBufferFormat
=
d3dformat_from_wined3dformat
(
winePresentParameters
.
BackBufferFormat
)
;
pPresentationParameters
->
BackBufferCount
=
winePresentParameters
.
BackBufferCount
;
pPresentationParameters
->
MultiSampleType
=
winePresentParameters
.
MultiSampleType
;
pPresentationParameters
->
MultiSampleQuality
=
winePresentParameters
.
MultiSampleQuality
;
...
...
@@ -167,7 +170,7 @@ static HRESULT WINAPI IDirect3DSwapChain9Impl_GetPresentParameters(LPDIRECT3DSWA
pPresentationParameters
->
hDeviceWindow
=
winePresentParameters
.
hDeviceWindow
;
pPresentationParameters
->
Windowed
=
winePresentParameters
.
Windowed
;
pPresentationParameters
->
EnableAutoDepthStencil
=
winePresentParameters
.
EnableAutoDepthStencil
;
pPresentationParameters
->
AutoDepthStencilFormat
=
winePresentParameters
.
AutoDepthStencilFormat
;
pPresentationParameters
->
AutoDepthStencilFormat
=
d3dformat_from_wined3dformat
(
winePresentParameters
.
AutoDepthStencilFormat
)
;
pPresentationParameters
->
Flags
=
winePresentParameters
.
Flags
;
pPresentationParameters
->
FullScreen_RefreshRateInHz
=
winePresentParameters
.
FullScreen_RefreshRateInHz
;
pPresentationParameters
->
PresentationInterval
=
winePresentParameters
.
PresentationInterval
;
...
...
@@ -216,7 +219,7 @@ HRESULT WINAPI IDirect3DDevice9Impl_CreateAdditionalSwapChain(LPDIRECT3DDEVICE
/* Allocate an associated WineD3DDevice object */
localParameters
.
BackBufferWidth
=
pPresentationParameters
->
BackBufferWidth
;
localParameters
.
BackBufferHeight
=
pPresentationParameters
->
BackBufferHeight
;
localParameters
.
BackBufferFormat
=
pPresentationParameters
->
BackBufferFormat
;
localParameters
.
BackBufferFormat
=
wined3dformat_from_d3dformat
(
pPresentationParameters
->
BackBufferFormat
)
;
localParameters
.
BackBufferCount
=
pPresentationParameters
->
BackBufferCount
;
localParameters
.
MultiSampleType
=
pPresentationParameters
->
MultiSampleType
;
localParameters
.
MultiSampleQuality
=
pPresentationParameters
->
MultiSampleQuality
;
...
...
@@ -224,7 +227,7 @@ HRESULT WINAPI IDirect3DDevice9Impl_CreateAdditionalSwapChain(LPDIRECT3DDEVICE
localParameters
.
hDeviceWindow
=
pPresentationParameters
->
hDeviceWindow
;
localParameters
.
Windowed
=
pPresentationParameters
->
Windowed
;
localParameters
.
EnableAutoDepthStencil
=
pPresentationParameters
->
EnableAutoDepthStencil
;
localParameters
.
AutoDepthStencilFormat
=
pPresentationParameters
->
AutoDepthStencilFormat
;
localParameters
.
AutoDepthStencilFormat
=
wined3dformat_from_d3dformat
(
pPresentationParameters
->
AutoDepthStencilFormat
)
;
localParameters
.
Flags
=
pPresentationParameters
->
Flags
;
localParameters
.
FullScreen_RefreshRateInHz
=
pPresentationParameters
->
FullScreen_RefreshRateInHz
;
localParameters
.
PresentationInterval
=
pPresentationParameters
->
PresentationInterval
;
...
...
@@ -237,7 +240,7 @@ HRESULT WINAPI IDirect3DDevice9Impl_CreateAdditionalSwapChain(LPDIRECT3DDEVICE
pPresentationParameters
->
BackBufferWidth
=
localParameters
.
BackBufferWidth
;
pPresentationParameters
->
BackBufferHeight
=
localParameters
.
BackBufferHeight
;
pPresentationParameters
->
BackBufferFormat
=
localParameters
.
BackBufferFormat
;
pPresentationParameters
->
BackBufferFormat
=
d3dformat_from_wined3dformat
(
localParameters
.
BackBufferFormat
)
;
pPresentationParameters
->
BackBufferCount
=
localParameters
.
BackBufferCount
;
pPresentationParameters
->
MultiSampleType
=
localParameters
.
MultiSampleType
;
pPresentationParameters
->
MultiSampleQuality
=
localParameters
.
MultiSampleQuality
;
...
...
@@ -245,7 +248,7 @@ HRESULT WINAPI IDirect3DDevice9Impl_CreateAdditionalSwapChain(LPDIRECT3DDEVICE
pPresentationParameters
->
hDeviceWindow
=
localParameters
.
hDeviceWindow
;
pPresentationParameters
->
Windowed
=
localParameters
.
Windowed
;
pPresentationParameters
->
EnableAutoDepthStencil
=
localParameters
.
EnableAutoDepthStencil
;
pPresentationParameters
->
AutoDepthStencilFormat
=
localParameters
.
AutoDepthStencilFormat
;
pPresentationParameters
->
AutoDepthStencilFormat
=
d3dformat_from_wined3dformat
(
localParameters
.
AutoDepthStencilFormat
)
;
pPresentationParameters
->
Flags
=
localParameters
.
Flags
;
pPresentationParameters
->
FullScreen_RefreshRateInHz
=
localParameters
.
FullScreen_RefreshRateInHz
;
pPresentationParameters
->
PresentationInterval
=
localParameters
.
PresentationInterval
;
...
...
dlls/d3d9/texture.c
View file @
61a9efc4
...
...
@@ -227,10 +227,12 @@ static HRESULT WINAPI IDirect3DTexture9Impl_GetLevelDesc(LPDIRECT3DTEXTURE9 ifac
WINED3DSURFACE_DESC
wined3ddesc
;
UINT
tmpInt
=
-
1
;
HRESULT
hr
;
WINED3DFORMAT
format
;
TRACE
(
"(%p) Relay
\n
"
,
This
);
/* As d3d8 and d3d9 structures differ, pass in ptrs to where data needs to go */
wined3ddesc
.
Format
=
(
WINED3DFORMAT
*
)
&
pDesc
->
F
ormat
;
wined3ddesc
.
Format
=
&
f
ormat
;
wined3ddesc
.
Type
=
(
WINED3DRESOURCETYPE
*
)
&
pDesc
->
Type
;
wined3ddesc
.
Usage
=
&
pDesc
->
Usage
;
wined3ddesc
.
Pool
=
(
WINED3DPOOL
*
)
&
pDesc
->
Pool
;
...
...
@@ -243,6 +245,9 @@ static HRESULT WINAPI IDirect3DTexture9Impl_GetLevelDesc(LPDIRECT3DTEXTURE9 ifac
EnterCriticalSection
(
&
d3d9_cs
);
hr
=
IWineD3DTexture_GetLevelDesc
(
This
->
wineD3DTexture
,
Level
,
&
wined3ddesc
);
LeaveCriticalSection
(
&
d3d9_cs
);
if
(
SUCCEEDED
(
hr
))
pDesc
->
Format
=
d3dformat_from_wined3dformat
(
format
);
return
hr
;
}
...
...
@@ -347,7 +352,7 @@ HRESULT WINAPI IDirect3DDevice9Impl_CreateTexture(LPDIRECT3DDEVICE9EX iface, U
object
->
ref
=
1
;
EnterCriticalSection
(
&
d3d9_cs
);
hrc
=
IWineD3DDevice_CreateTexture
(
This
->
WineD3DDevice
,
Width
,
Height
,
Levels
,
Usage
&
WINED3DUSAGE_MASK
,
Format
,
Pool
,
&
object
->
wineD3DTexture
,
pSharedHandle
,
(
IUnknown
*
)
object
);
wined3dformat_from_d3dformat
(
Format
)
,
Pool
,
&
object
->
wineD3DTexture
,
pSharedHandle
,
(
IUnknown
*
)
object
);
LeaveCriticalSection
(
&
d3d9_cs
);
if
(
FAILED
(
hrc
))
{
...
...
dlls/d3d9/vertexbuffer.c
View file @
61a9efc4
...
...
@@ -181,6 +181,9 @@ static HRESULT WINAPI IDirect3DVertexBuffer9Impl_GetDesc(LPDIRECT3DVERTEXBUFFER9
EnterCriticalSection
(
&
d3d9_cs
);
hr
=
IWineD3DVertexBuffer_GetDesc
(
This
->
wineD3DVertexBuffer
,
(
WINED3DVERTEXBUFFER_DESC
*
)
pDesc
);
LeaveCriticalSection
(
&
d3d9_cs
);
if
(
SUCCEEDED
(
hr
))
pDesc
->
Format
=
d3dformat_from_wined3dformat
(
pDesc
->
Format
);
return
hr
;
}
...
...
dlls/d3d9/volume.c
View file @
61a9efc4
...
...
@@ -132,11 +132,13 @@ static HRESULT WINAPI IDirect3DVolume9Impl_GetDesc(LPDIRECT3DVOLUME9 iface, D3DV
IDirect3DVolume9Impl
*
This
=
(
IDirect3DVolume9Impl
*
)
iface
;
WINED3DVOLUME_DESC
wined3ddesc
;
UINT
tmpInt
=
-
1
;
WINED3DFORMAT
format
;
HRESULT
hr
;
TRACE
(
"(%p) Relay
\n
"
,
This
);
/* As d3d8 and d3d9 structures differ, pass in ptrs to where data needs to go */
wined3ddesc
.
Format
=
(
WINED3DFORMAT
*
)
&
pDesc
->
F
ormat
;
wined3ddesc
.
Format
=
&
f
ormat
;
wined3ddesc
.
Type
=
(
WINED3DRESOURCETYPE
*
)
&
pDesc
->
Type
;
wined3ddesc
.
Usage
=
&
pDesc
->
Usage
;
wined3ddesc
.
Pool
=
(
WINED3DPOOL
*
)
&
pDesc
->
Pool
;
...
...
@@ -145,7 +147,11 @@ static HRESULT WINAPI IDirect3DVolume9Impl_GetDesc(LPDIRECT3DVOLUME9 iface, D3DV
wined3ddesc
.
Height
=
&
pDesc
->
Height
;
wined3ddesc
.
Depth
=
&
pDesc
->
Depth
;
return
IWineD3DVolume_GetDesc
(
This
->
wineD3DVolume
,
&
wined3ddesc
);
hr
=
IWineD3DVolume_GetDesc
(
This
->
wineD3DVolume
,
&
wined3ddesc
);
if
(
SUCCEEDED
(
hr
))
pDesc
->
Format
=
d3dformat_from_wined3dformat
(
format
);
return
hr
;
}
static
HRESULT
WINAPI
IDirect3DVolume9Impl_LockBox
(
LPDIRECT3DVOLUME9
iface
,
D3DLOCKED_BOX
*
pLockedVolume
,
CONST
D3DBOX
*
pBox
,
DWORD
Flags
)
{
...
...
dlls/d3d9/volumetexture.c
View file @
61a9efc4
...
...
@@ -156,11 +156,13 @@ static HRESULT WINAPI IDirect3DVolumeTexture9Impl_GetLevelDesc(LPDIRECT3DVOLUMET
IDirect3DVolumeTexture9Impl
*
This
=
(
IDirect3DVolumeTexture9Impl
*
)
iface
;
WINED3DVOLUME_DESC
wined3ddesc
;
UINT
tmpInt
=
-
1
;
WINED3DFORMAT
format
;
HRESULT
hr
;
TRACE
(
"(%p) Relay
\n
"
,
This
);
/* As d3d8 and d3d9 structures differ, pass in ptrs to where data needs to go */
wined3ddesc
.
Format
=
(
WINED3DFORMAT
*
)
&
pDesc
->
F
ormat
;
wined3ddesc
.
Format
=
&
f
ormat
;
wined3ddesc
.
Type
=
(
WINED3DRESOURCETYPE
*
)
&
pDesc
->
Type
;
wined3ddesc
.
Usage
=
&
pDesc
->
Usage
;
wined3ddesc
.
Pool
=
(
WINED3DPOOL
*
)
&
pDesc
->
Pool
;
...
...
@@ -169,7 +171,11 @@ static HRESULT WINAPI IDirect3DVolumeTexture9Impl_GetLevelDesc(LPDIRECT3DVOLUMET
wined3ddesc
.
Height
=
&
pDesc
->
Height
;
wined3ddesc
.
Depth
=
&
pDesc
->
Depth
;
return
IWineD3DVolumeTexture_GetLevelDesc
(
This
->
wineD3DVolumeTexture
,
Level
,
&
wined3ddesc
);
hr
=
IWineD3DVolumeTexture_GetLevelDesc
(
This
->
wineD3DVolumeTexture
,
Level
,
&
wined3ddesc
);
if
(
SUCCEEDED
(
hr
))
pDesc
->
Format
=
d3dformat_from_wined3dformat
(
format
);
return
hr
;
}
static
HRESULT
WINAPI
IDirect3DVolumeTexture9Impl_GetVolumeLevel
(
LPDIRECT3DVOLUMETEXTURE9
iface
,
UINT
Level
,
IDirect3DVolume9
**
ppVolumeLevel
)
{
...
...
@@ -259,7 +265,8 @@ HRESULT WINAPI IDirect3DDevice9Impl_CreateVolumeTexture(LPDIRECT3DDEVICE9EX if
object
->
lpVtbl
=
&
Direct3DVolumeTexture9_Vtbl
;
object
->
ref
=
1
;
hrc
=
IWineD3DDevice_CreateVolumeTexture
(
This
->
WineD3DDevice
,
Width
,
Height
,
Depth
,
Levels
,
Usage
&
WINED3DUSAGE_MASK
,
Format
,
Pool
,
&
object
->
wineD3DVolumeTexture
,
pSharedHandle
,
(
IUnknown
*
)
object
);
Usage
&
WINED3DUSAGE_MASK
,
wined3dformat_from_d3dformat
(
Format
),
Pool
,
&
object
->
wineD3DVolumeTexture
,
pSharedHandle
,
(
IUnknown
*
)
object
);
if
(
hrc
!=
D3D_OK
)
{
/* free up object */
...
...
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