[PATCH 5/5] wined3d: Rename WINED3DFORMAT to wined3d_format_id.
Henri Verbeet
hverbeet at codeweavers.com
Mon Aug 23 11:28:10 CDT 2010
---
dlls/d3d10core/d3d10core_private.h | 4 +-
dlls/d3d10core/device.c | 14 +++--
dlls/d3d10core/utils.c | 6 +-
dlls/d3d8/d3d8_private.h | 13 ++---
dlls/d3d8/device.c | 22 ++++----
dlls/d3d8/vertexdeclaration.c | 2 +-
dlls/d3d8/volume.c | 2 +-
dlls/d3d9/d3d9_private.h | 8 ++--
dlls/d3d9/device.c | 20 ++++---
dlls/d3d9/vertexdeclaration.c | 2 +-
dlls/d3d9/volume.c | 2 +-
dlls/ddraw/ddraw.c | 26 +++++----
dlls/ddraw/ddraw_private.h | 4 +-
dlls/ddraw/device.c | 12 ++--
dlls/ddraw/surface.c | 4 +-
dlls/ddraw/utils.c | 16 +++---
dlls/dxgi/dxgi_private.h | 2 +-
dlls/dxgi/output.c | 2 +-
dlls/dxgi/utils.c | 2 +-
dlls/wined3d/buffer.c | 8 ++--
dlls/wined3d/cubetexture.c | 8 ++--
dlls/wined3d/device.c | 18 +++---
dlls/wined3d/directx.c | 69 ++++++++++++++-----------
dlls/wined3d/drawprim.c | 3 +-
dlls/wined3d/surface.c | 9 ++--
dlls/wined3d/surface_base.c | 19 ++++---
dlls/wined3d/swapchain.c | 2 +-
dlls/wined3d/texture.c | 6 +-
dlls/wined3d/utils.c | 99 ++++++++++++++++++++----------------
dlls/wined3d/volume.c | 4 +-
dlls/wined3d/volumetexture.c | 8 ++--
dlls/wined3d/wined3d_private.h | 31 ++++++------
include/wine/wined3d.idl | 68 ++++++++++++------------
33 files changed, 272 insertions(+), 243 deletions(-)
diff --git a/dlls/d3d10core/d3d10core_private.h b/dlls/d3d10core/d3d10core_private.h
index d0bc584..fe170c5 100644
--- a/dlls/d3d10core/d3d10core_private.h
+++ b/dlls/d3d10core/d3d10core_private.h
@@ -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)
{
diff --git a/dlls/d3d10core/device.c b/dlls/d3d10core/device.c
index 9779511..32b8bb0 100644
--- a/dlls/d3d10core/device.c
+++ b/dlls/d3d10core/device.c
@@ -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",
diff --git a/dlls/d3d10core/utils.c b/dlls/d3d10core/utils.c
index 206efdf..78e1348 100644
--- a/dlls/d3d10core/utils.c
+++ b/dlls/d3d10core/utils.c
@@ -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)
{
diff --git a/dlls/d3d8/d3d8_private.h b/dlls/d3d8/d3d8_private.h
index 4ba399b..7e89667 100644
--- a/dlls/d3d8/d3d8_private.h
+++ b/dlls/d3d8/d3d8_private.h
@@ -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;
diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c
index fad94e4..c2dd948 100644
--- a/dlls/d3d8/device.c
+++ b/dlls/d3d8/device.c
@@ -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);
diff --git a/dlls/d3d8/vertexdeclaration.c b/dlls/d3d8/vertexdeclaration.c
index b876b66..0d54eba 100644
--- a/dlls/d3d8/vertexdeclaration.c
+++ b/dlls/d3d8/vertexdeclaration.c
@@ -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,
diff --git a/dlls/d3d8/volume.c b/dlls/d3d8/volume.c
index 8e8dc60..b7413bb 100644
--- a/dlls/d3d8/volume.c
+++ b/dlls/d3d8/volume.c
@@ -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;
diff --git a/dlls/d3d9/d3d9_private.h b/dlls/d3d9/d3d9_private.h
index eb3a032..a17ab37 100644
--- a/dlls/d3d9/d3d9_private.h
+++ b/dlls/d3d9/d3d9_private.h
@@ -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,
diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c
index 76e1964..9af042d 100644
--- a/dlls/d3d9/device.c
+++ b/dlls/d3d9/device.c
@@ -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);
diff --git a/dlls/d3d9/vertexdeclaration.c b/dlls/d3d9/vertexdeclaration.c
index d3ee1dc..5bdf0ec 100644
--- a/dlls/d3d9/vertexdeclaration.c
+++ b/dlls/d3d9/vertexdeclaration.c
@@ -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;
diff --git a/dlls/d3d9/volume.c b/dlls/d3d9/volume.c
index baa286b..ceb88bd 100644
--- a/dlls/d3d9/volume.c
+++ b/dlls/d3d9/volume.c
@@ -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;
diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c
index 572c790..af5eb37 100644
--- a/dlls/ddraw/ddraw.c
+++ b/dlls/ddraw/ddraw.c
@@ -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",
diff --git a/dlls/ddraw/ddraw_private.h b/dlls/ddraw/ddraw_private.h
index 5c85e26..9b3f614 100644
--- a/dlls/ddraw/ddraw_private.h
+++ b/dlls/ddraw/ddraw_private.h
@@ -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;
diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c
index 3b39177..4677f6e 100644
--- a/dlls/ddraw/device.c
+++ b/dlls/ddraw/device.c
@@ -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 */,
diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c
index 8583bc8..aa478df 100644
--- a/dlls/ddraw/surface.c
+++ b/dlls/ddraw/surface.c
@@ -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;
diff --git a/dlls/ddraw/utils.c b/dlls/ddraw/utils.c
index 89234c1..9ba7b9c 100644
--- a/dlls/ddraw/utils.c
+++ b/dlls/ddraw/utils.c
@@ -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))
diff --git a/dlls/dxgi/dxgi_private.h b/dlls/dxgi/dxgi_private.h
index 2a46e40..f4e098f 100644
--- a/dlls/dxgi/dxgi_private.h
+++ b/dlls/dxgi/dxgi_private.h
@@ -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
diff --git a/dlls/dxgi/output.c b/dlls/dxgi/output.c
index eee6e55..c1f989b 100644
--- a/dlls/dxgi/output.c
+++ b/dlls/dxgi/output.c
@@ -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;
diff --git a/dlls/dxgi/utils.c b/dlls/dxgi/utils.c
index c2999f8..1d3e320 100644
--- a/dlls/dxgi/utils.c
+++ b/dlls/dxgi/utils.c
@@ -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)
{
diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
index 31a1492..eb79437 100644
--- a/dlls/wined3d/buffer.c
+++ b/dlls/wined3d/buffer.c
@@ -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;
diff --git a/dlls/wined3d/cubetexture.c b/dlls/wined3d/cubetexture.c
index acdf4d3..7f6958c 100644
--- a/dlls/wined3d/cubetexture.c
+++ b/dlls/wined3d/cubetexture.c
@@ -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);
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index ba77888..963d132 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -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);
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
index be44e68..0cb5fee 100644
--- a/dlls/wined3d/directx.c
+++ b/dlls/wined3d/directx.c
@@ -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),
diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c
index 4f70811..1e634de 100644
--- a/dlls/wined3d/drawprim.c
+++ b/dlls/wined3d/drawprim.c
@@ -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;
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 23af293..1caf0b1 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -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;
diff --git a/dlls/wined3d/surface_base.c b/dlls/wined3d/surface_base.c
index a7ac270..6c19218 100644
--- a/dlls/wined3d/surface_base.c
+++ b/dlls/wined3d/surface_base.c
@@ -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;
diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
index 5b8a659..ee8ac9e 100644
--- a/dlls/wined3d/swapchain.c
+++ b/dlls/wined3d/swapchain.c
@@ -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,
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
index e3c0bb5..e2090b6 100644
--- a/dlls/wined3d/texture.c
+++ b/dlls/wined3d/texture.c
@@ -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;
diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
index b6d7eab..64f7809 100644
--- a/dlls/wined3d/utils.c
+++ b/dlls/wined3d/utils.c
@@ -31,7 +31,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d);
struct StaticPixelFormatDesc
{
- WINED3DFORMAT format;
+ enum wined3d_format_id id;
DWORD alphaMask, redMask, greenMask, blueMask;
UINT bpp;
short depthSize, stencilSize;
@@ -49,7 +49,7 @@ struct StaticPixelFormatDesc
*/
static const struct StaticPixelFormatDesc formats[] =
{
- /* WINED3DFORMAT alphamask redmask greenmask bluemask bpp depth stencil */
+ /* format id alphamask redmask greenmask bluemask bpp depth stencil */
{WINED3DFMT_UNKNOWN, 0x0, 0x0, 0x0, 0x0, 0, 0, 0},
/* FourCC formats */
{WINED3DFMT_UYVY, 0x0, 0x0, 0x0, 0x0, 2, 0, 0},
@@ -135,7 +135,7 @@ static const struct StaticPixelFormatDesc formats[] =
struct wined3d_format_base_flags
{
- WINED3DFORMAT format;
+ enum wined3d_format_id id;
DWORD flags;
};
@@ -182,7 +182,7 @@ static const struct wined3d_format_base_flags format_base_flags[] =
struct wined3d_format_compression_info
{
- WINED3DFORMAT format;
+ enum wined3d_format_id id;
UINT block_width;
UINT block_height;
UINT block_byte_count;
@@ -200,7 +200,7 @@ static const struct wined3d_format_compression_info format_compression_info[] =
struct wined3d_format_vertex_info
{
- WINED3DFORMAT format;
+ enum wined3d_format_id id;
enum wined3d_ffp_emit_idx emit_idx;
GLint component_count;
GLenum gl_vtx_type;
@@ -232,7 +232,7 @@ static const struct wined3d_format_vertex_info format_vertex_info[] =
struct wined3d_format_texture_info
{
- WINED3DFORMAT format;
+ enum wined3d_format_id id;
GLint gl_internal;
GLint gl_srgb_internal;
GLint gl_rt_internal;
@@ -552,7 +552,7 @@ static void convert_s8_uint_d24_float(const BYTE *src, BYTE *dst, UINT pitch, UI
static const struct wined3d_format_texture_info format_texture_info[] =
{
- /* WINED3DFORMAT internal srgbInternal rtInternal
+ /* format id internal srgbInternal rtInternal
format type
flags
extension */
@@ -856,18 +856,22 @@ static const struct wined3d_format_texture_info format_texture_info[] =
ARB_TEXTURE_COMPRESSION_RGTC, NULL},
};
-static inline int getFmtIdx(WINED3DFORMAT fmt) {
+static inline int getFmtIdx(enum wined3d_format_id format_id)
+{
/* First check if the format is at the position of its value.
- * This will catch the argb formats before the loop is entered
- */
- if(fmt < (sizeof(formats) / sizeof(formats[0])) && formats[fmt].format == fmt) {
- return fmt;
- } else {
+ * This will catch the argb formats before the loop is entered. */
+ if (format_id < (sizeof(formats) / sizeof(*formats))
+ && formats[format_id].id == format_id)
+ {
+ return format_id;
+ }
+ else
+ {
unsigned int i;
- for(i = 0; i < (sizeof(formats) / sizeof(formats[0])); i++) {
- if(formats[i].format == fmt) {
- return i;
- }
+
+ for (i = 0; i < (sizeof(formats) / sizeof(*formats)); ++i)
+ {
+ if (formats[i].id == format_id) return i;
}
}
return -1;
@@ -888,7 +892,7 @@ static BOOL init_format_base_info(struct wined3d_gl_info *gl_info)
for (i = 0; i < format_count; ++i)
{
struct wined3d_format_desc *desc = &gl_info->gl_formats[i];
- desc->format = formats[i].format;
+ desc->format = formats[i].id;
desc->red_mask = formats[i].redMask;
desc->green_mask = formats[i].greenMask;
desc->blue_mask = formats[i].blueMask;
@@ -900,12 +904,12 @@ static BOOL init_format_base_info(struct wined3d_gl_info *gl_info)
for (i = 0; i < (sizeof(format_base_flags) / sizeof(*format_base_flags)); ++i)
{
- int fmt_idx = getFmtIdx(format_base_flags[i].format);
+ int fmt_idx = getFmtIdx(format_base_flags[i].id);
if (fmt_idx == -1)
{
ERR("Format %s (%#x) not found.\n",
- debug_d3dformat(format_base_flags[i].format), format_base_flags[i].format);
+ debug_d3dformat(format_base_flags[i].id), format_base_flags[i].id);
HeapFree(GetProcessHeap(), 0, gl_info->gl_formats);
return FALSE;
}
@@ -923,12 +927,12 @@ static BOOL init_format_compression_info(struct wined3d_gl_info *gl_info)
for (i = 0; i < (sizeof(format_compression_info) / sizeof(*format_compression_info)); ++i)
{
struct wined3d_format_desc *format_desc;
- int fmt_idx = getFmtIdx(format_compression_info[i].format);
+ int fmt_idx = getFmtIdx(format_compression_info[i].id);
if (fmt_idx == -1)
{
ERR("Format %s (%#x) not found.\n",
- debug_d3dformat(format_compression_info[i].format), format_compression_info[i].format);
+ debug_d3dformat(format_compression_info[i].id), format_compression_info[i].id);
return FALSE;
}
@@ -1147,13 +1151,13 @@ static BOOL init_format_texture_info(struct wined3d_gl_info *gl_info)
for (i = 0; i < sizeof(format_texture_info) / sizeof(*format_texture_info); ++i)
{
- int fmt_idx = getFmtIdx(format_texture_info[i].format);
+ int fmt_idx = getFmtIdx(format_texture_info[i].id);
struct wined3d_format_desc *desc;
if (fmt_idx == -1)
{
ERR("Format %s (%#x) not found.\n",
- debug_d3dformat(format_texture_info[i].format), format_texture_info[i].format);
+ debug_d3dformat(format_texture_info[i].id), format_texture_info[i].id);
return FALSE;
}
@@ -1291,7 +1295,7 @@ static void init_format_filter_info(struct wined3d_gl_info *gl_info, enum wined3
{
struct wined3d_format_desc *desc;
unsigned int fmt_idx, i;
- static const WINED3DFORMAT fmts16[] =
+ static const enum wined3d_format_id fmts16[] =
{
WINED3DFMT_R16_FLOAT,
WINED3DFMT_R16G16_FLOAT,
@@ -1482,12 +1486,12 @@ static BOOL init_format_vertex_info(struct wined3d_gl_info *gl_info)
for (i = 0; i < (sizeof(format_vertex_info) / sizeof(*format_vertex_info)); ++i)
{
struct wined3d_format_desc *format_desc;
- int fmt_idx = getFmtIdx(format_vertex_info[i].format);
+ int fmt_idx = getFmtIdx(format_vertex_info[i].id);
if (fmt_idx == -1)
{
ERR("Format %s (%#x) not found.\n",
- debug_d3dformat(format_vertex_info[i].format), format_vertex_info[i].format);
+ debug_d3dformat(format_vertex_info[i].id), format_vertex_info[i].id);
return FALSE;
}
@@ -1538,12 +1542,15 @@ fail:
return FALSE;
}
-const struct wined3d_format_desc *getFormatDescEntry(WINED3DFORMAT fmt, const struct wined3d_gl_info *gl_info)
+const struct wined3d_format_desc *getFormatDescEntry(enum wined3d_format_id format_id,
+ const struct wined3d_gl_info *gl_info)
{
- int idx = getFmtIdx(fmt);
+ int idx = getFmtIdx(format_id);
- if(idx == -1) {
- FIXME("Can't find format %s (%#x) in the format lookup table\n", debug_d3dformat(fmt), fmt);
+ if (idx == -1)
+ {
+ FIXME("Can't find format %s (%#x) in the format lookup table\n",
+ debug_d3dformat(format_id), format_id);
/* Get the caller a valid pointer */
idx = getFmtIdx(WINED3DFMT_UNKNOWN);
}
@@ -1578,9 +1585,11 @@ UINT wined3d_format_calculate_size(const struct wined3d_format_desc *format, UIN
/*****************************************************************************
* Trace formatting of useful values
*/
-const char* debug_d3dformat(WINED3DFORMAT fmt) {
- switch (fmt) {
-#define FMT_TO_STR(fmt) case fmt: return #fmt
+const char *debug_d3dformat(enum wined3d_format_id format_id)
+{
+ switch (format_id)
+ {
+#define FMT_TO_STR(format_id) case format_id: return #format_id
FMT_TO_STR(WINED3DFMT_UNKNOWN);
FMT_TO_STR(WINED3DFMT_B8G8R8_UNORM);
FMT_TO_STR(WINED3DFMT_B5G5R5X1_UNORM);
@@ -1715,15 +1724,15 @@ const char* debug_d3dformat(WINED3DFORMAT fmt) {
default:
{
char fourcc[5];
- fourcc[0] = (char)(fmt);
- fourcc[1] = (char)(fmt >> 8);
- fourcc[2] = (char)(fmt >> 16);
- fourcc[3] = (char)(fmt >> 24);
+ fourcc[0] = (char)(format_id);
+ fourcc[1] = (char)(format_id >> 8);
+ fourcc[2] = (char)(format_id >> 16);
+ fourcc[3] = (char)(format_id >> 24);
fourcc[4] = 0;
if (isprint(fourcc[0]) && isprint(fourcc[1]) && isprint(fourcc[2]) && isprint(fourcc[3]))
- FIXME("Unrecognized %#x (as fourcc: %s) WINED3DFORMAT!\n", fmt, fourcc);
+ FIXME("Unrecognized %#x (as fourcc: %s) WINED3DFORMAT!\n", format_id, fourcc);
else
- FIXME("Unrecognized %#x WINED3DFORMAT!\n", fmt);
+ FIXME("Unrecognized %#x WINED3DFORMAT!\n", format_id);
}
return "unrecognized";
}
@@ -2360,7 +2369,7 @@ BOOL is_invalid_op(IWineD3DDeviceImpl *This, int stage, WINED3DTEXTUREOP op, DWO
/* Setup this textures matrix according to the texture flags*/
/* GL locking is done by the caller (state handler) */
void set_texture_matrix(const float *smat, DWORD flags, BOOL calculatedCoords, BOOL transformed,
- WINED3DFORMAT vtx_fmt, BOOL ffp_proj_control)
+ enum wined3d_format_id vtx_fmt, BOOL ffp_proj_control)
{
float mat[16];
@@ -2534,7 +2543,7 @@ BOOL getDepthStencilBits(const struct wined3d_format_desc *format_desc, short *d
DWORD wined3d_format_convert_from_float(const struct wined3d_format_desc *format, const WINED3DCOLORVALUE *color)
{
- WINED3DFORMAT destfmt = format->format;
+ enum wined3d_format_id destfmt = format->format;
unsigned int r, g, b, a;
DWORD ret;
@@ -2650,8 +2659,10 @@ DWORD wined3d_format_convert_from_float(const struct wined3d_format_desc *format
}
/* DirectDraw stuff */
-WINED3DFORMAT pixelformat_for_depth(DWORD depth) {
- switch(depth) {
+enum wined3d_format_id pixelformat_for_depth(DWORD depth)
+{
+ switch (depth)
+ {
case 8: return WINED3DFMT_P8_UINT;
case 15: return WINED3DFMT_B5G5R5X1_UNORM;
case 16: return WINED3DFMT_B5G6R5_UNORM;
diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c
index 9b82fab..eeb9361 100644
--- a/dlls/wined3d/volume.c
+++ b/dlls/wined3d/volume.c
@@ -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])
diff --git a/dlls/wined3d/volumetexture.c b/dlls/wined3d/volumetexture.c
index b1f7ae6..e647158 100644
--- a/dlls/wined3d/volumetexture.c
+++ b/dlls/wined3d/volumetexture.c
@@ -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);
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index a96dd90..84415d6 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -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;
diff --git a/include/wine/wined3d.idl b/include/wine/wined3d.idl
index 853c2d7..ee3f364 100644
--- a/include/wine/wined3d.idl
+++ b/include/wine/wined3d.idl
@@ -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 = 0xffffffff
-} 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,
--
1.7.1
More information about the wine-patches
mailing list