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
cc5271d1
Commit
cc5271d1
authored
Aug 23, 2010
by
Henri Verbeet
Committed by
Alexandre Julliard
Aug 24, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Rename WINED3DFORMAT to wined3d_format_id.
parent
0df14416
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
33 changed files
with
272 additions
and
243 deletions
+272
-243
d3d10core_private.h
dlls/d3d10core/d3d10core_private.h
+2
-2
device.c
dlls/d3d10core/device.c
+8
-6
utils.c
dlls/d3d10core/utils.c
+3
-3
d3d8_private.h
dlls/d3d8/d3d8_private.h
+4
-9
device.c
dlls/d3d8/device.c
+12
-10
vertexdeclaration.c
dlls/d3d8/vertexdeclaration.c
+1
-1
volume.c
dlls/d3d8/volume.c
+1
-1
d3d9_private.h
dlls/d3d9/d3d9_private.h
+4
-4
device.c
dlls/d3d9/device.c
+11
-9
vertexdeclaration.c
dlls/d3d9/vertexdeclaration.c
+1
-1
volume.c
dlls/d3d9/volume.c
+1
-1
ddraw.c
dlls/ddraw/ddraw.c
+14
-12
ddraw_private.h
dlls/ddraw/ddraw_private.h
+2
-2
device.c
dlls/ddraw/device.c
+6
-6
surface.c
dlls/ddraw/surface.c
+2
-2
utils.c
dlls/ddraw/utils.c
+7
-9
dxgi_private.h
dlls/dxgi/dxgi_private.h
+1
-1
output.c
dlls/dxgi/output.c
+1
-1
utils.c
dlls/dxgi/utils.c
+1
-1
buffer.c
dlls/wined3d/buffer.c
+4
-4
cubetexture.c
dlls/wined3d/cubetexture.c
+4
-4
device.c
dlls/wined3d/device.c
+9
-9
directx.c
dlls/wined3d/directx.c
+40
-29
drawprim.c
dlls/wined3d/drawprim.c
+2
-1
surface.c
dlls/wined3d/surface.c
+5
-4
surface_base.c
dlls/wined3d/surface_base.c
+11
-8
swapchain.c
dlls/wined3d/swapchain.c
+1
-1
texture.c
dlls/wined3d/texture.c
+3
-3
utils.c
dlls/wined3d/utils.c
+55
-44
volume.c
dlls/wined3d/volume.c
+2
-2
volumetexture.c
dlls/wined3d/volumetexture.c
+4
-4
wined3d_private.h
dlls/wined3d/wined3d_private.h
+16
-15
wined3d.idl
include/wine/wined3d.idl
+34
-34
No files found.
dlls/d3d10core/d3d10core_private.h
View file @
cc5271d1
...
...
@@ -52,8 +52,8 @@ struct d3d10_shader_info
const
char
*
debug_d3d10_primitive_topology
(
D3D10_PRIMITIVE_TOPOLOGY
topology
)
DECLSPEC_HIDDEN
;
const
char
*
debug_dxgi_format
(
DXGI_FORMAT
format
)
DECLSPEC_HIDDEN
;
DXGI_FORMAT
dxgi_format_from_wined3dformat
(
WINED3DFORMAT
format
)
DECLSPEC_HIDDEN
;
WINED3DFORMAT
wined3dformat_from_dxgi_format
(
DXGI_FORMAT
format
)
DECLSPEC_HIDDEN
;
DXGI_FORMAT
dxgi_format_from_wined3dformat
(
enum
wined3d_format_id
format
)
DECLSPEC_HIDDEN
;
enum
wined3d_format_id
wined3dformat_from_dxgi_format
(
DXGI_FORMAT
format
)
DECLSPEC_HIDDEN
;
static
inline
void
read_dword
(
const
char
**
ptr
,
DWORD
*
d
)
{
...
...
dlls/d3d10core/device.c
View file @
cc5271d1
...
...
@@ -1291,7 +1291,7 @@ static void STDMETHODCALLTYPE device_parent_WineD3DDeviceCreated(IWineD3DDeviceP
}
static
HRESULT
STDMETHODCALLTYPE
device_parent_CreateSurface
(
IWineD3DDeviceParent
*
iface
,
IUnknown
*
superior
,
UINT
width
,
UINT
height
,
WINED3DFORMAT
format
,
DWORD
usage
,
IUnknown
*
superior
,
UINT
width
,
UINT
height
,
enum
wined3d_format_id
format
,
DWORD
usage
,
WINED3DPOOL
pool
,
UINT
level
,
WINED3DCUBEMAP_FACES
face
,
IWineD3DSurface
**
surface
)
{
struct
d3d10_device
*
This
=
device_from_device_parent
(
iface
);
...
...
@@ -1332,8 +1332,9 @@ static HRESULT STDMETHODCALLTYPE device_parent_CreateSurface(IWineD3DDeviceParen
}
static
HRESULT
STDMETHODCALLTYPE
device_parent_CreateRenderTarget
(
IWineD3DDeviceParent
*
iface
,
IUnknown
*
superior
,
UINT
width
,
UINT
height
,
WINED3DFORMAT
format
,
WINED3DMULTISAMPLE_TYPE
multisample_type
,
DWORD
multisample_quality
,
BOOL
lockable
,
IWineD3DSurface
**
surface
)
IUnknown
*
superior
,
UINT
width
,
UINT
height
,
enum
wined3d_format_id
format
,
WINED3DMULTISAMPLE_TYPE
multisample_type
,
DWORD
multisample_quality
,
BOOL
lockable
,
IWineD3DSurface
**
surface
)
{
struct
d3d10_device
*
This
=
device_from_device_parent
(
iface
);
struct
d3d10_texture2d
*
texture
;
...
...
@@ -1373,8 +1374,9 @@ static HRESULT STDMETHODCALLTYPE device_parent_CreateRenderTarget(IWineD3DDevice
}
static
HRESULT
STDMETHODCALLTYPE
device_parent_CreateDepthStencilSurface
(
IWineD3DDeviceParent
*
iface
,
IUnknown
*
superior
,
UINT
width
,
UINT
height
,
WINED3DFORMAT
format
,
WINED3DMULTISAMPLE_TYPE
multisample_type
,
DWORD
multisample_quality
,
BOOL
discard
,
IWineD3DSurface
**
surface
)
IUnknown
*
superior
,
UINT
width
,
UINT
height
,
enum
wined3d_format_id
format
,
WINED3DMULTISAMPLE_TYPE
multisample_type
,
DWORD
multisample_quality
,
BOOL
discard
,
IWineD3DSurface
**
surface
)
{
struct
d3d10_device
*
This
=
device_from_device_parent
(
iface
);
struct
d3d10_texture2d
*
texture
;
...
...
@@ -1414,7 +1416,7 @@ static HRESULT STDMETHODCALLTYPE device_parent_CreateDepthStencilSurface(IWineD3
}
static
HRESULT
STDMETHODCALLTYPE
device_parent_CreateVolume
(
IWineD3DDeviceParent
*
iface
,
IUnknown
*
superior
,
UINT
width
,
UINT
height
,
UINT
depth
,
WINED3DFORMAT
format
,
IUnknown
*
superior
,
UINT
width
,
UINT
height
,
UINT
depth
,
enum
wined3d_format_id
format
,
WINED3DPOOL
pool
,
DWORD
usage
,
IWineD3DVolume
**
volume
)
{
FIXME
(
"iface %p, superior %p, width %u, height %u, depth %u, format %#x, pool %#x, usage %#x, volume %p stub!
\n
"
,
...
...
dlls/d3d10core/utils.c
View file @
cc5271d1
...
...
@@ -147,7 +147,7 @@ const char *debug_dxgi_format(DXGI_FORMAT format)
#undef WINE_D3D10_TO_STR
DXGI_FORMAT
dxgi_format_from_wined3dformat
(
WINED3DFORMAT
format
)
DXGI_FORMAT
dxgi_format_from_wined3dformat
(
enum
wined3d_format_id
format
)
{
switch
(
format
)
{
...
...
@@ -241,12 +241,12 @@ DXGI_FORMAT dxgi_format_from_wined3dformat(WINED3DFORMAT format)
case
WINED3DFMT_B8G8R8A8_UNORM
:
return
DXGI_FORMAT_B8G8R8A8_UNORM
;
case
WINED3DFMT_B8G8R8X8_UNORM
:
return
DXGI_FORMAT_B8G8R8X8_UNORM
;
default:
FIXME
(
"Unhandled
WINED3DFORMAT %#x
\n
"
,
format
);
FIXME
(
"Unhandled
wined3d format %#x.
\n
"
,
format
);
return
WINED3DFMT_UNKNOWN
;
}
}
WINED3DFORMAT
wined3dformat_from_dxgi_format
(
DXGI_FORMAT
format
)
enum
wined3d_format_id
wined3dformat_from_dxgi_format
(
DXGI_FORMAT
format
)
{
switch
(
format
)
{
...
...
dlls/d3d8/d3d8_private.h
View file @
cc5271d1
...
...
@@ -220,7 +220,7 @@ struct IDirect3DVolume8Impl
};
HRESULT
volume_init
(
IDirect3DVolume8Impl
*
volume
,
IDirect3DDevice8Impl
*
device
,
UINT
width
,
UINT
height
,
UINT
depth
,
DWORD
usage
,
WINED3DFORMAT
format
,
WINED3DPOOL
pool
)
DECLSPEC_HIDDEN
;
UINT
depth
,
DWORD
usage
,
enum
wined3d_format_id
format
,
WINED3DPOOL
pool
)
DECLSPEC_HIDDEN
;
/* ------------------- */
/* IDirect3DSwapChain8 */
...
...
@@ -329,7 +329,7 @@ struct IDirect3DIndexBuffer8Impl
/* Parent reference */
LPDIRECT3DDEVICE8
parentDevice
;
WINED3DFORMAT
format
;
enum
wined3d_format_id
format
;
};
HRESULT
indexbuffer_init
(
IDirect3DIndexBuffer8Impl
*
buffer
,
IDirect3DDevice8Impl
*
device
,
...
...
@@ -535,13 +535,8 @@ typedef struct IDirect3DPixelShader8Impl {
HRESULT
pixelshader_init
(
IDirect3DPixelShader8Impl
*
shader
,
IDirect3DDevice8Impl
*
device
,
const
DWORD
*
byte_code
,
DWORD
shader_handle
)
DECLSPEC_HIDDEN
;
/**
* Internals functions
*
* to see how not defined it here
*/
D3DFORMAT
d3dformat_from_wined3dformat
(
WINED3DFORMAT
format
)
DECLSPEC_HIDDEN
;
WINED3DFORMAT
wined3dformat_from_d3dformat
(
D3DFORMAT
format
)
DECLSPEC_HIDDEN
;
D3DFORMAT
d3dformat_from_wined3dformat
(
enum
wined3d_format_id
format
)
DECLSPEC_HIDDEN
;
enum
wined3d_format_id
wined3dformat_from_d3dformat
(
D3DFORMAT
format
)
DECLSPEC_HIDDEN
;
void
load_local_constants
(
const
DWORD
*
d3d8_elements
,
IWineD3DVertexShader
*
wined3d_vertex_shader
)
DECLSPEC_HIDDEN
;
size_t
parse_token
(
const
DWORD
*
pToken
)
DECLSPEC_HIDDEN
;
...
...
dlls/d3d8/device.c
View file @
cc5271d1
...
...
@@ -36,7 +36,7 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
d3d8
);
D3DFORMAT
d3dformat_from_wined3dformat
(
WINED3DFORMAT
format
)
D3DFORMAT
d3dformat_from_wined3dformat
(
enum
wined3d_format_id
format
)
{
BYTE
*
c
=
(
BYTE
*
)
&
format
;
...
...
@@ -82,12 +82,12 @@ D3DFORMAT d3dformat_from_wined3dformat(WINED3DFORMAT format)
case
WINED3DFMT_R16_UINT
:
return
D3DFMT_INDEX16
;
case
WINED3DFMT_R32_UINT
:
return
D3DFMT_INDEX32
;
default:
FIXME
(
"Unhandled
WINED3DFORMAT %#x
\n
"
,
format
);
FIXME
(
"Unhandled
wined3d format %#x.
\n
"
,
format
);
return
D3DFMT_UNKNOWN
;
}
}
WINED3DFORMAT
wined3dformat_from_d3dformat
(
D3DFORMAT
format
)
enum
wined3d_format_id
wined3dformat_from_d3dformat
(
D3DFORMAT
format
)
{
BYTE
*
c
=
(
BYTE
*
)
&
format
;
...
...
@@ -879,7 +879,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_CopyRects(LPDIRECT3DDEVICE8 iface, ID
IDirect3DSurface8Impl
*
Dest
=
(
IDirect3DSurface8Impl
*
)
pDestinationSurface
;
HRESULT
hr
=
WINED3D_OK
;
WINED3DFORMAT
srcFormat
,
destFormat
;
enum
wined3d_format_id
srcFormat
,
destFormat
;
WINED3DSURFACE_DESC
winedesc
;
TRACE
(
"iface %p, src_surface %p, src_rects %p, rect_count %u, dst_surface %p, dst_points %p.
\n
"
,
...
...
@@ -2555,7 +2555,7 @@ static void STDMETHODCALLTYPE device_parent_WineD3DDeviceCreated(IWineD3DDeviceP
}
static
HRESULT
STDMETHODCALLTYPE
device_parent_CreateSurface
(
IWineD3DDeviceParent
*
iface
,
IUnknown
*
superior
,
UINT
width
,
UINT
height
,
WINED3DFORMAT
format
,
DWORD
usage
,
IUnknown
*
superior
,
UINT
width
,
UINT
height
,
enum
wined3d_format_id
format
,
DWORD
usage
,
WINED3DPOOL
pool
,
UINT
level
,
WINED3DCUBEMAP_FACES
face
,
IWineD3DSurface
**
surface
)
{
struct
IDirect3DDevice8Impl
*
This
=
device_from_device_parent
(
iface
);
...
...
@@ -2593,8 +2593,9 @@ static HRESULT STDMETHODCALLTYPE device_parent_CreateSurface(IWineD3DDeviceParen
}
static
HRESULT
STDMETHODCALLTYPE
device_parent_CreateRenderTarget
(
IWineD3DDeviceParent
*
iface
,
IUnknown
*
superior
,
UINT
width
,
UINT
height
,
WINED3DFORMAT
format
,
WINED3DMULTISAMPLE_TYPE
multisample_type
,
DWORD
multisample_quality
,
BOOL
lockable
,
IWineD3DSurface
**
surface
)
IUnknown
*
superior
,
UINT
width
,
UINT
height
,
enum
wined3d_format_id
format
,
WINED3DMULTISAMPLE_TYPE
multisample_type
,
DWORD
multisample_quality
,
BOOL
lockable
,
IWineD3DSurface
**
surface
)
{
struct
IDirect3DDevice8Impl
*
This
=
device_from_device_parent
(
iface
);
IDirect3DSurface8Impl
*
d3d_surface
;
...
...
@@ -2623,8 +2624,9 @@ static HRESULT STDMETHODCALLTYPE device_parent_CreateRenderTarget(IWineD3DDevice
}
static
HRESULT
STDMETHODCALLTYPE
device_parent_CreateDepthStencilSurface
(
IWineD3DDeviceParent
*
iface
,
IUnknown
*
superior
,
UINT
width
,
UINT
height
,
WINED3DFORMAT
format
,
WINED3DMULTISAMPLE_TYPE
multisample_type
,
DWORD
multisample_quality
,
BOOL
discard
,
IWineD3DSurface
**
surface
)
IUnknown
*
superior
,
UINT
width
,
UINT
height
,
enum
wined3d_format_id
format
,
WINED3DMULTISAMPLE_TYPE
multisample_type
,
DWORD
multisample_quality
,
BOOL
discard
,
IWineD3DSurface
**
surface
)
{
struct
IDirect3DDevice8Impl
*
This
=
device_from_device_parent
(
iface
);
IDirect3DSurface8Impl
*
d3d_surface
;
...
...
@@ -2653,7 +2655,7 @@ static HRESULT STDMETHODCALLTYPE device_parent_CreateDepthStencilSurface(IWineD3
}
static
HRESULT
STDMETHODCALLTYPE
device_parent_CreateVolume
(
IWineD3DDeviceParent
*
iface
,
IUnknown
*
superior
,
UINT
width
,
UINT
height
,
UINT
depth
,
WINED3DFORMAT
format
,
IUnknown
*
superior
,
UINT
width
,
UINT
height
,
UINT
depth
,
enum
wined3d_format_id
format
,
WINED3DPOOL
pool
,
DWORD
usage
,
IWineD3DVolume
**
volume
)
{
struct
IDirect3DDevice8Impl
*
This
=
device_from_device_parent
(
iface
);
...
...
dlls/d3d8/vertexdeclaration.c
View file @
cc5271d1
...
...
@@ -254,7 +254,7 @@ static const size_t wined3d_type_sizes[] =
/*WINED3DDECLTYPE_FLOAT16_4*/
4
*
sizeof
(
short
int
)
};
static
const
WINED3DFORMAT
wined3d_format_lookup
[]
=
static
const
enum
wined3d_format_id
wined3d_format_lookup
[]
=
{
/*WINED3DDECLTYPE_FLOAT1*/
WINED3DFMT_R32_FLOAT
,
/*WINED3DDECLTYPE_FLOAT2*/
WINED3DFMT_R32G32_FLOAT
,
...
...
dlls/d3d8/volume.c
View file @
cc5271d1
...
...
@@ -256,7 +256,7 @@ static const struct wined3d_parent_ops d3d8_volume_wined3d_parent_ops =
};
HRESULT
volume_init
(
IDirect3DVolume8Impl
*
volume
,
IDirect3DDevice8Impl
*
device
,
UINT
width
,
UINT
height
,
UINT
depth
,
DWORD
usage
,
WINED3DFORMAT
format
,
WINED3DPOOL
pool
)
UINT
depth
,
DWORD
usage
,
enum
wined3d_format_id
format
,
WINED3DPOOL
pool
)
{
HRESULT
hr
;
...
...
dlls/d3d9/d3d9_private.h
View file @
cc5271d1
...
...
@@ -42,8 +42,8 @@
Internal use
=========================================================================== */
extern
HRESULT
vdecl_convert_fvf
(
DWORD
FVF
,
D3DVERTEXELEMENT9
**
ppVertexElements
)
DECLSPEC_HIDDEN
;
D3DFORMAT
d3dformat_from_wined3dformat
(
WINED3DFORMAT
format
)
DECLSPEC_HIDDEN
;
WINED3DFORMAT
wined3dformat_from_d3dformat
(
D3DFORMAT
format
)
DECLSPEC_HIDDEN
;
D3DFORMAT
d3dformat_from_wined3dformat
(
enum
wined3d_format_id
format
)
DECLSPEC_HIDDEN
;
enum
wined3d_format_id
wined3dformat_from_d3dformat
(
D3DFORMAT
format
)
DECLSPEC_HIDDEN
;
/* ===========================================================================
Macros
...
...
@@ -248,7 +248,7 @@ typedef struct IDirect3DVolume9Impl
}
IDirect3DVolume9Impl
;
HRESULT
volume_init
(
IDirect3DVolume9Impl
*
volume
,
IDirect3DDevice9Impl
*
device
,
UINT
width
,
UINT
height
,
UINT
depth
,
DWORD
usage
,
WINED3DFORMAT
format
,
WINED3DPOOL
pool
)
DECLSPEC_HIDDEN
;
UINT
depth
,
DWORD
usage
,
enum
wined3d_format_id
format
,
WINED3DPOOL
pool
)
DECLSPEC_HIDDEN
;
/* ------------------- */
/* IDirect3DSwapChain9 */
...
...
@@ -351,7 +351,7 @@ typedef struct IDirect3DIndexBuffer9Impl
/* Parent reference */
LPDIRECT3DDEVICE9EX
parentDevice
;
WINED3DFORMAT
format
;
enum
wined3d_format_id
format
;
}
IDirect3DIndexBuffer9Impl
;
HRESULT
indexbuffer_init
(
IDirect3DIndexBuffer9Impl
*
buffer
,
IDirect3DDevice9Impl
*
device
,
...
...
dlls/d3d9/device.c
View file @
cc5271d1
...
...
@@ -25,7 +25,7 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
d3d9
);
D3DFORMAT
d3dformat_from_wined3dformat
(
WINED3DFORMAT
format
)
D3DFORMAT
d3dformat_from_wined3dformat
(
enum
wined3d_format_id
format
)
{
BYTE
*
c
=
(
BYTE
*
)
&
format
;
...
...
@@ -85,12 +85,12 @@ D3DFORMAT d3dformat_from_wined3dformat(WINED3DFORMAT format)
case
WINED3DFMT_R32G32B32A32_FLOAT
:
return
D3DFMT_A32B32G32R32F
;
case
WINED3DFMT_R8G8_SNORM_Cx
:
return
D3DFMT_CxV8U8
;
default:
FIXME
(
"Unhandled
WINED3DFORMAT %#x
\n
"
,
format
);
FIXME
(
"Unhandled
wined3d format %#x.
\n
"
,
format
);
return
D3DFMT_UNKNOWN
;
}
}
WINED3DFORMAT
wined3dformat_from_d3dformat
(
D3DFORMAT
format
)
enum
wined3d_format_id
wined3dformat_from_d3dformat
(
D3DFORMAT
format
)
{
BYTE
*
c
=
(
BYTE
*
)
&
format
;
...
...
@@ -2619,7 +2619,7 @@ static void STDMETHODCALLTYPE device_parent_WineD3DDeviceCreated(IWineD3DDeviceP
}
static
HRESULT
STDMETHODCALLTYPE
device_parent_CreateSurface
(
IWineD3DDeviceParent
*
iface
,
IUnknown
*
superior
,
UINT
width
,
UINT
height
,
WINED3DFORMAT
format
,
DWORD
usage
,
IUnknown
*
superior
,
UINT
width
,
UINT
height
,
enum
wined3d_format_id
format
,
DWORD
usage
,
WINED3DPOOL
pool
,
UINT
level
,
WINED3DCUBEMAP_FACES
face
,
IWineD3DSurface
**
surface
)
{
struct
IDirect3DDevice9Impl
*
This
=
device_from_device_parent
(
iface
);
...
...
@@ -2657,8 +2657,9 @@ static HRESULT STDMETHODCALLTYPE device_parent_CreateSurface(IWineD3DDeviceParen
}
static
HRESULT
STDMETHODCALLTYPE
device_parent_CreateRenderTarget
(
IWineD3DDeviceParent
*
iface
,
IUnknown
*
superior
,
UINT
width
,
UINT
height
,
WINED3DFORMAT
format
,
WINED3DMULTISAMPLE_TYPE
multisample_type
,
DWORD
multisample_quality
,
BOOL
lockable
,
IWineD3DSurface
**
surface
)
IUnknown
*
superior
,
UINT
width
,
UINT
height
,
enum
wined3d_format_id
format
,
WINED3DMULTISAMPLE_TYPE
multisample_type
,
DWORD
multisample_quality
,
BOOL
lockable
,
IWineD3DSurface
**
surface
)
{
struct
IDirect3DDevice9Impl
*
This
=
device_from_device_parent
(
iface
);
IDirect3DSurface9Impl
*
d3d_surface
;
...
...
@@ -2688,8 +2689,9 @@ static HRESULT STDMETHODCALLTYPE device_parent_CreateRenderTarget(IWineD3DDevice
}
static
HRESULT
STDMETHODCALLTYPE
device_parent_CreateDepthStencilSurface
(
IWineD3DDeviceParent
*
iface
,
IUnknown
*
superior
,
UINT
width
,
UINT
height
,
WINED3DFORMAT
format
,
WINED3DMULTISAMPLE_TYPE
multisample_type
,
DWORD
multisample_quality
,
BOOL
discard
,
IWineD3DSurface
**
surface
)
IUnknown
*
superior
,
UINT
width
,
UINT
height
,
enum
wined3d_format_id
format
,
WINED3DMULTISAMPLE_TYPE
multisample_type
,
DWORD
multisample_quality
,
BOOL
discard
,
IWineD3DSurface
**
surface
)
{
struct
IDirect3DDevice9Impl
*
This
=
device_from_device_parent
(
iface
);
IDirect3DSurface9Impl
*
d3d_surface
;
...
...
@@ -2718,7 +2720,7 @@ static HRESULT STDMETHODCALLTYPE device_parent_CreateDepthStencilSurface(IWineD3
}
static
HRESULT
STDMETHODCALLTYPE
device_parent_CreateVolume
(
IWineD3DDeviceParent
*
iface
,
IUnknown
*
superior
,
UINT
width
,
UINT
height
,
UINT
depth
,
WINED3DFORMAT
format
,
IUnknown
*
superior
,
UINT
width
,
UINT
height
,
UINT
depth
,
enum
wined3d_format_id
format
,
WINED3DPOOL
pool
,
DWORD
usage
,
IWineD3DVolume
**
volume
)
{
struct
IDirect3DDevice9Impl
*
This
=
device_from_device_parent
(
iface
);
...
...
dlls/d3d9/vertexdeclaration.c
View file @
cc5271d1
...
...
@@ -26,7 +26,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d9);
typedef
struct
_D3DDECLTYPE_INFO
{
D3DDECLTYPE
d3dType
;
WINED3DFORMAT
format
;
enum
wined3d_format_id
format
;
int
size
;
int
typesize
;
}
D3DDECLTYPE_INFO
;
...
...
dlls/d3d9/volume.c
View file @
cc5271d1
...
...
@@ -267,7 +267,7 @@ static const struct wined3d_parent_ops d3d9_volume_wined3d_parent_ops =
};
HRESULT
volume_init
(
IDirect3DVolume9Impl
*
volume
,
IDirect3DDevice9Impl
*
device
,
UINT
width
,
UINT
height
,
UINT
depth
,
DWORD
usage
,
WINED3DFORMAT
format
,
WINED3DPOOL
pool
)
UINT
depth
,
DWORD
usage
,
enum
wined3d_format_id
format
,
WINED3DPOOL
pool
)
{
HRESULT
hr
;
...
...
dlls/ddraw/ddraw.c
View file @
cc5271d1
...
...
@@ -1255,7 +1255,7 @@ static HRESULT WINAPI ddraw1_GetDisplayMode(IDirectDraw *iface, DDSURFACEDESC *s
static
HRESULT
WINAPI
ddraw7_GetFourCCCodes
(
IDirectDraw7
*
iface
,
DWORD
*
NumCodes
,
DWORD
*
Codes
)
{
IDirectDrawImpl
*
This
=
(
IDirectDrawImpl
*
)
iface
;
static
const
WINED3DFORMAT
formats
[]
=
static
const
enum
wined3d_format_id
formats
[]
=
{
WINED3DFMT_YUY2
,
WINED3DFMT_UYVY
,
WINED3DFMT_YV12
,
WINED3DFMT_DXT1
,
WINED3DFMT_DXT2
,
WINED3DFMT_DXT3
,
WINED3DFMT_DXT4
,
WINED3DFMT_DXT5
,
...
...
@@ -1943,13 +1943,13 @@ static HRESULT WINAPI ddraw7_EnumDisplayModes(IDirectDraw7 *iface, DWORD Flags,
{
IDirectDrawImpl
*
This
=
(
IDirectDrawImpl
*
)
iface
;
unsigned
int
modenum
,
fmt
;
WINED3DFORMAT
pixelformat
=
WINED3DFMT_UNKNOWN
;
enum
wined3d_format_id
pixelformat
=
WINED3DFMT_UNKNOWN
;
WINED3DDISPLAYMODE
mode
;
DDSURFACEDESC2
callback_sd
;
WINED3DDISPLAYMODE
*
enum_modes
=
NULL
;
unsigned
enum_mode_count
=
0
,
enum_mode_array_size
=
0
;
static
const
WINED3DFORMAT
checkFormatList
[]
=
static
const
enum
wined3d_format_id
checkFormatList
[]
=
{
WINED3DFMT_B8G8R8X8_UNORM
,
WINED3DFMT_B5G6R5_UNORM
,
...
...
@@ -2366,7 +2366,7 @@ HRESULT WINAPI ddraw_recreate_surfaces_cb(IDirectDrawSurface7 *surf, DDSURFACEDE
IWineD3DClipper
*
clipper
=
NULL
;
WINED3DSURFACE_DESC
Desc
;
WINED3DFORMAT
Format
;
enum
wined3d_format_id
Format
;
DWORD
Usage
;
WINED3DPOOL
Pool
;
...
...
@@ -3263,8 +3263,8 @@ static HRESULT WINAPI ddraw7_CreateSurface(IDirectDraw7 *iface,
/* Create a WineD3DTexture if a texture was requested */
if
(
desc2
.
ddsCaps
.
dwCaps
&
DDSCAPS_TEXTURE
)
{
enum
wined3d_format_id
Format
;
UINT
levels
;
WINED3DFORMAT
Format
;
WINED3DPOOL
Pool
=
WINED3DPOOL_DEFAULT
;
This
->
tex_root
=
object
;
...
...
@@ -4675,7 +4675,7 @@ static HRESULT WINAPI d3d7_EnumZBufferFormats(IDirect3D7 *iface, REFCLSID device
/* Order matters. Specifically, BattleZone II (full version) expects the
* 16-bit depth formats to be listed before the 24 and 32 ones. */
static
const
WINED3DFORMAT
formats
[]
=
static
const
enum
wined3d_format_id
formats
[]
=
{
WINED3DFMT_S1_UINT_D15_UNORM
,
WINED3DFMT_D16_UNORM
,
...
...
@@ -5434,7 +5434,7 @@ static void STDMETHODCALLTYPE device_parent_WineD3DDeviceCreated(IWineD3DDeviceP
}
static
HRESULT
STDMETHODCALLTYPE
device_parent_CreateSurface
(
IWineD3DDeviceParent
*
iface
,
IUnknown
*
superior
,
UINT
width
,
UINT
height
,
WINED3DFORMAT
format
,
DWORD
usage
,
IUnknown
*
superior
,
UINT
width
,
UINT
height
,
enum
wined3d_format_id
format
,
DWORD
usage
,
WINED3DPOOL
pool
,
UINT
level
,
WINED3DCUBEMAP_FACES
face
,
IWineD3DSurface
**
surface
)
{
struct
IDirectDrawImpl
*
This
=
ddraw_from_device_parent
(
iface
);
...
...
@@ -5525,8 +5525,9 @@ static HRESULT WINAPI findRenderTarget(IDirectDrawSurface7 *surface, DDSURFACEDE
}
static
HRESULT
STDMETHODCALLTYPE
device_parent_CreateRenderTarget
(
IWineD3DDeviceParent
*
iface
,
IUnknown
*
superior
,
UINT
width
,
UINT
height
,
WINED3DFORMAT
format
,
WINED3DMULTISAMPLE_TYPE
multisample_type
,
DWORD
multisample_quality
,
BOOL
lockable
,
IWineD3DSurface
**
surface
)
IUnknown
*
superior
,
UINT
width
,
UINT
height
,
enum
wined3d_format_id
format
,
WINED3DMULTISAMPLE_TYPE
multisample_type
,
DWORD
multisample_quality
,
BOOL
lockable
,
IWineD3DSurface
**
surface
)
{
struct
IDirectDrawImpl
*
This
=
ddraw_from_device_parent
(
iface
);
IDirectDrawSurfaceImpl
*
d3d_surface
=
This
->
d3d_target
;
...
...
@@ -5563,8 +5564,9 @@ static HRESULT STDMETHODCALLTYPE device_parent_CreateRenderTarget(IWineD3DDevice
}
static
HRESULT
STDMETHODCALLTYPE
device_parent_CreateDepthStencilSurface
(
IWineD3DDeviceParent
*
iface
,
IUnknown
*
superior
,
UINT
width
,
UINT
height
,
WINED3DFORMAT
format
,
WINED3DMULTISAMPLE_TYPE
multisample_type
,
DWORD
multisample_quality
,
BOOL
discard
,
IWineD3DSurface
**
surface
)
IUnknown
*
superior
,
UINT
width
,
UINT
height
,
enum
wined3d_format_id
format
,
WINED3DMULTISAMPLE_TYPE
multisample_type
,
DWORD
multisample_quality
,
BOOL
discard
,
IWineD3DSurface
**
surface
)
{
struct
IDirectDrawImpl
*
This
=
ddraw_from_device_parent
(
iface
);
IDirectDrawSurfaceImpl
*
ddraw_surface
;
...
...
@@ -5611,7 +5613,7 @@ static HRESULT STDMETHODCALLTYPE device_parent_CreateDepthStencilSurface(IWineD3
}
static
HRESULT
STDMETHODCALLTYPE
device_parent_CreateVolume
(
IWineD3DDeviceParent
*
iface
,
IUnknown
*
superior
,
UINT
width
,
UINT
height
,
UINT
depth
,
WINED3DFORMAT
format
,
IUnknown
*
superior
,
UINT
width
,
UINT
height
,
UINT
depth
,
enum
wined3d_format_id
format
,
WINED3DPOOL
pool
,
DWORD
usage
,
IWineD3DVolume
**
volume
)
{
TRACE
(
"iface %p, superior %p, width %u, height %u, depth %u, format %#x, pool %#x, usage %#x, volume %p
\n
"
,
...
...
dlls/ddraw/ddraw_private.h
View file @
cc5271d1
...
...
@@ -641,8 +641,8 @@ static inline IDirect3DVertexBufferImpl *vb_from_vb1(IDirect3DVertexBuffer *ifac
#define GET_TEXCOORD_SIZE_FROM_FVF(d3dvtVertexType, tex_num) \
(((((d3dvtVertexType) >> (16 + (2 * (tex_num)))) + 1) & 0x03) + 1)
void
PixelFormat_WineD3DtoDD
(
DDPIXELFORMAT
*
DDPixelFormat
,
WINED3DFORMAT
WineD3DFormat
)
DECLSPEC_HIDDEN
;
WINED3DFORMAT
PixelFormat_DD2WineD3D
(
const
DDPIXELFORMAT
*
DDPixelFormat
)
DECLSPEC_HIDDEN
;
void
PixelFormat_WineD3DtoDD
(
DDPIXELFORMAT
*
DDPixelFormat
,
enum
wined3d_format_id
WineD3DFormat
)
DECLSPEC_HIDDEN
;
enum
wined3d_format_id
PixelFormat_DD2WineD3D
(
const
DDPIXELFORMAT
*
DDPixelFormat
)
DECLSPEC_HIDDEN
;
void
DDRAW_dump_surface_desc
(
const
DDSURFACEDESC2
*
lpddsd
)
DECLSPEC_HIDDEN
;
void
dump_D3DMATRIX
(
const
D3DMATRIX
*
mat
)
DECLSPEC_HIDDEN
;
void
DDRAW_dump_DDCAPS
(
const
DDCAPS
*
lpcaps
)
DECLSPEC_HIDDEN
;
...
...
dlls/ddraw/device.c
View file @
cc5271d1
...
...
@@ -1122,7 +1122,7 @@ IDirect3DDeviceImpl_7_EnumTextureFormats(IDirect3DDevice7 *iface,
WINED3DDISPLAYMODE
mode
;
unsigned
int
i
;
static
const
WINED3DFORMAT
FormatList
[]
=
static
const
enum
wined3d_format_id
FormatList
[]
=
{
/* 32 bit */
WINED3DFMT_B8G8R8A8_UNORM
,
...
...
@@ -1143,7 +1143,7 @@ IDirect3DDeviceImpl_7_EnumTextureFormats(IDirect3DDevice7 *iface,
WINED3DFMT_DXT5
,
};
static
const
WINED3DFORMAT
BumpFormatList
[]
=
static
const
enum
wined3d_format_id
BumpFormatList
[]
=
{
WINED3DFMT_R8G8_SNORM
,
WINED3DFMT_R5G5_SNORM_L6_UNORM
,
...
...
@@ -1171,7 +1171,7 @@ IDirect3DDeviceImpl_7_EnumTextureFormats(IDirect3DDevice7 *iface,
return
hr
;
}
for
(
i
=
0
;
i
<
sizeof
(
FormatList
)
/
sizeof
(
WINED3DFORMAT
);
i
++
)
for
(
i
=
0
;
i
<
sizeof
(
FormatList
)
/
sizeof
(
*
FormatList
);
++
i
)
{
hr
=
IWineD3D_CheckDeviceFormat
(
This
->
ddraw
->
wineD3D
,
WINED3DADAPTER_DEFAULT
,
...
...
@@ -1200,7 +1200,7 @@ IDirect3DDeviceImpl_7_EnumTextureFormats(IDirect3DDevice7 *iface,
}
}
for
(
i
=
0
;
i
<
sizeof
(
BumpFormatList
)
/
sizeof
(
WINED3DFORMAT
);
i
++
)
for
(
i
=
0
;
i
<
sizeof
(
BumpFormatList
)
/
sizeof
(
*
BumpFormatList
);
++
i
)
{
hr
=
IWineD3D_CheckDeviceFormat
(
This
->
ddraw
->
wineD3D
,
WINED3DADAPTER_DEFAULT
,
...
...
@@ -1288,7 +1288,7 @@ IDirect3DDeviceImpl_2_EnumTextureFormats(IDirect3DDevice2 *iface,
unsigned
int
i
;
WINED3DDISPLAYMODE
mode
;
static
const
WINED3DFORMAT
FormatList
[]
=
static
const
enum
wined3d_format_id
FormatList
[]
=
{
/* 32 bit */
WINED3DFMT_B8G8R8A8_UNORM
,
...
...
@@ -1323,7 +1323,7 @@ IDirect3DDeviceImpl_2_EnumTextureFormats(IDirect3DDevice2 *iface,
return
hr
;
}
for
(
i
=
0
;
i
<
sizeof
(
FormatList
)
/
sizeof
(
WINED3DFORMAT
);
i
++
)
for
(
i
=
0
;
i
<
sizeof
(
FormatList
)
/
sizeof
(
*
FormatList
);
++
i
)
{
hr
=
IWineD3D_CheckDeviceFormat
(
This
->
ddraw
->
wineD3D
,
0
/* Adapter */
,
...
...
dlls/ddraw/surface.c
View file @
cc5271d1
...
...
@@ -2621,7 +2621,7 @@ static HRESULT WINAPI ddraw_surface3_SetClipper(IDirectDrawSurface3 *iface, IDir
static
HRESULT
WINAPI
ddraw_surface7_SetSurfaceDesc
(
IDirectDrawSurface7
*
iface
,
DDSURFACEDESC2
*
DDSD
,
DWORD
Flags
)
{
IDirectDrawSurfaceImpl
*
This
=
(
IDirectDrawSurfaceImpl
*
)
iface
;
WINED3DFORMAT
newFormat
=
WINED3DFMT_UNKNOWN
;
enum
wined3d_format_id
newFormat
=
WINED3DFMT_UNKNOWN
;
HRESULT
hr
;
TRACE
(
"iface %p, surface_desc %p, flags %#x.
\n
"
,
iface
,
DDSD
,
Flags
);
...
...
@@ -3528,7 +3528,7 @@ HRESULT ddraw_surface_init(IDirectDrawSurfaceImpl *surface, IDirectDrawImpl *ddr
{
WINED3DPOOL
pool
=
WINED3DPOOL_DEFAULT
;
WINED3DSURFACE_DESC
wined3d_desc
;
WINED3DFORMAT
format
;
enum
wined3d_format_id
format
;
DWORD
usage
=
0
;
HRESULT
hr
;
...
...
dlls/ddraw/utils.c
View file @
cc5271d1
...
...
@@ -33,19 +33,17 @@ static void DDRAW_dump_pixelformat(const DDPIXELFORMAT *pf);
/*****************************************************************************
* PixelFormat_WineD3DtoDD
*
* Converts an
WINED3DFORMAT value
into a DDPIXELFORMAT structure
* Converts an
wined3d format ID
into a DDPIXELFORMAT structure
*
* Params:
* DDPixelFormat: Address of the structure to write the pixel format to
* WineD3DFormat: Source format
*
*****************************************************************************/
void
PixelFormat_WineD3DtoDD
(
DDPIXELFORMAT
*
DDPixelFormat
,
WINED3DFORMAT
WineD3DFormat
)
void
PixelFormat_WineD3DtoDD
(
DDPIXELFORMAT
*
DDPixelFormat
,
enum
wined3d_format_id
WineD3DFormat
)
{
DWORD
Size
=
DDPixelFormat
->
dwSize
;
TRACE
(
"Converting
WINED3DFORMAT %d to DDRAW
\n
"
,
WineD3DFormat
);
TRACE
(
"Converting
wined3d format %#x to DDRAW.
\n
"
,
WineD3DFormat
);
if
(
Size
==
0
)
return
;
...
...
@@ -345,17 +343,17 @@ PixelFormat_WineD3DtoDD(DDPIXELFORMAT *DDPixelFormat,
/*****************************************************************************
* PixelFormat_DD2WineD3D
*
* Reads a DDPIXELFORMAT structure and returns the equal WINED3DFORMAT
* Reads a DDPIXELFORMAT structure and returns the equivalent wined3d
* format ID.
*
* Params:
* DDPixelFormat: The source format
*
* Returns:
* The
WINED3DFORMAT equal
to the DDraw format
* The
wined3d format ID equivalent
to the DDraw format
* WINED3DFMT_UNKNOWN if a matching format wasn't found
*****************************************************************************/
WINED3DFORMAT
PixelFormat_DD2WineD3D
(
const
DDPIXELFORMAT
*
DDPixelFormat
)
enum
wined3d_format_id
PixelFormat_DD2WineD3D
(
const
DDPIXELFORMAT
*
DDPixelFormat
)
{
TRACE
(
"Convert a DirectDraw Pixelformat to a WineD3D Pixelformat
\n
"
);
if
(
TRACE_ON
(
ddraw
))
...
...
dlls/dxgi/dxgi_private.h
View file @
cc5271d1
...
...
@@ -72,7 +72,7 @@ struct dxgi_device_layer
/* TRACE helper functions */
const
char
*
debug_dxgi_format
(
DXGI_FORMAT
format
)
DECLSPEC_HIDDEN
;
WINED3DFORMAT
wined3dformat_from_dxgi_format
(
DXGI_FORMAT
format
)
DECLSPEC_HIDDEN
;
enum
wined3d_format_id
wined3dformat_from_dxgi_format
(
DXGI_FORMAT
format
)
DECLSPEC_HIDDEN
;
/* IDXGIFactory */
struct
dxgi_factory
...
...
dlls/dxgi/output.c
View file @
cc5271d1
...
...
@@ -118,7 +118,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_output_GetDisplayModeList(IDXGIOutput *ifa
DXGI_FORMAT
format
,
UINT
flags
,
UINT
*
mode_count
,
DXGI_MODE_DESC
*
desc
)
{
struct
dxgi_output
*
This
=
(
struct
dxgi_output
*
)
iface
;
WINED3DFORMAT
wined3d_format
;
enum
wined3d_format_id
wined3d_format
;
IWineD3D
*
wined3d
;
UINT
i
;
...
...
dlls/dxgi/utils.c
View file @
cc5271d1
...
...
@@ -127,7 +127,7 @@ const char *debug_dxgi_format(DXGI_FORMAT format)
#undef WINE_DXGI_TO_STR
WINED3DFORMAT
wined3dformat_from_dxgi_format
(
DXGI_FORMAT
format
)
enum
wined3d_format_id
wined3dformat_from_dxgi_format
(
DXGI_FORMAT
format
)
{
switch
(
format
)
{
...
...
dlls/wined3d/buffer.c
View file @
cc5271d1
...
...
@@ -292,8 +292,8 @@ static BOOL buffer_check_attribute(struct wined3d_buffer *This, const struct win
const
struct
wined3d_stream_info_element
*
attrib
=
&
si
->
elements
[
attrib_idx
];
IWineD3DDeviceImpl
*
device
=
This
->
resource
.
device
;
const
struct
wined3d_gl_info
*
gl_info
=
&
device
->
adapter
->
gl_info
;
enum
wined3d_format_id
format
;
BOOL
ret
=
FALSE
;
WINED3DFORMAT
format
;
/* Ignore attributes that do not have our vbo. After that check we can be sure that the attribute is
* there, on nonexistent attribs the vbo is 0.
...
...
@@ -346,7 +346,7 @@ static UINT *find_conversion_shift(struct wined3d_buffer *This,
ret
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
DWORD
)
*
stride
);
for
(
i
=
0
;
i
<
MAX_ATTRIBS
;
++
i
)
{
WINED3DFORMAT
format
;
enum
wined3d_format_id
format
;
if
(
!
(
strided
->
use_map
&
(
1
<<
i
))
||
strided
->
elements
[
i
].
buffer_object
!=
This
->
buffer_object
)
continue
;
...
...
@@ -1447,10 +1447,10 @@ static const struct IWineD3DBufferVtbl wined3d_buffer_vtbl =
};
HRESULT
buffer_init
(
struct
wined3d_buffer
*
buffer
,
IWineD3DDeviceImpl
*
device
,
UINT
size
,
DWORD
usage
,
WINED3DFORMAT
format
,
WINED3DPOOL
pool
,
GLenum
bind_hint
,
UINT
size
,
DWORD
usage
,
enum
wined3d_format_id
format_id
,
WINED3DPOOL
pool
,
GLenum
bind_hint
,
const
char
*
data
,
IUnknown
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
)
{
const
struct
wined3d_format_desc
*
format_desc
=
getFormatDescEntry
(
format
,
&
device
->
adapter
->
gl_info
);
const
struct
wined3d_format_desc
*
format_desc
=
getFormatDescEntry
(
format
_id
,
&
device
->
adapter
->
gl_info
);
HRESULT
hr
;
const
struct
wined3d_gl_info
*
gl_info
=
&
device
->
adapter
->
gl_info
;
BOOL
dynamic_buffer_ok
;
...
...
dlls/wined3d/cubetexture.c
View file @
cc5271d1
...
...
@@ -451,11 +451,11 @@ static const IWineD3DCubeTextureVtbl IWineD3DCubeTexture_Vtbl =
};
HRESULT
cubetexture_init
(
IWineD3DCubeTextureImpl
*
texture
,
UINT
edge_length
,
UINT
levels
,
IWineD3DDeviceImpl
*
device
,
DWORD
usage
,
WINED3DFORMAT
format
,
WINED3DPOOL
pool
,
IWineD3DDeviceImpl
*
device
,
DWORD
usage
,
enum
wined3d_format_id
format_id
,
WINED3DPOOL
pool
,
IUnknown
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
)
{
const
struct
wined3d_gl_info
*
gl_info
=
&
device
->
adapter
->
gl_info
;
const
struct
wined3d_format_desc
*
format_desc
=
getFormatDescEntry
(
format
,
gl_info
);
const
struct
wined3d_format_desc
*
format_desc
=
getFormatDescEntry
(
format
_id
,
gl_info
);
UINT
pow2_edge_length
;
unsigned
int
i
,
j
;
UINT
tmp_w
;
...
...
@@ -463,7 +463,7 @@ HRESULT cubetexture_init(IWineD3DCubeTextureImpl *texture, UINT edge_length, UIN
/* TODO: It should only be possible to create textures for formats
* that are reported as supported. */
if
(
WINED3DFMT_UNKNOWN
>=
format
)
if
(
WINED3DFMT_UNKNOWN
>=
format
_id
)
{
WARN
(
"(%p) : Texture cannot be created with a format of WINED3DFMT_UNKNOWN.
\n
"
,
texture
);
return
WINED3DERR_INVALIDCALL
;
...
...
@@ -550,7 +550,7 @@ HRESULT cubetexture_init(IWineD3DCubeTextureImpl *texture, UINT edge_length, UIN
IWineD3DSurface
*
surface
;
hr
=
IWineD3DDeviceParent_CreateSurface
(
device
->
device_parent
,
parent
,
tmp_w
,
tmp_w
,
format
,
usage
,
pool
,
i
/* Level */
,
j
,
&
surface
);
format
_id
,
usage
,
pool
,
i
/* Level */
,
j
,
&
surface
);
if
(
FAILED
(
hr
))
{
FIXME
(
"(%p) Failed to create surface, hr %#x.
\n
"
,
texture
,
hr
);
...
...
dlls/wined3d/device.c
View file @
cc5271d1
...
...
@@ -1038,7 +1038,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateStateBlock(IWineD3DDevice *iface,
}
static
HRESULT
WINAPI
IWineD3DDeviceImpl_CreateSurface
(
IWineD3DDevice
*
iface
,
UINT
Width
,
UINT
Height
,
WINED3DFORMAT
Format
,
BOOL
Lockable
,
BOOL
Discard
,
UINT
Level
,
IWineD3DSurface
**
surface
,
enum
wined3d_format_id
Format
,
BOOL
Lockable
,
BOOL
Discard
,
UINT
Level
,
IWineD3DSurface
**
surface
,
DWORD
Usage
,
WINED3DPOOL
Pool
,
WINED3DMULTISAMPLE_TYPE
MultiSample
,
DWORD
MultisampleQuality
,
WINED3DSURFTYPE
Impl
,
IUnknown
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
)
{
...
...
@@ -1105,7 +1105,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateRendertargetView(IWineD3DDevice *
}
static
HRESULT
WINAPI
IWineD3DDeviceImpl_CreateTexture
(
IWineD3DDevice
*
iface
,
UINT
Width
,
UINT
Height
,
UINT
Levels
,
DWORD
Usage
,
WINED3DFORMAT
Format
,
WINED3DPOOL
Pool
,
UINT
Width
,
UINT
Height
,
UINT
Levels
,
DWORD
Usage
,
enum
wined3d_format_id
Format
,
WINED3DPOOL
Pool
,
IWineD3DTexture
**
ppTexture
,
IUnknown
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
)
{
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
...
...
@@ -1141,7 +1141,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateTexture(IWineD3DDevice *iface,
}
static
HRESULT
WINAPI
IWineD3DDeviceImpl_CreateVolumeTexture
(
IWineD3DDevice
*
iface
,
UINT
Width
,
UINT
Height
,
UINT
Depth
,
UINT
Levels
,
DWORD
Usage
,
WINED3DFORMAT
Format
,
WINED3DPOOL
Pool
,
UINT
Width
,
UINT
Height
,
UINT
Depth
,
UINT
Levels
,
DWORD
Usage
,
enum
wined3d_format_id
Format
,
WINED3DPOOL
Pool
,
IWineD3DVolumeTexture
**
ppVolumeTexture
,
IUnknown
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
)
{
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
...
...
@@ -1175,7 +1175,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateVolumeTexture(IWineD3DDevice *ifa
}
static
HRESULT
WINAPI
IWineD3DDeviceImpl_CreateVolume
(
IWineD3DDevice
*
iface
,
UINT
Width
,
UINT
Height
,
UINT
Depth
,
DWORD
Usage
,
WINED3DFORMAT
Format
,
WINED3DPOOL
Pool
,
IWineD3DVolume
**
ppVolume
,
UINT
Depth
,
DWORD
Usage
,
enum
wined3d_format_id
Format
,
WINED3DPOOL
Pool
,
IWineD3DVolume
**
ppVolume
,
IUnknown
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
)
{
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
...
...
@@ -1208,7 +1208,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateVolume(IWineD3DDevice *iface, UIN
}
static
HRESULT
WINAPI
IWineD3DDeviceImpl_CreateCubeTexture
(
IWineD3DDevice
*
iface
,
UINT
EdgeLength
,
UINT
Levels
,
DWORD
Usage
,
WINED3DFORMAT
Format
,
WINED3DPOOL
Pool
,
IWineD3DCubeTexture
**
ppCubeTexture
,
DWORD
Usage
,
enum
wined3d_format_id
Format
,
WINED3DPOOL
Pool
,
IWineD3DCubeTexture
**
ppCubeTexture
,
IUnknown
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
)
{
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
...
...
@@ -1365,7 +1365,7 @@ struct wined3d_fvf_convert_state
};
static
void
append_decl_element
(
struct
wined3d_fvf_convert_state
*
state
,
WINED3DFORMAT
format
,
WINED3DDECLUSAGE
usage
,
UINT
usage_idx
)
enum
wined3d_format_id
format
,
WINED3DDECLUSAGE
usage
,
UINT
usage_idx
)
{
WINED3DVERTEXELEMENT
*
elements
=
state
->
elements
;
const
struct
wined3d_format_desc
*
format_desc
;
...
...
@@ -2887,7 +2887,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_GetMaterial(IWineD3DDevice *iface, WINE
* Get / Set Indices
*****/
static
HRESULT
WINAPI
IWineD3DDeviceImpl_SetIndexBuffer
(
IWineD3DDevice
*
iface
,
IWineD3DBuffer
*
pIndexData
,
WINED3DFORMAT
fmt
)
IWineD3DBuffer
*
pIndexData
,
enum
wined3d_format_id
fmt
)
{
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
IWineD3DBuffer
*
oldIdxs
;
...
...
@@ -4739,7 +4739,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_DrawPrimitiveUP(IWineD3DDevice *iface,
}
static
HRESULT
WINAPI
IWineD3DDeviceImpl_DrawIndexedPrimitiveUP
(
IWineD3DDevice
*
iface
,
UINT
index_count
,
const
void
*
pIndexData
,
WINED3DFORMAT
IndexDataFormat
,
UINT
index_count
,
const
void
*
pIndexData
,
enum
wined3d_format_id
IndexDataFormat
,
const
void
*
pVertexStreamZeroData
,
UINT
VertexStreamZeroStride
)
{
int
idxStride
;
...
...
@@ -4813,7 +4813,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_DrawPrimitiveStrided(IWineD3DDevice *if
static
HRESULT
WINAPI
IWineD3DDeviceImpl_DrawIndexedPrimitiveStrided
(
IWineD3DDevice
*
iface
,
UINT
vertex_count
,
const
WineDirect3DVertexStridedData
*
DrawPrimStrideData
,
UINT
NumVertices
,
const
void
*
pIndexData
,
WINED3DFORMAT
IndexDataFormat
)
UINT
NumVertices
,
const
void
*
pIndexData
,
enum
wined3d_format_id
IndexDataFormat
)
{
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
DWORD
idxSize
=
(
IndexDataFormat
==
WINED3DFMT_R32_UINT
?
4
:
2
);
...
...
dlls/wined3d/directx.c
View file @
cc5271d1
...
...
@@ -160,7 +160,9 @@ static const struct {
* Utility functions follow
**********************************************************/
static
HRESULT
WINAPI
IWineD3DImpl_CheckDeviceFormat
(
IWineD3D
*
iface
,
UINT
Adapter
,
WINED3DDEVTYPE
DeviceType
,
WINED3DFORMAT
AdapterFormat
,
DWORD
Usage
,
WINED3DRESOURCETYPE
RType
,
WINED3DFORMAT
CheckFormat
,
WINED3DSURFTYPE
SurfaceType
);
static
HRESULT
WINAPI
IWineD3DImpl_CheckDeviceFormat
(
IWineD3D
*
iface
,
UINT
Adapter
,
WINED3DDEVTYPE
DeviceType
,
enum
wined3d_format_id
AdapterFormat
,
DWORD
Usage
,
WINED3DRESOURCETYPE
RType
,
enum
wined3d_format_id
CheckFormat
,
WINED3DSURFTYPE
SurfaceType
);
const
struct
min_lookup
minMipLookup
[]
=
{
...
...
@@ -2754,9 +2756,11 @@ static HMONITOR WINAPI IWineD3DImpl_GetAdapterMonitor(IWineD3D *iface, UINT Adap
of the same bpp but different resolutions */
/* Note: dx9 supplies a format. Calls from d3d8 supply WINED3DFMT_UNKNOWN */
static
UINT
WINAPI
IWineD3DImpl_GetAdapterModeCount
(
IWineD3D
*
iface
,
UINT
Adapter
,
WINED3DFORMAT
Format
)
{
static
UINT
WINAPI
IWineD3DImpl_GetAdapterModeCount
(
IWineD3D
*
iface
,
UINT
Adapter
,
enum
wined3d_format_id
format_id
)
{
IWineD3DImpl
*
This
=
(
IWineD3DImpl
*
)
iface
;
TRACE_
(
d3d_caps
)(
"(%p}->(Adapter: %d, Format: %s)
\n
"
,
This
,
Adapter
,
debug_d3dformat
(
Format
));
TRACE_
(
d3d_caps
)(
"iface %p, adapter %u, format_id: %s.
\n
"
,
iface
,
Adapter
,
debug_d3dformat
(
format_id
));
if
(
Adapter
>=
IWineD3D_GetAdapterCount
(
iface
))
{
return
0
;
...
...
@@ -2764,7 +2768,7 @@ static UINT WINAPI IWineD3DImpl_GetAdapterModeCount(IWineD3D *iface, UINT Ad
/* TODO: Store modes per adapter and read it from the adapter structure */
if
(
Adapter
==
0
)
{
/* Display */
const
struct
wined3d_format_desc
*
format_desc
=
getFormatDescEntry
(
Format
,
&
This
->
adapters
[
Adapter
].
gl_info
);
const
struct
wined3d_format_desc
*
format_desc
=
getFormatDescEntry
(
format_id
,
&
This
->
adapters
[
Adapter
].
gl_info
);
UINT
format_bits
=
format_desc
->
byte_count
*
CHAR_BIT
;
unsigned
int
i
=
0
;
unsigned
int
j
=
0
;
...
...
@@ -2777,7 +2781,7 @@ static UINT WINAPI IWineD3DImpl_GetAdapterModeCount(IWineD3D *iface, UINT Ad
{
++
j
;
if
(
Format
==
WINED3DFMT_UNKNOWN
)
if
(
format_id
==
WINED3DFMT_UNKNOWN
)
{
/* This is for D3D8, do not enumerate P8 here */
if
(
mode
.
dmBitsPerPel
==
32
||
mode
.
dmBitsPerPel
==
16
)
++
i
;
...
...
@@ -2797,21 +2801,25 @@ static UINT WINAPI IWineD3DImpl_GetAdapterModeCount(IWineD3D *iface, UINT Ad
}
/* Note: dx9 supplies a format. Calls from d3d8 supply WINED3DFMT_UNKNOWN */
static
HRESULT
WINAPI
IWineD3DImpl_EnumAdapterModes
(
IWineD3D
*
iface
,
UINT
Adapter
,
WINED3DFORMAT
Format
,
UINT
Mode
,
WINED3DDISPLAYMODE
*
pMode
)
{
static
HRESULT
WINAPI
IWineD3DImpl_EnumAdapterModes
(
IWineD3D
*
iface
,
UINT
Adapter
,
enum
wined3d_format_id
format_id
,
UINT
Mode
,
WINED3DDISPLAYMODE
*
pMode
)
{
IWineD3DImpl
*
This
=
(
IWineD3DImpl
*
)
iface
;
TRACE_
(
d3d_caps
)(
"(%p}->(Adapter:%d, mode:%d, pMode:%p, format:%s)
\n
"
,
This
,
Adapter
,
Mode
,
pMode
,
debug_d3dformat
(
Format
));
TRACE_
(
d3d_caps
)(
"iface %p, adapter_idx %u, format %s, mode_idx %u, mode %p.
\n
"
,
iface
,
Adapter
,
debug_d3dformat
(
format_id
),
Mode
,
pMode
);
/* Validate the parameters as much as possible */
if
(
NULL
==
pMode
||
Adapter
>=
IWineD3DImpl_GetAdapterCount
(
iface
)
||
Mode
>=
IWineD3DImpl_GetAdapterModeCount
(
iface
,
Adapter
,
Format
))
{
if
(
!
pMode
||
Adapter
>=
IWineD3DImpl_GetAdapterCount
(
iface
)
||
Mode
>=
IWineD3DImpl_GetAdapterModeCount
(
iface
,
Adapter
,
format_id
))
{
return
WINED3DERR_INVALIDCALL
;
}
/* TODO: Store modes per adapter and read it from the adapter structure */
if
(
Adapter
==
0
)
{
const
struct
wined3d_format_desc
*
format_desc
=
getFormatDescEntry
(
Format
,
&
This
->
adapters
[
Adapter
].
gl_info
);
const
struct
wined3d_format_desc
*
format_desc
=
getFormatDescEntry
(
format_id
,
&
This
->
adapters
[
Adapter
].
gl_info
);
UINT
format_bits
=
format_desc
->
byte_count
*
CHAR_BIT
;
DEVMODEW
DevModeW
;
int
ModeIdx
=
0
;
...
...
@@ -2826,7 +2834,7 @@ static HRESULT WINAPI IWineD3DImpl_EnumAdapterModes(IWineD3D *iface, UINT Adapte
just count through the ones with valid bit depths */
while
((
i
<=
Mode
)
&&
EnumDisplaySettingsExW
(
NULL
,
j
++
,
&
DevModeW
,
0
))
{
if
(
Format
==
WINED3DFMT_UNKNOWN
)
if
(
format_id
==
WINED3DFMT_UNKNOWN
)
{
/* This is for D3D8, do not enumerate P8 here */
if
(
DevModeW
.
dmBitsPerPel
==
32
||
DevModeW
.
dmBitsPerPel
==
16
)
++
i
;
...
...
@@ -2837,8 +2845,9 @@ static HRESULT WINAPI IWineD3DImpl_EnumAdapterModes(IWineD3D *iface, UINT Adapte
}
}
if
(
i
==
0
)
{
TRACE_
(
d3d_caps
)(
"No modes found for format (%x - %s)
\n
"
,
Format
,
debug_d3dformat
(
Format
));
if
(
i
==
0
)
{
TRACE_
(
d3d_caps
)(
"No modes found for format (%x - %s)
\n
"
,
format_id
,
debug_d3dformat
(
format_id
));
return
WINED3DERR_INVALIDCALL
;
}
ModeIdx
=
j
-
1
;
...
...
@@ -2851,12 +2860,13 @@ static HRESULT WINAPI IWineD3DImpl_EnumAdapterModes(IWineD3D *iface, UINT Adapte
if
(
DevModeW
.
dmFields
&
DM_DISPLAYFREQUENCY
)
pMode
->
RefreshRate
=
DevModeW
.
dmDisplayFrequency
;
if
(
Format
==
WINED3DFMT_UNKNOWN
)
{
if
(
format_id
==
WINED3DFMT_UNKNOWN
)
pMode
->
Format
=
pixelformat_for_depth
(
DevModeW
.
dmBitsPerPel
);
}
else
{
pMode
->
Format
=
Format
;
}
}
else
{
else
pMode
->
Format
=
format_id
;
}
else
{
TRACE_
(
d3d_caps
)(
"Requested mode out of range %d
\n
"
,
Mode
);
return
WINED3DERR_INVALIDCALL
;
}
...
...
@@ -3047,10 +3057,10 @@ static BOOL IWineD3DImpl_IsPixelFormatCompatibleWithDepthFmt(const struct wined3
return
TRUE
;
}
static
HRESULT
WINAPI
IWineD3DImpl_CheckDepthStencilMatch
(
IWineD3D
*
iface
,
UINT
Adapter
,
WINED3DDEVTYPE
DeviceType
,
WINED3DFORMAT
AdapterFormat
,
WINED3DFORMAT
RenderTargetFormat
,
WINED3DFORMAT
DepthStencilFormat
)
{
static
HRESULT
WINAPI
IWineD3DImpl_CheckDepthStencilMatch
(
IWineD3D
*
iface
,
UINT
Adapter
,
WINED3DDEVTYPE
DeviceType
,
enum
wined3d_format_id
AdapterFormat
,
enum
wined3d_format_id
RenderTargetFormat
,
enum
wined3d_format_id
DepthStencilFormat
)
{
IWineD3DImpl
*
This
=
(
IWineD3DImpl
*
)
iface
;
int
nCfgs
;
const
WineD3D_PixelFormat
*
cfgs
;
...
...
@@ -3102,8 +3112,9 @@ static HRESULT WINAPI IWineD3DImpl_CheckDepthStencilMatch(IWineD3D *iface, UINT
return
WINED3DERR_NOTAVAILABLE
;
}
static
HRESULT
WINAPI
IWineD3DImpl_CheckDeviceMultiSampleType
(
IWineD3D
*
iface
,
UINT
Adapter
,
WINED3DDEVTYPE
DeviceType
,
WINED3DFORMAT
SurfaceFormat
,
BOOL
Windowed
,
WINED3DMULTISAMPLE_TYPE
MultiSampleType
,
DWORD
*
pQualityLevels
)
static
HRESULT
WINAPI
IWineD3DImpl_CheckDeviceMultiSampleType
(
IWineD3D
*
iface
,
UINT
Adapter
,
WINED3DDEVTYPE
DeviceType
,
enum
wined3d_format_id
SurfaceFormat
,
BOOL
Windowed
,
WINED3DMULTISAMPLE_TYPE
MultiSampleType
,
DWORD
*
pQualityLevels
)
{
IWineD3DImpl
*
This
=
(
IWineD3DImpl
*
)
iface
;
const
struct
wined3d_format_desc
*
glDesc
;
...
...
@@ -3198,7 +3209,7 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceMultiSampleType(IWineD3D *iface, U
}
static
HRESULT
WINAPI
IWineD3DImpl_CheckDeviceType
(
IWineD3D
*
iface
,
UINT
Adapter
,
WINED3DDEVTYPE
DeviceType
,
WINED3DFORMAT
DisplayFormat
,
WINED3DFORMAT
BackBufferFormat
,
BOOL
Windowed
)
enum
wined3d_format_id
DisplayFormat
,
enum
wined3d_format_id
BackBufferFormat
,
BOOL
Windowed
)
{
HRESULT
hr
=
WINED3DERR_NOTAVAILABLE
;
UINT
nmodes
;
...
...
@@ -3722,8 +3733,8 @@ static BOOL CheckVertexTextureCapability(struct wined3d_adapter *adapter,
}
static
HRESULT
WINAPI
IWineD3DImpl_CheckDeviceFormat
(
IWineD3D
*
iface
,
UINT
Adapter
,
WINED3DDEVTYPE
DeviceType
,
WINED3DFORMAT
AdapterFormat
,
DWORD
Usage
,
WINED3DRESOURCETYPE
RType
,
WINED3DFORMAT
CheckFormat
,
WINED3DSURFTYPE
SurfaceType
)
enum
wined3d_format_id
AdapterFormat
,
DWORD
Usage
,
WINED3DRESOURCETYPE
RType
,
enum
wined3d_format_id
CheckFormat
,
WINED3DSURFTYPE
SurfaceType
)
{
IWineD3DImpl
*
This
=
(
IWineD3DImpl
*
)
iface
;
struct
wined3d_adapter
*
adapter
=
&
This
->
adapters
[
Adapter
];
...
...
@@ -4218,7 +4229,7 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapt
}
static
HRESULT
WINAPI
IWineD3DImpl_CheckDeviceFormatConversion
(
IWineD3D
*
iface
,
UINT
adapter_idx
,
WINED3DDEVTYPE
device_type
,
WINED3DFORMAT
src_format
,
WINED3DFORMAT
dst_format
)
WINED3DDEVTYPE
device_type
,
enum
wined3d_format_id
src_format
,
enum
wined3d_format_id
dst_format
)
{
FIXME
(
"iface %p, adapter_idx %u, device_type %s, src_format %s, dst_format %s stub!
\n
"
,
iface
,
adapter_idx
,
debug_d3ddevicetype
(
device_type
),
debug_d3dformat
(
src_format
),
...
...
dlls/wined3d/drawprim.c
View file @
cc5271d1
...
...
@@ -306,7 +306,8 @@ static void drawStridedSlow(IWineD3DDevice *iface, const struct wined3d_context
}
/* GL locking is done by the caller */
static
inline
void
send_attribute
(
IWineD3DDeviceImpl
*
This
,
WINED3DFORMAT
format
,
const
UINT
index
,
const
void
*
ptr
)
static
inline
void
send_attribute
(
IWineD3DDeviceImpl
*
This
,
enum
wined3d_format_id
format
,
const
UINT
index
,
const
void
*
ptr
)
{
const
struct
wined3d_gl_info
*
gl_info
=
&
This
->
adapter
->
gl_info
;
...
...
dlls/wined3d/surface.c
View file @
cc5271d1
...
...
@@ -343,11 +343,11 @@ void draw_textured_quad(IWineD3DSurfaceImpl *src_surface, const RECT *src_rect,
HRESULT
surface_init
(
IWineD3DSurfaceImpl
*
surface
,
WINED3DSURFTYPE
surface_type
,
UINT
alignment
,
UINT
width
,
UINT
height
,
UINT
level
,
BOOL
lockable
,
BOOL
discard
,
WINED3DMULTISAMPLE_TYPE
multisample_type
,
UINT
multisample_quality
,
IWineD3DDeviceImpl
*
device
,
DWORD
usage
,
WINED3DFORMAT
format
,
UINT
multisample_quality
,
IWineD3DDeviceImpl
*
device
,
DWORD
usage
,
enum
wined3d_format_id
format_id
,
WINED3DPOOL
pool
,
IUnknown
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
)
{
const
struct
wined3d_gl_info
*
gl_info
=
&
device
->
adapter
->
gl_info
;
const
struct
wined3d_format_desc
*
format_desc
=
getFormatDescEntry
(
format
,
gl_info
);
const
struct
wined3d_format_desc
*
format_desc
=
getFormatDescEntry
(
format
_id
,
gl_info
);
void
(
*
cleanup
)(
IWineD3DSurfaceImpl
*
This
);
unsigned
int
resource_size
;
HRESULT
hr
;
...
...
@@ -401,7 +401,7 @@ HRESULT surface_init(IWineD3DSurfaceImpl *surface, WINED3DSURFTYPE surface_type,
/* Flags */
surface
->
Flags
=
SFLAG_NORMCOORD
;
/* Default to normalized coords. */
if
(
discard
)
surface
->
Flags
|=
SFLAG_DISCARD
;
if
(
lockable
||
format
==
WINED3DFMT_D16_LOCKABLE
)
surface
->
Flags
|=
SFLAG_LOCKABLE
;
if
(
lockable
||
format
_id
==
WINED3DFMT_D16_LOCKABLE
)
surface
->
Flags
|=
SFLAG_LOCKABLE
;
/* Quick lockable sanity check.
* TODO: remove this after surfaces, usage and lockability have been debugged properly
...
...
@@ -2589,7 +2589,8 @@ static void WINAPI IWineD3DSurfaceImpl_BindTexture(IWineD3DSurface *iface, BOOL
}
}
static
HRESULT
WINAPI
IWineD3DSurfaceImpl_SetFormat
(
IWineD3DSurface
*
iface
,
WINED3DFORMAT
format
)
{
static
HRESULT
WINAPI
IWineD3DSurfaceImpl_SetFormat
(
IWineD3DSurface
*
iface
,
enum
wined3d_format_id
format
)
{
IWineD3DSurfaceImpl
*
This
=
(
IWineD3DSurfaceImpl
*
)
iface
;
HRESULT
hr
;
...
...
dlls/wined3d/surface_base.c
View file @
cc5271d1
...
...
@@ -485,9 +485,10 @@ HRESULT WINAPI IWineD3DBaseSurfaceImpl_GetClipper(IWineD3DSurface *iface, IWineD
return
WINED3D_OK
;
}
HRESULT
WINAPI
IWineD3DBaseSurfaceImpl_SetFormat
(
IWineD3DSurface
*
iface
,
WINED3DFORMAT
format
)
{
HRESULT
WINAPI
IWineD3DBaseSurfaceImpl_SetFormat
(
IWineD3DSurface
*
iface
,
enum
wined3d_format_id
format_id
)
{
IWineD3DSurfaceImpl
*
This
=
(
IWineD3DSurfaceImpl
*
)
iface
;
const
struct
wined3d_format_desc
*
format_desc
=
getFormatDescEntry
(
format
,
const
struct
wined3d_format_desc
*
format_desc
=
getFormatDescEntry
(
format
_id
,
&
This
->
resource
.
device
->
adapter
->
gl_info
);
if
(
This
->
resource
.
format_desc
->
format
!=
WINED3DFMT_UNKNOWN
)
...
...
@@ -496,12 +497,12 @@ HRESULT WINAPI IWineD3DBaseSurfaceImpl_SetFormat(IWineD3DSurface *iface, WINED3D
return
WINED3DERR_INVALIDCALL
;
}
TRACE
(
"(%p) : Setting texture format to (%d,%s)
\n
"
,
This
,
format
,
debug_d3dformat
(
format
));
TRACE
(
"(%p) : Setting texture format to (%d,%s)
\n
"
,
This
,
format
_id
,
debug_d3dformat
(
format_id
));
This
->
resource
.
size
=
wined3d_format_calculate_size
(
format_desc
,
This
->
resource
.
device
->
surface_alignment
,
This
->
pow2Width
,
This
->
pow2Height
);
This
->
Flags
|=
(
WINED3DFMT_D16_LOCKABLE
==
format
)
?
SFLAG_LOCKABLE
:
0
;
This
->
Flags
|=
(
WINED3DFMT_D16_LOCKABLE
==
format
_id
)
?
SFLAG_LOCKABLE
:
0
;
This
->
resource
.
format_desc
=
format_desc
;
...
...
@@ -776,8 +777,9 @@ static void convert_yuy2_x8r8g8b8(const BYTE *src, BYTE *dst,
}
}
struct
d3dfmt_convertor_desc
{
WINED3DFORMAT
from
,
to
;
struct
d3dfmt_convertor_desc
{
enum
wined3d_format_id
from
,
to
;
void
(
*
convert
)(
const
BYTE
*
src
,
BYTE
*
dst
,
DWORD
pitch_in
,
DWORD
pitch_out
,
unsigned
int
w
,
unsigned
int
h
);
};
...
...
@@ -789,7 +791,7 @@ static const struct d3dfmt_convertor_desc convertors[] =
{
WINED3DFMT_YUY2
,
WINED3DFMT_B8G8R8X8_UNORM
,
convert_yuy2_x8r8g8b8
},
};
static
inline
const
struct
d3dfmt_convertor_desc
*
find_convertor
(
WINED3DFORMAT
from
,
WINED3DFORMAT
to
)
static
inline
const
struct
d3dfmt_convertor_desc
*
find_convertor
(
enum
wined3d_format_id
from
,
enum
wined3d_format_id
to
)
{
unsigned
int
i
;
for
(
i
=
0
;
i
<
(
sizeof
(
convertors
)
/
sizeof
(
convertors
[
0
]));
i
++
)
{
...
...
@@ -811,7 +813,8 @@ static inline const struct d3dfmt_convertor_desc *find_convertor(WINED3DFORMAT f
* fmt: Requested destination format
*
*****************************************************************************/
static
IWineD3DSurfaceImpl
*
surface_convert_format
(
IWineD3DSurfaceImpl
*
source
,
WINED3DFORMAT
to_fmt
)
{
static
IWineD3DSurfaceImpl
*
surface_convert_format
(
IWineD3DSurfaceImpl
*
source
,
enum
wined3d_format_id
to_fmt
)
{
IWineD3DSurface
*
ret
=
NULL
;
const
struct
d3dfmt_convertor_desc
*
conv
;
WINED3DLOCKED_RECT
lock_src
,
lock_dst
;
...
...
dlls/wined3d/swapchain.c
View file @
cc5271d1
...
...
@@ -771,7 +771,7 @@ HRESULT swapchain_init(IWineD3DSwapChainImpl *swapchain, WINED3DSURFTYPE surface
if
(
surface_type
==
SURFACE_OPENGL
)
{
static
const
WINED3DFORMAT
formats
[]
=
static
const
enum
wined3d_format_id
formats
[]
=
{
WINED3DFMT_D24_UNORM_S8_UINT
,
WINED3DFMT_D32_UNORM
,
...
...
dlls/wined3d/texture.c
View file @
cc5271d1
...
...
@@ -462,11 +462,11 @@ static const IWineD3DTextureVtbl IWineD3DTexture_Vtbl =
};
HRESULT
texture_init
(
IWineD3DTextureImpl
*
texture
,
UINT
width
,
UINT
height
,
UINT
levels
,
IWineD3DDeviceImpl
*
device
,
DWORD
usage
,
WINED3DFORMAT
format
,
WINED3DPOOL
pool
,
IWineD3DDeviceImpl
*
device
,
DWORD
usage
,
enum
wined3d_format_id
format_id
,
WINED3DPOOL
pool
,
IUnknown
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
)
{
const
struct
wined3d_gl_info
*
gl_info
=
&
device
->
adapter
->
gl_info
;
const
struct
wined3d_format_desc
*
format_desc
=
getFormatDescEntry
(
format
,
gl_info
);
const
struct
wined3d_format_desc
*
format_desc
=
getFormatDescEntry
(
format
_id
,
gl_info
);
UINT
pow2_width
,
pow2_height
;
UINT
tmp_w
,
tmp_h
;
unsigned
int
i
;
...
...
@@ -474,7 +474,7 @@ HRESULT texture_init(IWineD3DTextureImpl *texture, UINT width, UINT height, UINT
/* TODO: It should only be possible to create textures for formats
* that are reported as supported. */
if
(
WINED3DFMT_UNKNOWN
>=
format
)
if
(
WINED3DFMT_UNKNOWN
>=
format
_id
)
{
WARN
(
"(%p) : Texture cannot be created with a format of WINED3DFMT_UNKNOWN.
\n
"
,
texture
);
return
WINED3DERR_INVALIDCALL
;
...
...
dlls/wined3d/utils.c
View file @
cc5271d1
This diff is collapsed.
Click to expand it.
dlls/wined3d/volume.c
View file @
cc5271d1
...
...
@@ -358,11 +358,11 @@ static const IWineD3DVolumeVtbl IWineD3DVolume_Vtbl =
};
HRESULT
volume_init
(
IWineD3DVolumeImpl
*
volume
,
IWineD3DDeviceImpl
*
device
,
UINT
width
,
UINT
height
,
UINT
depth
,
DWORD
usage
,
WINED3DFORMAT
format
,
WINED3DPOOL
pool
,
UINT
height
,
UINT
depth
,
DWORD
usage
,
enum
wined3d_format_id
format_id
,
WINED3DPOOL
pool
,
IUnknown
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
)
{
const
struct
wined3d_gl_info
*
gl_info
=
&
device
->
adapter
->
gl_info
;
const
struct
wined3d_format_desc
*
format_desc
=
getFormatDescEntry
(
format
,
gl_info
);
const
struct
wined3d_format_desc
*
format_desc
=
getFormatDescEntry
(
format
_id
,
gl_info
);
HRESULT
hr
;
if
(
!
gl_info
->
supported
[
EXT_TEXTURE3D
])
...
...
dlls/wined3d/volumetexture.c
View file @
cc5271d1
...
...
@@ -384,18 +384,18 @@ static const IWineD3DVolumeTextureVtbl IWineD3DVolumeTexture_Vtbl =
};
HRESULT
volumetexture_init
(
IWineD3DVolumeTextureImpl
*
texture
,
UINT
width
,
UINT
height
,
UINT
depth
,
UINT
levels
,
IWineD3DDeviceImpl
*
device
,
DWORD
usage
,
WINED3DFORMAT
format
,
UINT
depth
,
UINT
levels
,
IWineD3DDeviceImpl
*
device
,
DWORD
usage
,
enum
wined3d_format_id
format_id
,
WINED3DPOOL
pool
,
IUnknown
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
)
{
const
struct
wined3d_gl_info
*
gl_info
=
&
device
->
adapter
->
gl_info
;
const
struct
wined3d_format_desc
*
format_desc
=
getFormatDescEntry
(
format
,
gl_info
);
const
struct
wined3d_format_desc
*
format_desc
=
getFormatDescEntry
(
format
_id
,
gl_info
);
UINT
tmp_w
,
tmp_h
,
tmp_d
;
unsigned
int
i
;
HRESULT
hr
;
/* TODO: It should only be possible to create textures for formats
* that are reported as supported. */
if
(
WINED3DFMT_UNKNOWN
>=
format
)
if
(
WINED3DFMT_UNKNOWN
>=
format
_id
)
{
WARN
(
"(%p) : Texture cannot be created with a format of WINED3DFMT_UNKNOWN.
\n
"
,
texture
);
return
WINED3DERR_INVALIDCALL
;
...
...
@@ -457,7 +457,7 @@ HRESULT volumetexture_init(IWineD3DVolumeTextureImpl *texture, UINT width, UINT
/* Create the volume. */
hr
=
IWineD3DDeviceParent_CreateVolume
(
device
->
device_parent
,
parent
,
tmp_w
,
tmp_h
,
tmp_d
,
format
,
pool
,
usage
,
&
volume
);
tmp_w
,
tmp_h
,
tmp_d
,
format
_id
,
pool
,
usage
,
&
volume
);
if
(
FAILED
(
hr
))
{
ERR
(
"Creating a volume for the volume texture failed, hr %#x.
\n
"
,
hr
);
...
...
dlls/wined3d/wined3d_private.h
View file @
cc5271d1
...
...
@@ -1663,7 +1663,7 @@ struct IWineD3DDeviceImpl
/* DirectDraw stuff */
DWORD
ddraw_width
,
ddraw_height
;
WINED3DFORMAT
ddraw_format
;
enum
wined3d_format_id
ddraw_format
;
/* Final position fixup constant */
float
posFixup
[
4
];
...
...
@@ -1888,7 +1888,7 @@ typedef struct IWineD3DTextureImpl
}
IWineD3DTextureImpl
;
HRESULT
texture_init
(
IWineD3DTextureImpl
*
texture
,
UINT
width
,
UINT
height
,
UINT
levels
,
IWineD3DDeviceImpl
*
device
,
DWORD
usage
,
WINED3DFORMAT
format
,
WINED3DPOOL
pool
,
IWineD3DDeviceImpl
*
device
,
DWORD
usage
,
enum
wined3d_format_id
format_id
,
WINED3DPOOL
pool
,
IUnknown
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
)
DECLSPEC_HIDDEN
;
/*****************************************************************************
...
...
@@ -1903,7 +1903,7 @@ typedef struct IWineD3DCubeTextureImpl
}
IWineD3DCubeTextureImpl
;
HRESULT
cubetexture_init
(
IWineD3DCubeTextureImpl
*
texture
,
UINT
edge_length
,
UINT
levels
,
IWineD3DDeviceImpl
*
device
,
DWORD
usage
,
WINED3DFORMAT
format
,
WINED3DPOOL
pool
,
IWineD3DDeviceImpl
*
device
,
DWORD
usage
,
enum
wined3d_format_id
format_id
,
WINED3DPOOL
pool
,
IUnknown
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
)
DECLSPEC_HIDDEN
;
typedef
struct
_WINED3DVOLUMET_DESC
...
...
@@ -1934,7 +1934,7 @@ typedef struct IWineD3DVolumeImpl
void
volume_add_dirty_box
(
IWineD3DVolume
*
iface
,
const
WINED3DBOX
*
dirty_box
)
DECLSPEC_HIDDEN
;
HRESULT
volume_init
(
IWineD3DVolumeImpl
*
volume
,
IWineD3DDeviceImpl
*
device
,
UINT
width
,
UINT
height
,
UINT
depth
,
DWORD
usage
,
WINED3DFORMAT
format
,
WINED3DPOOL
pool
,
UINT
height
,
UINT
depth
,
DWORD
usage
,
enum
wined3d_format_id
format_id
,
WINED3DPOOL
pool
,
IUnknown
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
)
DECLSPEC_HIDDEN
;
void
volume_set_container
(
IWineD3DVolumeImpl
*
volume
,
struct
IWineD3DVolumeTextureImpl
*
container
)
DECLSPEC_HIDDEN
;
...
...
@@ -1950,7 +1950,7 @@ typedef struct IWineD3DVolumeTextureImpl
}
IWineD3DVolumeTextureImpl
;
HRESULT
volumetexture_init
(
IWineD3DVolumeTextureImpl
*
texture
,
UINT
width
,
UINT
height
,
UINT
depth
,
UINT
levels
,
IWineD3DDeviceImpl
*
device
,
DWORD
usage
,
WINED3DFORMAT
format
,
UINT
depth
,
UINT
levels
,
IWineD3DDeviceImpl
*
device
,
DWORD
usage
,
enum
wined3d_format_id
format_id
,
WINED3DPOOL
pool
,
IUnknown
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
)
DECLSPEC_HIDDEN
;
typedef
struct
_WINED3DSURFACET_DESC
...
...
@@ -2091,7 +2091,7 @@ void surface_gdi_cleanup(IWineD3DSurfaceImpl *This) DECLSPEC_HIDDEN;
GLenum
surface_get_gl_buffer
(
IWineD3DSurfaceImpl
*
surface
)
DECLSPEC_HIDDEN
;
HRESULT
surface_init
(
IWineD3DSurfaceImpl
*
surface
,
WINED3DSURFTYPE
surface_type
,
UINT
alignment
,
UINT
width
,
UINT
height
,
UINT
level
,
BOOL
lockable
,
BOOL
discard
,
WINED3DMULTISAMPLE_TYPE
multisample_type
,
UINT
multisample_quality
,
IWineD3DDeviceImpl
*
device
,
DWORD
usage
,
WINED3DFORMAT
format
,
UINT
multisample_quality
,
IWineD3DDeviceImpl
*
device
,
DWORD
usage
,
enum
wined3d_format_id
format_id
,
WINED3DPOOL
pool
,
IUnknown
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
)
DECLSPEC_HIDDEN
;
BOOL
surface_init_sysmem
(
IWineD3DSurfaceImpl
*
surface
)
DECLSPEC_HIDDEN
;
void
surface_internal_preload
(
IWineD3DSurfaceImpl
*
surface
,
enum
WINED3DSRGB
srgb
)
DECLSPEC_HIDDEN
;
...
...
@@ -2144,7 +2144,8 @@ HRESULT WINAPI IWineD3DBaseSurfaceImpl_UpdateOverlay(IWineD3DSurface *iface, con
IWineD3DSurface
*
DstSurface
,
const
RECT
*
DstRect
,
DWORD
Flags
,
const
WINEDDOVERLAYFX
*
FX
)
DECLSPEC_HIDDEN
;
HRESULT
WINAPI
IWineD3DBaseSurfaceImpl_SetClipper
(
IWineD3DSurface
*
iface
,
IWineD3DClipper
*
clipper
)
DECLSPEC_HIDDEN
;
HRESULT
WINAPI
IWineD3DBaseSurfaceImpl_GetClipper
(
IWineD3DSurface
*
iface
,
IWineD3DClipper
**
clipper
)
DECLSPEC_HIDDEN
;
HRESULT
WINAPI
IWineD3DBaseSurfaceImpl_SetFormat
(
IWineD3DSurface
*
iface
,
WINED3DFORMAT
format
)
DECLSPEC_HIDDEN
;
HRESULT
WINAPI
IWineD3DBaseSurfaceImpl_SetFormat
(
IWineD3DSurface
*
iface
,
enum
wined3d_format_id
format_id
)
DECLSPEC_HIDDEN
;
HRESULT
IWineD3DBaseSurfaceImpl_CreateDIBSection
(
IWineD3DSurface
*
iface
)
DECLSPEC_HIDDEN
;
HRESULT
WINAPI
IWineD3DBaseSurfaceImpl_Blt
(
IWineD3DSurface
*
iface
,
const
RECT
*
dst_rect
,
IWineD3DSurface
*
src_surface
,
const
RECT
*
src_rect
,
DWORD
flags
,
const
WINEDDBLTFX
*
fx
,
WINED3DTEXTUREFILTERTYPE
filter
)
DECLSPEC_HIDDEN
;
...
...
@@ -2340,7 +2341,7 @@ struct IWineD3DStateBlockImpl
/* Indices */
IWineD3DBuffer
*
pIndexData
;
WINED3DFORMAT
IndexFmt
;
enum
wined3d_format_id
IndexFmt
;
INT
baseVertexIndex
;
INT
loadBaseVertexIndex
;
/* non-indexed drawing needs 0 here, indexed baseVertexIndex */
...
...
@@ -2511,7 +2512,7 @@ const BYTE *buffer_get_memory(IWineD3DBuffer *iface, const struct wined3d_gl_inf
GLuint
*
buffer_object
)
DECLSPEC_HIDDEN
;
BYTE
*
buffer_get_sysmem
(
struct
wined3d_buffer
*
This
,
const
struct
wined3d_gl_info
*
gl_info
)
DECLSPEC_HIDDEN
;
HRESULT
buffer_init
(
struct
wined3d_buffer
*
buffer
,
IWineD3DDeviceImpl
*
device
,
UINT
size
,
DWORD
usage
,
WINED3DFORMAT
format
,
WINED3DPOOL
pool
,
GLenum
bind_hint
,
UINT
size
,
DWORD
usage
,
enum
wined3d_format_id
format_id
,
WINED3DPOOL
pool
,
GLenum
bind_hint
,
const
char
*
data
,
IUnknown
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
)
DECLSPEC_HIDDEN
;
/* IWineD3DRendertargetView */
...
...
@@ -2545,7 +2546,7 @@ struct IWineD3DSwapChainImpl
IWineD3DSurfaceImpl
*
front_buffer
;
WINED3DPRESENT_PARAMETERS
presentParms
;
DWORD
orig_width
,
orig_height
;
WINED3DFORMAT
orig_fmt
;
enum
wined3d_format_id
orig_fmt
;
WINED3DGAMMARAMP
orig_gamma
;
BOOL
render_to_fbo
;
const
struct
wined3d_format_desc
*
ds_format
;
...
...
@@ -2598,7 +2599,7 @@ void swapchain_setup_fullscreen_window(IWineD3DSwapChainImpl *swapchain, UINT w,
*/
/* Trace routines */
const
char
*
debug_d3dformat
(
WINED3DFORMAT
fmt
)
DECLSPEC_HIDDEN
;
const
char
*
debug_d3dformat
(
enum
wined3d_format_id
format_id
)
DECLSPEC_HIDDEN
;
const
char
*
debug_d3ddevicetype
(
WINED3DDEVTYPE
devtype
)
DECLSPEC_HIDDEN
;
const
char
*
debug_d3dresourcetype
(
WINED3DRESOURCETYPE
res
)
DECLSPEC_HIDDEN
;
const
char
*
debug_d3dusage
(
DWORD
usage
)
DECLSPEC_HIDDEN
;
...
...
@@ -2629,7 +2630,7 @@ BOOL is_invalid_op(IWineD3DDeviceImpl *This, int stage, WINED3DTEXTUREOP op,
void
set_tex_op_nvrc
(
IWineD3DDevice
*
iface
,
BOOL
is_alpha
,
int
stage
,
WINED3DTEXTUREOP
op
,
DWORD
arg1
,
DWORD
arg2
,
DWORD
arg3
,
INT
texture_idx
,
DWORD
dst
)
DECLSPEC_HIDDEN
;
void
set_texture_matrix
(
const
float
*
smat
,
DWORD
flags
,
BOOL
calculatedCoords
,
BOOL
transformed
,
WINED3DFORMAT
coordtype
,
BOOL
ffp_can_disable_proj
)
DECLSPEC_HIDDEN
;
BOOL
transformed
,
enum
wined3d_format_id
coordtype
,
BOOL
ffp_can_disable_proj
)
DECLSPEC_HIDDEN
;
void
texture_activate_dimensions
(
DWORD
stage
,
IWineD3DStateBlockImpl
*
stateblock
,
struct
wined3d_context
*
context
)
DECLSPEC_HIDDEN
;
void
sampler_texdim
(
DWORD
state
,
IWineD3DStateBlockImpl
*
stateblock
,
...
...
@@ -2933,7 +2934,7 @@ HRESULT wined3d_palette_init(IWineD3DPaletteImpl *palette, IWineD3DDeviceImpl *d
DWORD
flags
,
const
PALETTEENTRY
*
entries
,
IUnknown
*
parent
)
DECLSPEC_HIDDEN
;
/* DirectDraw utility functions */
extern
WINED3DFORMAT
pixelformat_for_depth
(
DWORD
depth
)
DECLSPEC_HIDDEN
;
extern
enum
wined3d_format_id
pixelformat_for_depth
(
DWORD
depth
)
DECLSPEC_HIDDEN
;
/*****************************************************************************
* Pixel format management
...
...
@@ -2960,7 +2961,7 @@ extern WINED3DFORMAT pixelformat_for_depth(DWORD depth) DECLSPEC_HIDDEN;
struct
wined3d_format_desc
{
WINED3DFORMAT
format
;
enum
wined3d_format_id
format
;
DWORD
red_mask
;
DWORD
green_mask
;
DWORD
blue_mask
;
...
...
@@ -2992,7 +2993,7 @@ struct wined3d_format_desc
void
(
*
convert
)(
const
BYTE
*
src
,
BYTE
*
dst
,
UINT
pitch
,
UINT
width
,
UINT
height
);
};
const
struct
wined3d_format_desc
*
getFormatDescEntry
(
WINED3DFORMAT
fmt
,
const
struct
wined3d_format_desc
*
getFormatDescEntry
(
enum
wined3d_format_id
format_id
,
const
struct
wined3d_gl_info
*
gl_info
)
DECLSPEC_HIDDEN
;
UINT
wined3d_format_calculate_size
(
const
struct
wined3d_format_desc
*
format
,
UINT
alignment
,
UINT
width
,
UINT
height
)
DECLSPEC_HIDDEN
;
...
...
include/wine/wined3d.idl
View file @
cc5271d1
...
...
@@ -139,7 +139,7 @@ typedef enum _WINED3DDEGREETYPE
((
unsigned
long
)(
unsigned
char
)(
ch0
)
|
((
unsigned
long
)(
unsigned
char
)(
ch1
)
<<
8
)
|
\
((
unsigned
long
)(
unsigned
char
)(
ch2
)
<<
16
)
|
((
unsigned
long
)(
unsigned
char
)(
ch3
)
<<
24
))
typedef
enum
_WINED3DFORMAT
enum
wined3d_format_id
{
WINED3DFMT_UNKNOWN
,
WINED3DFMT_B8G8R8_UNORM
,
...
...
@@ -275,7 +275,7 @@ typedef enum _WINED3DFORMAT
WINED3DFMT_NVHS
=
WINEMAKEFOURCC
(
'N'
,
'V'
,
'H'
,
'S'
),
WINED3DFMT_FORCE_DWORD
=
0
xffffffff
}
WINED3DFORMAT
;
}
;
typedef
enum
_WINED3DRENDERSTATETYPE
{
...
...
@@ -1540,7 +1540,7 @@ typedef struct _WINED3DDISPLAYMODE
UINT
Width
;
UINT
Height
;
UINT
RefreshRate
;
WINED3DFORMAT
Format
;
enum
wined3d_format_id
Format
;
}
WINED3DDISPLAYMODE
;
typedef
struct
_WINED3DCOLORVALUE
...
...
@@ -1672,7 +1672,7 @@ typedef struct _WINED3DPRESENT_PARAMETERS
{
UINT
BackBufferWidth
;
UINT
BackBufferHeight
;
WINED3DFORMAT
BackBufferFormat
;
enum
wined3d_format_id
BackBufferFormat
;
UINT
BackBufferCount
;
WINED3DMULTISAMPLE_TYPE
MultiSampleType
;
DWORD
MultiSampleQuality
;
...
...
@@ -1680,7 +1680,7 @@ typedef struct _WINED3DPRESENT_PARAMETERS
HWND
hDeviceWindow
;
BOOL
Windowed
;
BOOL
EnableAutoDepthStencil
;
WINED3DFORMAT
AutoDepthStencilFormat
;
enum
wined3d_format_id
AutoDepthStencilFormat
;
DWORD
Flags
;
UINT
FullScreen_RefreshRateInHz
;
UINT
PresentationInterval
;
...
...
@@ -1689,7 +1689,7 @@ typedef struct _WINED3DPRESENT_PARAMETERS
typedef
struct
_WINED3DSURFACE_DESC
{
WINED3DFORMAT
format
;
enum
wined3d_format_id
format
;
WINED3DRESOURCETYPE
resource_type
;
DWORD
usage
;
WINED3DPOOL
pool
;
...
...
@@ -1702,7 +1702,7 @@ typedef struct _WINED3DSURFACE_DESC
typedef
struct
_WINED3DVOLUME_DESC
{
WINED3DFORMAT
Format
;
enum
wined3d_format_id
Format
;
WINED3DRESOURCETYPE
Type
;
DWORD
Usage
;
WINED3DPOOL
Pool
;
...
...
@@ -1720,7 +1720,7 @@ typedef struct _WINED3DCLIPSTATUS
typedef
struct
_WINED3DVERTEXELEMENT
{
WINED3DFORMAT
format
;
enum
wined3d_format_id
format
;
WORD
input_slot
;
WORD
offset
;
UINT
output_slot
; /* D3D 8 & 10 */
...
...
@@ -1850,7 +1850,7 @@ typedef struct _WINED3DBUFFER_DESC
typedef
struct
WineDirect3DStridedData
{
WINED3DFORMAT
format
; /* Format of the data */
enum
wined3d_format_id
format
; /* Format of the data */
const
BYTE
*
lpData
; /* Pointer to start of data */
DWORD
dwStride
; /* Stride between occurrences of this data */
}
WineDirect3DStridedData
;
...
...
@@ -2131,7 +2131,7 @@ interface IWineD3DDeviceParent : IUnknown
[
in
]
IUnknown
*
superior
,
[
in
]
UINT
width
,
[
in
]
UINT
height
,
[
in
]
WINED3DFORMAT
format
,
[
in
]
enum
wined3d_format_id
format_id
,
[
in
]
DWORD
usage
,
[
in
]
WINED3DPOOL
pool
,
[
in
]
UINT
level
,
...
...
@@ -2143,7 +2143,7 @@ interface IWineD3DDeviceParent : IUnknown
[
in
]
IUnknown
*
superior
,
[
in
]
UINT
width
,
[
in
]
UINT
height
,
[
in
]
WINED3DFORMAT
format
,
[
in
]
enum
wined3d_format_id
format_id
,
[
in
]
WINED3DMULTISAMPLE_TYPE
multisample_type
,
[
in
]
DWORD
multisample_quality
,
[
in
]
BOOL
lockable
,
...
...
@@ -2154,7 +2154,7 @@ interface IWineD3DDeviceParent : IUnknown
[
in
]
IUnknown
*
superior
,
[
in
]
UINT
width
,
[
in
]
UINT
height
,
[
in
]
WINED3DFORMAT
format
,
[
in
]
enum
wined3d_format_id
format_id
,
[
in
]
WINED3DMULTISAMPLE_TYPE
multisample_type
,
[
in
]
DWORD
multisample_quality
,
[
in
]
BOOL
discard
,
...
...
@@ -2166,7 +2166,7 @@ interface IWineD3DDeviceParent : IUnknown
[
in
]
UINT
width
,
[
in
]
UINT
height
,
[
in
]
UINT
depth
,
[
in
]
WINED3DFORMAT
format
,
[
in
]
enum
wined3d_format_id
format_id
,
[
in
]
WINED3DPOOL
pool
,
[
in
]
DWORD
usage
,
[
out
]
IWineD3DVolume
**
volume
...
...
@@ -2209,11 +2209,11 @@ interface IWineD3D : IWineD3DBase
)
;
UINT
GetAdapterModeCount
(
[
in
]
UINT
adapter_idx
,
[
in
]
WINED3DFORMAT
format
[
in
]
enum
wined3d_format_id
format_id
)
;
HRESULT
EnumAdapterModes
(
[
in
]
UINT
adapter_idx
,
[
in
]
WINED3DFORMAT
format
,
[
in
]
enum
wined3d_format_id
format_id
,
[
in
]
UINT
mode_idx
,
[
out
]
WINED3DDISPLAYMODE
*
mode
)
;
...
...
@@ -2229,7 +2229,7 @@ interface IWineD3D : IWineD3DBase
HRESULT
CheckDeviceMultiSampleType
(
[
in
]
UINT
adapter_idx
,
[
in
]
WINED3DDEVTYPE
device_type
,
[
in
]
WINED3DFORMAT
surface_format
,
[
in
]
enum
wined3d_format_id
surface_format_id
,
[
in
]
BOOL
windowed
,
[
in
]
WINED3DMULTISAMPLE_TYPE
multisample_type
,
[
out
]
DWORD
*
quality_levels
...
...
@@ -2237,31 +2237,31 @@ interface IWineD3D : IWineD3DBase
HRESULT
CheckDepthStencilMatch
(
[
in
]
UINT
adapter_idx
,
[
in
]
WINED3DDEVTYPE
device_type
,
[
in
]
WINED3DFORMAT
adapter_format
,
[
in
]
WINED3DFORMAT
render_target_format
,
[
in
]
WINED3DFORMAT
depth_stencil_format
[
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
]
WINED3DFORMAT
display_format
,
[
in
]
WINED3DFORMAT
backbuffer_format
,
[
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
]
WINED3DFORMAT
adapter_format
,
[
in
]
enum
wined3d_format_id
adapter_format_id
,
[
in
]
DWORD
usage
,
[
in
]
WINED3DRESOURCETYPE
resource_type
,
[
in
]
WINED3DFORMAT
check_format
,
[
in
]
enum
wined3d_format_id
check_format
,
[
in
]
WINED3DSURFTYPE
surface_type
)
;
HRESULT
CheckDeviceFormatConversion
(
[
in
]
UINT
adapter_idx
,
[
in
]
WINED3DDEVTYPE
device_type
,
[
in
]
WINED3DFORMAT
source_format
,
[
in
]
WINED3DFORMAT
target_format
[
in
]
enum
wined3d_format_id
source_format_id
,
[
in
]
enum
wined3d_format_id
target_format_id
)
;
HRESULT
GetDeviceCaps
(
[
in
]
UINT
adapter_idx
,
...
...
@@ -2484,7 +2484,7 @@ interface IWineD3DSurface : IWineD3DResource
const
void
*
GetData
(
)
;
HRESULT
SetFormat
(
[
in
]
WINED3DFORMAT
format
[
in
]
enum
wined3d_format_id
format_id
)
;
HRESULT
PrivateSetup
(
)
;
...
...
@@ -2842,7 +2842,7 @@ interface IWineD3DDevice : IWineD3DBase
HRESULT
CreateSurface
(
[
in
]
UINT
width
,
[
in
]
UINT
height
,
[
in
]
WINED3DFORMAT
format
,
[
in
]
enum
wined3d_format_id
format_id
,
[
in
]
BOOL
lockable
,
[
in
]
BOOL
discard
,
[
in
]
UINT
level
,
...
...
@@ -2865,7 +2865,7 @@ interface IWineD3DDevice : IWineD3DBase
[
in
]
UINT
height
,
[
in
]
UINT
levels
,
[
in
]
DWORD
usage
,
[
in
]
WINED3DFORMAT
format
,
[
in
]
enum
wined3d_format_id
format_id
,
[
in
]
WINED3DPOOL
pool
,
[
out
]
IWineD3DTexture
**
texture
,
[
in
]
IUnknown
*
parent
,
...
...
@@ -2877,7 +2877,7 @@ interface IWineD3DDevice : IWineD3DBase
[
in
]
UINT
depth
,
[
in
]
UINT
levels
,
[
in
]
DWORD
usage
,
[
in
]
WINED3DFORMAT
format
,
[
in
]
enum
wined3d_format_id
format_id
,
[
in
]
WINED3DPOOL
pool
,
[
out
]
IWineD3DVolumeTexture
**
texture
,
[
in
]
IUnknown
*
parent
,
...
...
@@ -2888,7 +2888,7 @@ interface IWineD3DDevice : IWineD3DBase
[
in
]
UINT
height
,
[
in
]
UINT
depth
,
[
in
]
DWORD
usage
,
[
in
]
WINED3DFORMAT
format
,
[
in
]
enum
wined3d_format_id
format_id
,
[
in
]
WINED3DPOOL
pool
,
[
out
]
IWineD3DVolume
**
volume
,
[
in
]
IUnknown
*
parent
,
...
...
@@ -2898,7 +2898,7 @@ interface IWineD3DDevice : IWineD3DBase
[
in
]
UINT
edge_length
,
[
in
]
UINT
levels
,
[
in
]
DWORD
usage
,
[
in
]
WINED3DFORMAT
format
,
[
in
]
enum
wined3d_format_id
format_id
,
[
in
]
WINED3DPOOL
pool
,
[
out
]
IWineD3DCubeTexture
**
texture
,
[
in
]
IUnknown
*
parent
,
...
...
@@ -3062,7 +3062,7 @@ interface IWineD3DDevice : IWineD3DBase
)
;
HRESULT
SetIndexBuffer
(
[
in
]
IWineD3DBuffer
*
index_buffer
,
[
in
]
WINED3DFORMAT
format
[
in
]
enum
wined3d_format_id
format_id
)
;
HRESULT
GetIndexBuffer
(
[
out
]
IWineD3DBuffer
**
index_buffer
...
...
@@ -3345,7 +3345,7 @@ interface IWineD3DDevice : IWineD3DBase
HRESULT
DrawIndexedPrimitiveUP
(
[
in
]
UINT
index_count
,
[
in
]
const
void
*
index_data
,
[
in
]
WINED3DFORMAT
index_data_format
,
[
in
]
enum
wined3d_format_id
index_data_format_id
,
[
in
]
const
void
*
stream_data
,
[
in
]
UINT
stream_stride
)
;
...
...
@@ -3358,7 +3358,7 @@ interface IWineD3DDevice : IWineD3DBase
[
in
]
const
WineDirect3DVertexStridedData
*
strided_data
,
[
in
]
UINT
vertex_count
,
[
in
]
const
void
*
index_data
,
[
in
]
WINED3DFORMAT
index_data_format
[
in
]
enum
wined3d_format_id
index_data_format_id
)
;
HRESULT
DrawRectPatch
(
[
in
]
UINT
handle
,
...
...
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