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
d575b5fe
Commit
d575b5fe
authored
Feb 19, 2009
by
Henri Verbeet
Committed by
Alexandre Julliard
Feb 20, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d8: Explicitly convert between D3DFORMAT and WINED3DFORMAT values.
parent
14f0e8ba
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
42 additions
and
12 deletions
+42
-12
cubetexture.c
dlls/d3d8/cubetexture.c
+3
-0
d3d8_private.h
dlls/d3d8/d3d8_private.h
+2
-0
device.c
dlls/d3d8/device.c
+0
-0
directx.c
dlls/d3d8/directx.c
+19
-12
indexbuffer.c
dlls/d3d8/indexbuffer.c
+3
-0
surface.c
dlls/d3d8/surface.c
+3
-0
texture.c
dlls/d3d8/texture.c
+3
-0
vertexbuffer.c
dlls/d3d8/vertexbuffer.c
+3
-0
volume.c
dlls/d3d8/volume.c
+3
-0
volumetexture.c
dlls/d3d8/volumetexture.c
+3
-0
No files found.
dlls/d3d8/cubetexture.c
View file @
d575b5fe
...
...
@@ -209,6 +209,9 @@ static HRESULT WINAPI IDirect3DCubeTexture8Impl_GetLevelDesc(LPDIRECT3DCUBETEXTU
EnterCriticalSection
(
&
d3d8_cs
);
hr
=
IWineD3DCubeTexture_GetLevelDesc
(
This
->
wineD3DCubeTexture
,
Level
,
&
wined3ddesc
);
LeaveCriticalSection
(
&
d3d8_cs
);
if
(
SUCCEEDED
(
hr
))
pDesc
->
Format
=
d3dformat_from_wined3dformat
(
pDesc
->
Format
);
return
hr
;
}
...
...
dlls/d3d8/d3d8_private.h
View file @
d575b5fe
...
...
@@ -622,6 +622,8 @@ typedef struct IDirect3DPixelShader8Impl {
*
* to see how not defined it here
*/
D3DFORMAT
d3dformat_from_wined3dformat
(
WINED3DFORMAT
format
);
WINED3DFORMAT
wined3dformat_from_d3dformat
(
D3DFORMAT
format
);
void
load_local_constants
(
const
DWORD
*
d3d8_elements
,
IWineD3DVertexShader
*
wined3d_vertex_shader
);
UINT
convert_to_wined3d_declaration
(
const
DWORD
*
d3d8_elements
,
DWORD
*
d3d8_elements_size
,
WINED3DVERTEXELEMENT
**
wined3d_elements
);
size_t
parse_token
(
const
DWORD
*
pToken
);
...
...
dlls/d3d8/device.c
View file @
d575b5fe
This diff is collapsed.
Click to expand it.
dlls/d3d8/directx.c
View file @
d575b5fe
...
...
@@ -147,6 +147,9 @@ static HRESULT WINAPI IDirect3D8Impl_EnumAdapterModes (LPDIRECT3D8 iface, UINT A
EnterCriticalSection
(
&
d3d8_cs
);
hr
=
IWineD3D_EnumAdapterModes
(
This
->
WineD3D
,
Adapter
,
WINED3DFMT_UNKNOWN
,
Mode
,
(
WINED3DDISPLAYMODE
*
)
pMode
);
LeaveCriticalSection
(
&
d3d8_cs
);
if
(
SUCCEEDED
(
hr
))
pMode
->
Format
=
d3dformat_from_wined3dformat
(
pMode
->
Format
);
return
hr
;
}
...
...
@@ -158,6 +161,9 @@ static HRESULT WINAPI IDirect3D8Impl_GetAdapterDisplayMode (LPDIRECT3D8 iface, U
EnterCriticalSection
(
&
d3d8_cs
);
hr
=
IWineD3D_GetAdapterDisplayMode
(
This
->
WineD3D
,
Adapter
,
(
WINED3DDISPLAYMODE
*
)
pMode
);
LeaveCriticalSection
(
&
d3d8_cs
);
if
(
SUCCEEDED
(
hr
))
pMode
->
Format
=
d3dformat_from_wined3dformat
(
pMode
->
Format
);
return
hr
;
}
...
...
@@ -169,8 +175,8 @@ static HRESULT WINAPI IDirect3D8Impl_CheckDeviceType (LPDIRECT3D8 i
TRACE
(
"(%p)->(%d, %d, %d, %d, %s)
\n
"
,
This
,
Adapter
,
CheckType
,
DisplayFormat
,
BackBufferFormat
,
Windowed
?
"true"
:
"false"
);
EnterCriticalSection
(
&
d3d8_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
(
&
d3d8_cs
);
return
hr
;
}
...
...
@@ -183,8 +189,8 @@ static HRESULT WINAPI IDirect3D8Impl_CheckDeviceFormat (LPDIRECT3D8 i
TRACE
(
"(%p)->(%d, %d, %d, %08x, %d, %d)
\n
"
,
This
,
Adapter
,
DeviceType
,
AdapterFormat
,
Usage
,
RType
,
CheckFormat
);
EnterCriticalSection
(
&
d3d8_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
(
&
d3d8_cs
);
return
hr
;
}
...
...
@@ -197,8 +203,8 @@ static HRESULT WINAPI IDirect3D8Impl_CheckDeviceMultiSampleType(LPDIRECT3D8 if
TRACE
(
"(%p)-<(%d, %d, %d, %s, %d)
\n
"
,
This
,
Adapter
,
DeviceType
,
SurfaceFormat
,
Windowed
?
"true"
:
"false"
,
MultiSampleType
);
EnterCriticalSection
(
&
d3d8_cs
);
hr
=
IWineD3D_CheckDeviceMultiSampleType
(
This
->
WineD3D
,
Adapter
,
DeviceType
,
SurfaceFormat
,
Windowed
,
(
WINED3DMULTISAMPLE_TYPE
)
MultiSampleType
,
NULL
);
hr
=
IWineD3D_CheckDeviceMultiSampleType
(
This
->
WineD3D
,
Adapter
,
DeviceType
,
wined3dformat_from_d3dformat
(
SurfaceFormat
),
Windowed
,
(
WINED3DMULTISAMPLE_TYPE
)
MultiSampleType
,
NULL
);
LeaveCriticalSection
(
&
d3d8_cs
);
return
hr
;
}
...
...
@@ -211,8 +217,9 @@ static HRESULT WINAPI IDirect3D8Impl_CheckDepthStencilMatch(LPDIRECT3D8 iface,
TRACE
(
"(%p)-<(%d, %d, %d, %d, %d)
\n
"
,
This
,
Adapter
,
DeviceType
,
AdapterFormat
,
RenderTargetFormat
,
DepthStencilFormat
);
EnterCriticalSection
(
&
d3d8_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
(
&
d3d8_cs
);
return
hr
;
}
...
...
@@ -336,7 +343,7 @@ static HRESULT WINAPI IDirect3D8Impl_CreateDevice(LPDIRECT3D8 iface, UINT Adapte
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
=
0
;
/* d3d9 only */
...
...
@@ -344,7 +351,7 @@ static HRESULT WINAPI IDirect3D8Impl_CreateDevice(LPDIRECT3D8 iface, UINT Adapte
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
->
FullScreen_PresentationInterval
;
...
...
@@ -359,14 +366,14 @@ static HRESULT WINAPI IDirect3D8Impl_CreateDevice(LPDIRECT3D8 iface, UINT Adapte
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
->
SwapEffect
=
localParameters
.
SwapEffect
;
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
->
FullScreen_PresentationInterval
=
localParameters
.
PresentationInterval
;
...
...
dlls/d3d8/indexbuffer.c
View file @
d575b5fe
...
...
@@ -183,6 +183,9 @@ static HRESULT WINAPI IDirect3DIndexBuffer8Impl_GetDesc(LPDIRECT3DINDEXBUFFER8 i
EnterCriticalSection
(
&
d3d8_cs
);
hr
=
IWineD3DIndexBuffer_GetDesc
(
This
->
wineD3DIndexBuffer
,
(
WINED3DINDEXBUFFER_DESC
*
)
pDesc
);
LeaveCriticalSection
(
&
d3d8_cs
);
if
(
SUCCEEDED
(
hr
))
pDesc
->
Format
=
d3dformat_from_wined3dformat
(
pDesc
->
Format
);
return
hr
;
}
...
...
dlls/d3d8/surface.c
View file @
d575b5fe
...
...
@@ -167,6 +167,9 @@ static HRESULT WINAPI IDirect3DSurface8Impl_GetDesc(LPDIRECT3DSURFACE8 iface, D3
EnterCriticalSection
(
&
d3d8_cs
);
hr
=
IWineD3DSurface_GetDesc
(
This
->
wineD3DSurface
,
&
wined3ddesc
);
LeaveCriticalSection
(
&
d3d8_cs
);
if
(
SUCCEEDED
(
hr
))
pDesc
->
Format
=
d3dformat_from_wined3dformat
(
pDesc
->
Format
);
return
hr
;
}
...
...
dlls/d3d8/texture.c
View file @
d575b5fe
...
...
@@ -208,6 +208,9 @@ static HRESULT WINAPI IDirect3DTexture8Impl_GetLevelDesc(LPDIRECT3DTEXTURE8 ifac
EnterCriticalSection
(
&
d3d8_cs
);
hr
=
IWineD3DTexture_GetLevelDesc
(
This
->
wineD3DTexture
,
Level
,
&
wined3ddesc
);
LeaveCriticalSection
(
&
d3d8_cs
);
if
(
SUCCEEDED
(
hr
))
pDesc
->
Format
=
d3dformat_from_wined3dformat
(
pDesc
->
Format
);
return
hr
;
}
...
...
dlls/d3d8/vertexbuffer.c
View file @
d575b5fe
...
...
@@ -185,6 +185,9 @@ static HRESULT WINAPI IDirect3DVertexBuffer8Impl_GetDesc(LPDIRECT3DVERTEXBUFFER8
EnterCriticalSection
(
&
d3d8_cs
);
hr
=
IWineD3DVertexBuffer_GetDesc
(
This
->
wineD3DVertexBuffer
,
(
WINED3DVERTEXBUFFER_DESC
*
)
pDesc
);
LeaveCriticalSection
(
&
d3d8_cs
);
if
(
SUCCEEDED
(
hr
))
pDesc
->
Format
=
d3dformat_from_wined3dformat
(
pDesc
->
Format
);
return
hr
;
}
...
...
dlls/d3d8/volume.c
View file @
d575b5fe
...
...
@@ -167,6 +167,9 @@ static HRESULT WINAPI IDirect3DVolume8Impl_GetDesc(LPDIRECT3DVOLUME8 iface, D3DV
EnterCriticalSection
(
&
d3d8_cs
);
hr
=
IWineD3DVolume_GetDesc
(
This
->
wineD3DVolume
,
&
wined3ddesc
);
LeaveCriticalSection
(
&
d3d8_cs
);
if
(
SUCCEEDED
(
hr
))
pDesc
->
Format
=
d3dformat_from_wined3dformat
(
pDesc
->
Format
);
return
hr
;
}
...
...
dlls/d3d8/volumetexture.c
View file @
d575b5fe
...
...
@@ -209,6 +209,9 @@ static HRESULT WINAPI IDirect3DVolumeTexture8Impl_GetLevelDesc(LPDIRECT3DVOLUMET
EnterCriticalSection
(
&
d3d8_cs
);
hr
=
IWineD3DVolumeTexture_GetLevelDesc
(
This
->
wineD3DVolumeTexture
,
Level
,
&
wined3ddesc
);
LeaveCriticalSection
(
&
d3d8_cs
);
if
(
SUCCEEDED
(
hr
))
pDesc
->
Format
=
d3dformat_from_wined3dformat
(
pDesc
->
Format
);
return
hr
;
}
...
...
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