wined3d: Rename WINED3DFORMAT to wined3d_format_id.
This commit is contained in:
parent
0df144164b
commit
cc5271d1b7
|
@ -52,8 +52,8 @@ struct d3d10_shader_info
|
||||||
const char *debug_d3d10_primitive_topology(D3D10_PRIMITIVE_TOPOLOGY topology) DECLSPEC_HIDDEN;
|
const char *debug_d3d10_primitive_topology(D3D10_PRIMITIVE_TOPOLOGY topology) DECLSPEC_HIDDEN;
|
||||||
const char *debug_dxgi_format(DXGI_FORMAT format) DECLSPEC_HIDDEN;
|
const char *debug_dxgi_format(DXGI_FORMAT format) DECLSPEC_HIDDEN;
|
||||||
|
|
||||||
DXGI_FORMAT dxgi_format_from_wined3dformat(WINED3DFORMAT format) DECLSPEC_HIDDEN;
|
DXGI_FORMAT dxgi_format_from_wined3dformat(enum wined3d_format_id 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;
|
||||||
|
|
||||||
static inline void read_dword(const char **ptr, DWORD *d)
|
static inline void read_dword(const char **ptr, DWORD *d)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1291,7 +1291,7 @@ static void STDMETHODCALLTYPE device_parent_WineD3DDeviceCreated(IWineD3DDeviceP
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT STDMETHODCALLTYPE device_parent_CreateSurface(IWineD3DDeviceParent *iface,
|
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)
|
WINED3DPOOL pool, UINT level, WINED3DCUBEMAP_FACES face, IWineD3DSurface **surface)
|
||||||
{
|
{
|
||||||
struct d3d10_device *This = device_from_device_parent(iface);
|
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,
|
static HRESULT STDMETHODCALLTYPE device_parent_CreateRenderTarget(IWineD3DDeviceParent *iface,
|
||||||
IUnknown *superior, UINT width, UINT height, WINED3DFORMAT format, WINED3DMULTISAMPLE_TYPE multisample_type,
|
IUnknown *superior, UINT width, UINT height, enum wined3d_format_id format,
|
||||||
DWORD multisample_quality, BOOL lockable, IWineD3DSurface **surface)
|
WINED3DMULTISAMPLE_TYPE multisample_type, DWORD multisample_quality, BOOL lockable,
|
||||||
|
IWineD3DSurface **surface)
|
||||||
{
|
{
|
||||||
struct d3d10_device *This = device_from_device_parent(iface);
|
struct d3d10_device *This = device_from_device_parent(iface);
|
||||||
struct d3d10_texture2d *texture;
|
struct d3d10_texture2d *texture;
|
||||||
|
@ -1373,8 +1374,9 @@ static HRESULT STDMETHODCALLTYPE device_parent_CreateRenderTarget(IWineD3DDevice
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT STDMETHODCALLTYPE device_parent_CreateDepthStencilSurface(IWineD3DDeviceParent *iface,
|
static HRESULT STDMETHODCALLTYPE device_parent_CreateDepthStencilSurface(IWineD3DDeviceParent *iface,
|
||||||
IUnknown *superior, UINT width, UINT height, WINED3DFORMAT format, WINED3DMULTISAMPLE_TYPE multisample_type,
|
IUnknown *superior, UINT width, UINT height, enum wined3d_format_id format,
|
||||||
DWORD multisample_quality, BOOL discard, IWineD3DSurface **surface)
|
WINED3DMULTISAMPLE_TYPE multisample_type, DWORD multisample_quality, BOOL discard,
|
||||||
|
IWineD3DSurface **surface)
|
||||||
{
|
{
|
||||||
struct d3d10_device *This = device_from_device_parent(iface);
|
struct d3d10_device *This = device_from_device_parent(iface);
|
||||||
struct d3d10_texture2d *texture;
|
struct d3d10_texture2d *texture;
|
||||||
|
@ -1414,7 +1416,7 @@ static HRESULT STDMETHODCALLTYPE device_parent_CreateDepthStencilSurface(IWineD3
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT STDMETHODCALLTYPE device_parent_CreateVolume(IWineD3DDeviceParent *iface,
|
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)
|
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",
|
FIXME("iface %p, superior %p, width %u, height %u, depth %u, format %#x, pool %#x, usage %#x, volume %p stub!\n",
|
||||||
|
|
|
@ -147,7 +147,7 @@ const char *debug_dxgi_format(DXGI_FORMAT format)
|
||||||
|
|
||||||
#undef WINE_D3D10_TO_STR
|
#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)
|
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_B8G8R8A8_UNORM: return DXGI_FORMAT_B8G8R8A8_UNORM;
|
||||||
case WINED3DFMT_B8G8R8X8_UNORM: return DXGI_FORMAT_B8G8R8X8_UNORM;
|
case WINED3DFMT_B8G8R8X8_UNORM: return DXGI_FORMAT_B8G8R8X8_UNORM;
|
||||||
default:
|
default:
|
||||||
FIXME("Unhandled WINED3DFORMAT %#x\n", format);
|
FIXME("Unhandled wined3d format %#x.\n", format);
|
||||||
return WINED3DFMT_UNKNOWN;
|
return WINED3DFMT_UNKNOWN;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
WINED3DFORMAT wined3dformat_from_dxgi_format(DXGI_FORMAT format)
|
enum wined3d_format_id wined3dformat_from_dxgi_format(DXGI_FORMAT format)
|
||||||
{
|
{
|
||||||
switch(format)
|
switch(format)
|
||||||
{
|
{
|
||||||
|
|
|
@ -220,7 +220,7 @@ struct IDirect3DVolume8Impl
|
||||||
};
|
};
|
||||||
|
|
||||||
HRESULT volume_init(IDirect3DVolume8Impl *volume, IDirect3DDevice8Impl *device, UINT width, UINT height,
|
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 */
|
/* IDirect3DSwapChain8 */
|
||||||
|
@ -329,7 +329,7 @@ struct IDirect3DIndexBuffer8Impl
|
||||||
/* Parent reference */
|
/* Parent reference */
|
||||||
LPDIRECT3DDEVICE8 parentDevice;
|
LPDIRECT3DDEVICE8 parentDevice;
|
||||||
|
|
||||||
WINED3DFORMAT format;
|
enum wined3d_format_id format;
|
||||||
};
|
};
|
||||||
|
|
||||||
HRESULT indexbuffer_init(IDirect3DIndexBuffer8Impl *buffer, IDirect3DDevice8Impl *device,
|
HRESULT indexbuffer_init(IDirect3DIndexBuffer8Impl *buffer, IDirect3DDevice8Impl *device,
|
||||||
|
@ -535,13 +535,8 @@ typedef struct IDirect3DPixelShader8Impl {
|
||||||
HRESULT pixelshader_init(IDirect3DPixelShader8Impl *shader, IDirect3DDevice8Impl *device,
|
HRESULT pixelshader_init(IDirect3DPixelShader8Impl *shader, IDirect3DDevice8Impl *device,
|
||||||
const DWORD *byte_code, DWORD shader_handle) DECLSPEC_HIDDEN;
|
const DWORD *byte_code, DWORD shader_handle) DECLSPEC_HIDDEN;
|
||||||
|
|
||||||
/**
|
D3DFORMAT d3dformat_from_wined3dformat(enum wined3d_format_id format) DECLSPEC_HIDDEN;
|
||||||
* Internals functions
|
enum wined3d_format_id wined3dformat_from_d3dformat(D3DFORMAT format) DECLSPEC_HIDDEN;
|
||||||
*
|
|
||||||
* to see how not defined it here
|
|
||||||
*/
|
|
||||||
D3DFORMAT d3dformat_from_wined3dformat(WINED3DFORMAT format) DECLSPEC_HIDDEN;
|
|
||||||
WINED3DFORMAT wined3dformat_from_d3dformat(D3DFORMAT format) DECLSPEC_HIDDEN;
|
|
||||||
void load_local_constants(const DWORD *d3d8_elements, IWineD3DVertexShader *wined3d_vertex_shader) 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;
|
size_t parse_token(const DWORD *pToken) DECLSPEC_HIDDEN;
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
|
|
||||||
WINE_DEFAULT_DEBUG_CHANNEL(d3d8);
|
WINE_DEFAULT_DEBUG_CHANNEL(d3d8);
|
||||||
|
|
||||||
D3DFORMAT d3dformat_from_wined3dformat(WINED3DFORMAT format)
|
D3DFORMAT d3dformat_from_wined3dformat(enum wined3d_format_id format)
|
||||||
{
|
{
|
||||||
BYTE *c = (BYTE *)&format;
|
BYTE *c = (BYTE *)&format;
|
||||||
|
|
||||||
|
@ -82,12 +82,12 @@ D3DFORMAT d3dformat_from_wined3dformat(WINED3DFORMAT format)
|
||||||
case WINED3DFMT_R16_UINT: return D3DFMT_INDEX16;
|
case WINED3DFMT_R16_UINT: return D3DFMT_INDEX16;
|
||||||
case WINED3DFMT_R32_UINT: return D3DFMT_INDEX32;
|
case WINED3DFMT_R32_UINT: return D3DFMT_INDEX32;
|
||||||
default:
|
default:
|
||||||
FIXME("Unhandled WINED3DFORMAT %#x\n", format);
|
FIXME("Unhandled wined3d format %#x.\n", format);
|
||||||
return D3DFMT_UNKNOWN;
|
return D3DFMT_UNKNOWN;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
WINED3DFORMAT wined3dformat_from_d3dformat(D3DFORMAT format)
|
enum wined3d_format_id wined3dformat_from_d3dformat(D3DFORMAT format)
|
||||||
{
|
{
|
||||||
BYTE *c = (BYTE *)&format;
|
BYTE *c = (BYTE *)&format;
|
||||||
|
|
||||||
|
@ -879,7 +879,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_CopyRects(LPDIRECT3DDEVICE8 iface, ID
|
||||||
IDirect3DSurface8Impl *Dest = (IDirect3DSurface8Impl *) pDestinationSurface;
|
IDirect3DSurface8Impl *Dest = (IDirect3DSurface8Impl *) pDestinationSurface;
|
||||||
|
|
||||||
HRESULT hr = WINED3D_OK;
|
HRESULT hr = WINED3D_OK;
|
||||||
WINED3DFORMAT srcFormat, destFormat;
|
enum wined3d_format_id srcFormat, destFormat;
|
||||||
WINED3DSURFACE_DESC winedesc;
|
WINED3DSURFACE_DESC winedesc;
|
||||||
|
|
||||||
TRACE("iface %p, src_surface %p, src_rects %p, rect_count %u, dst_surface %p, dst_points %p.\n",
|
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,
|
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)
|
WINED3DPOOL pool, UINT level, WINED3DCUBEMAP_FACES face, IWineD3DSurface **surface)
|
||||||
{
|
{
|
||||||
struct IDirect3DDevice8Impl *This = device_from_device_parent(iface);
|
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,
|
static HRESULT STDMETHODCALLTYPE device_parent_CreateRenderTarget(IWineD3DDeviceParent *iface,
|
||||||
IUnknown *superior, UINT width, UINT height, WINED3DFORMAT format, WINED3DMULTISAMPLE_TYPE multisample_type,
|
IUnknown *superior, UINT width, UINT height, enum wined3d_format_id format,
|
||||||
DWORD multisample_quality, BOOL lockable, IWineD3DSurface **surface)
|
WINED3DMULTISAMPLE_TYPE multisample_type, DWORD multisample_quality, BOOL lockable,
|
||||||
|
IWineD3DSurface **surface)
|
||||||
{
|
{
|
||||||
struct IDirect3DDevice8Impl *This = device_from_device_parent(iface);
|
struct IDirect3DDevice8Impl *This = device_from_device_parent(iface);
|
||||||
IDirect3DSurface8Impl *d3d_surface;
|
IDirect3DSurface8Impl *d3d_surface;
|
||||||
|
@ -2623,8 +2624,9 @@ static HRESULT STDMETHODCALLTYPE device_parent_CreateRenderTarget(IWineD3DDevice
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT STDMETHODCALLTYPE device_parent_CreateDepthStencilSurface(IWineD3DDeviceParent *iface,
|
static HRESULT STDMETHODCALLTYPE device_parent_CreateDepthStencilSurface(IWineD3DDeviceParent *iface,
|
||||||
IUnknown *superior, UINT width, UINT height, WINED3DFORMAT format, WINED3DMULTISAMPLE_TYPE multisample_type,
|
IUnknown *superior, UINT width, UINT height, enum wined3d_format_id format,
|
||||||
DWORD multisample_quality, BOOL discard, IWineD3DSurface **surface)
|
WINED3DMULTISAMPLE_TYPE multisample_type, DWORD multisample_quality, BOOL discard,
|
||||||
|
IWineD3DSurface **surface)
|
||||||
{
|
{
|
||||||
struct IDirect3DDevice8Impl *This = device_from_device_parent(iface);
|
struct IDirect3DDevice8Impl *This = device_from_device_parent(iface);
|
||||||
IDirect3DSurface8Impl *d3d_surface;
|
IDirect3DSurface8Impl *d3d_surface;
|
||||||
|
@ -2653,7 +2655,7 @@ static HRESULT STDMETHODCALLTYPE device_parent_CreateDepthStencilSurface(IWineD3
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT STDMETHODCALLTYPE device_parent_CreateVolume(IWineD3DDeviceParent *iface,
|
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)
|
WINED3DPOOL pool, DWORD usage, IWineD3DVolume **volume)
|
||||||
{
|
{
|
||||||
struct IDirect3DDevice8Impl *This = device_from_device_parent(iface);
|
struct IDirect3DDevice8Impl *This = device_from_device_parent(iface);
|
||||||
|
|
|
@ -254,7 +254,7 @@ static const size_t wined3d_type_sizes[] =
|
||||||
/*WINED3DDECLTYPE_FLOAT16_4*/ 4 * sizeof(short int)
|
/*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_FLOAT1*/ WINED3DFMT_R32_FLOAT,
|
||||||
/*WINED3DDECLTYPE_FLOAT2*/ WINED3DFMT_R32G32_FLOAT,
|
/*WINED3DDECLTYPE_FLOAT2*/ WINED3DFMT_R32G32_FLOAT,
|
||||||
|
|
|
@ -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,
|
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;
|
HRESULT hr;
|
||||||
|
|
||||||
|
|
|
@ -42,8 +42,8 @@
|
||||||
Internal use
|
Internal use
|
||||||
=========================================================================== */
|
=========================================================================== */
|
||||||
extern HRESULT vdecl_convert_fvf(DWORD FVF, D3DVERTEXELEMENT9 **ppVertexElements) DECLSPEC_HIDDEN;
|
extern HRESULT vdecl_convert_fvf(DWORD FVF, D3DVERTEXELEMENT9 **ppVertexElements) DECLSPEC_HIDDEN;
|
||||||
D3DFORMAT d3dformat_from_wined3dformat(WINED3DFORMAT format) DECLSPEC_HIDDEN;
|
D3DFORMAT d3dformat_from_wined3dformat(enum wined3d_format_id format) DECLSPEC_HIDDEN;
|
||||||
WINED3DFORMAT wined3dformat_from_d3dformat(D3DFORMAT format) DECLSPEC_HIDDEN;
|
enum wined3d_format_id wined3dformat_from_d3dformat(D3DFORMAT format) DECLSPEC_HIDDEN;
|
||||||
|
|
||||||
/* ===========================================================================
|
/* ===========================================================================
|
||||||
Macros
|
Macros
|
||||||
|
@ -248,7 +248,7 @@ typedef struct IDirect3DVolume9Impl
|
||||||
} IDirect3DVolume9Impl;
|
} IDirect3DVolume9Impl;
|
||||||
|
|
||||||
HRESULT volume_init(IDirect3DVolume9Impl *volume, IDirect3DDevice9Impl *device, UINT width, UINT height,
|
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 */
|
/* IDirect3DSwapChain9 */
|
||||||
|
@ -351,7 +351,7 @@ typedef struct IDirect3DIndexBuffer9Impl
|
||||||
|
|
||||||
/* Parent reference */
|
/* Parent reference */
|
||||||
LPDIRECT3DDEVICE9EX parentDevice;
|
LPDIRECT3DDEVICE9EX parentDevice;
|
||||||
WINED3DFORMAT format;
|
enum wined3d_format_id format;
|
||||||
} IDirect3DIndexBuffer9Impl;
|
} IDirect3DIndexBuffer9Impl;
|
||||||
|
|
||||||
HRESULT indexbuffer_init(IDirect3DIndexBuffer9Impl *buffer, IDirect3DDevice9Impl *device,
|
HRESULT indexbuffer_init(IDirect3DIndexBuffer9Impl *buffer, IDirect3DDevice9Impl *device,
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
|
|
||||||
WINE_DEFAULT_DEBUG_CHANNEL(d3d9);
|
WINE_DEFAULT_DEBUG_CHANNEL(d3d9);
|
||||||
|
|
||||||
D3DFORMAT d3dformat_from_wined3dformat(WINED3DFORMAT format)
|
D3DFORMAT d3dformat_from_wined3dformat(enum wined3d_format_id format)
|
||||||
{
|
{
|
||||||
BYTE *c = (BYTE *)&format;
|
BYTE *c = (BYTE *)&format;
|
||||||
|
|
||||||
|
@ -85,12 +85,12 @@ D3DFORMAT d3dformat_from_wined3dformat(WINED3DFORMAT format)
|
||||||
case WINED3DFMT_R32G32B32A32_FLOAT: return D3DFMT_A32B32G32R32F;
|
case WINED3DFMT_R32G32B32A32_FLOAT: return D3DFMT_A32B32G32R32F;
|
||||||
case WINED3DFMT_R8G8_SNORM_Cx: return D3DFMT_CxV8U8;
|
case WINED3DFMT_R8G8_SNORM_Cx: return D3DFMT_CxV8U8;
|
||||||
default:
|
default:
|
||||||
FIXME("Unhandled WINED3DFORMAT %#x\n", format);
|
FIXME("Unhandled wined3d format %#x.\n", format);
|
||||||
return D3DFMT_UNKNOWN;
|
return D3DFMT_UNKNOWN;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
WINED3DFORMAT wined3dformat_from_d3dformat(D3DFORMAT format)
|
enum wined3d_format_id wined3dformat_from_d3dformat(D3DFORMAT format)
|
||||||
{
|
{
|
||||||
BYTE *c = (BYTE *)&format;
|
BYTE *c = (BYTE *)&format;
|
||||||
|
|
||||||
|
@ -2619,7 +2619,7 @@ static void STDMETHODCALLTYPE device_parent_WineD3DDeviceCreated(IWineD3DDeviceP
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT STDMETHODCALLTYPE device_parent_CreateSurface(IWineD3DDeviceParent *iface,
|
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)
|
WINED3DPOOL pool, UINT level, WINED3DCUBEMAP_FACES face, IWineD3DSurface **surface)
|
||||||
{
|
{
|
||||||
struct IDirect3DDevice9Impl *This = device_from_device_parent(iface);
|
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,
|
static HRESULT STDMETHODCALLTYPE device_parent_CreateRenderTarget(IWineD3DDeviceParent *iface,
|
||||||
IUnknown *superior, UINT width, UINT height, WINED3DFORMAT format, WINED3DMULTISAMPLE_TYPE multisample_type,
|
IUnknown *superior, UINT width, UINT height, enum wined3d_format_id format,
|
||||||
DWORD multisample_quality, BOOL lockable, IWineD3DSurface **surface)
|
WINED3DMULTISAMPLE_TYPE multisample_type, DWORD multisample_quality, BOOL lockable,
|
||||||
|
IWineD3DSurface **surface)
|
||||||
{
|
{
|
||||||
struct IDirect3DDevice9Impl *This = device_from_device_parent(iface);
|
struct IDirect3DDevice9Impl *This = device_from_device_parent(iface);
|
||||||
IDirect3DSurface9Impl *d3d_surface;
|
IDirect3DSurface9Impl *d3d_surface;
|
||||||
|
@ -2688,8 +2689,9 @@ static HRESULT STDMETHODCALLTYPE device_parent_CreateRenderTarget(IWineD3DDevice
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT STDMETHODCALLTYPE device_parent_CreateDepthStencilSurface(IWineD3DDeviceParent *iface,
|
static HRESULT STDMETHODCALLTYPE device_parent_CreateDepthStencilSurface(IWineD3DDeviceParent *iface,
|
||||||
IUnknown *superior, UINT width, UINT height, WINED3DFORMAT format, WINED3DMULTISAMPLE_TYPE multisample_type,
|
IUnknown *superior, UINT width, UINT height, enum wined3d_format_id format,
|
||||||
DWORD multisample_quality, BOOL discard, IWineD3DSurface **surface)
|
WINED3DMULTISAMPLE_TYPE multisample_type, DWORD multisample_quality, BOOL discard,
|
||||||
|
IWineD3DSurface **surface)
|
||||||
{
|
{
|
||||||
struct IDirect3DDevice9Impl *This = device_from_device_parent(iface);
|
struct IDirect3DDevice9Impl *This = device_from_device_parent(iface);
|
||||||
IDirect3DSurface9Impl *d3d_surface;
|
IDirect3DSurface9Impl *d3d_surface;
|
||||||
|
@ -2718,7 +2720,7 @@ static HRESULT STDMETHODCALLTYPE device_parent_CreateDepthStencilSurface(IWineD3
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT STDMETHODCALLTYPE device_parent_CreateVolume(IWineD3DDeviceParent *iface,
|
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)
|
WINED3DPOOL pool, DWORD usage, IWineD3DVolume **volume)
|
||||||
{
|
{
|
||||||
struct IDirect3DDevice9Impl *This = device_from_device_parent(iface);
|
struct IDirect3DDevice9Impl *This = device_from_device_parent(iface);
|
||||||
|
|
|
@ -26,7 +26,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d9);
|
||||||
|
|
||||||
typedef struct _D3DDECLTYPE_INFO {
|
typedef struct _D3DDECLTYPE_INFO {
|
||||||
D3DDECLTYPE d3dType;
|
D3DDECLTYPE d3dType;
|
||||||
WINED3DFORMAT format;
|
enum wined3d_format_id format;
|
||||||
int size;
|
int size;
|
||||||
int typesize;
|
int typesize;
|
||||||
} D3DDECLTYPE_INFO;
|
} D3DDECLTYPE_INFO;
|
||||||
|
|
|
@ -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,
|
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;
|
HRESULT hr;
|
||||||
|
|
||||||
|
|
|
@ -1255,7 +1255,7 @@ static HRESULT WINAPI ddraw1_GetDisplayMode(IDirectDraw *iface, DDSURFACEDESC *s
|
||||||
static HRESULT WINAPI ddraw7_GetFourCCCodes(IDirectDraw7 *iface, DWORD *NumCodes, DWORD *Codes)
|
static HRESULT WINAPI ddraw7_GetFourCCCodes(IDirectDraw7 *iface, DWORD *NumCodes, DWORD *Codes)
|
||||||
{
|
{
|
||||||
IDirectDrawImpl *This = (IDirectDrawImpl *)iface;
|
IDirectDrawImpl *This = (IDirectDrawImpl *)iface;
|
||||||
static const WINED3DFORMAT formats[] =
|
static const enum wined3d_format_id formats[] =
|
||||||
{
|
{
|
||||||
WINED3DFMT_YUY2, WINED3DFMT_UYVY, WINED3DFMT_YV12,
|
WINED3DFMT_YUY2, WINED3DFMT_UYVY, WINED3DFMT_YV12,
|
||||||
WINED3DFMT_DXT1, WINED3DFMT_DXT2, WINED3DFMT_DXT3, WINED3DFMT_DXT4, WINED3DFMT_DXT5,
|
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;
|
IDirectDrawImpl *This = (IDirectDrawImpl *)iface;
|
||||||
unsigned int modenum, fmt;
|
unsigned int modenum, fmt;
|
||||||
WINED3DFORMAT pixelformat = WINED3DFMT_UNKNOWN;
|
enum wined3d_format_id pixelformat = WINED3DFMT_UNKNOWN;
|
||||||
WINED3DDISPLAYMODE mode;
|
WINED3DDISPLAYMODE mode;
|
||||||
DDSURFACEDESC2 callback_sd;
|
DDSURFACEDESC2 callback_sd;
|
||||||
WINED3DDISPLAYMODE *enum_modes = NULL;
|
WINED3DDISPLAYMODE *enum_modes = NULL;
|
||||||
unsigned enum_mode_count = 0, enum_mode_array_size = 0;
|
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_B8G8R8X8_UNORM,
|
||||||
WINED3DFMT_B5G6R5_UNORM,
|
WINED3DFMT_B5G6R5_UNORM,
|
||||||
|
@ -2366,7 +2366,7 @@ HRESULT WINAPI ddraw_recreate_surfaces_cb(IDirectDrawSurface7 *surf, DDSURFACEDE
|
||||||
IWineD3DClipper *clipper = NULL;
|
IWineD3DClipper *clipper = NULL;
|
||||||
|
|
||||||
WINED3DSURFACE_DESC Desc;
|
WINED3DSURFACE_DESC Desc;
|
||||||
WINED3DFORMAT Format;
|
enum wined3d_format_id Format;
|
||||||
DWORD Usage;
|
DWORD Usage;
|
||||||
WINED3DPOOL Pool;
|
WINED3DPOOL Pool;
|
||||||
|
|
||||||
|
@ -3263,8 +3263,8 @@ static HRESULT WINAPI ddraw7_CreateSurface(IDirectDraw7 *iface,
|
||||||
/* Create a WineD3DTexture if a texture was requested */
|
/* Create a WineD3DTexture if a texture was requested */
|
||||||
if(desc2.ddsCaps.dwCaps & DDSCAPS_TEXTURE)
|
if(desc2.ddsCaps.dwCaps & DDSCAPS_TEXTURE)
|
||||||
{
|
{
|
||||||
|
enum wined3d_format_id Format;
|
||||||
UINT levels;
|
UINT levels;
|
||||||
WINED3DFORMAT Format;
|
|
||||||
WINED3DPOOL Pool = WINED3DPOOL_DEFAULT;
|
WINED3DPOOL Pool = WINED3DPOOL_DEFAULT;
|
||||||
|
|
||||||
This->tex_root = object;
|
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
|
/* Order matters. Specifically, BattleZone II (full version) expects the
|
||||||
* 16-bit depth formats to be listed before the 24 and 32 ones. */
|
* 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_S1_UINT_D15_UNORM,
|
||||||
WINED3DFMT_D16_UNORM,
|
WINED3DFMT_D16_UNORM,
|
||||||
|
@ -5434,7 +5434,7 @@ static void STDMETHODCALLTYPE device_parent_WineD3DDeviceCreated(IWineD3DDeviceP
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT STDMETHODCALLTYPE device_parent_CreateSurface(IWineD3DDeviceParent *iface,
|
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)
|
WINED3DPOOL pool, UINT level, WINED3DCUBEMAP_FACES face, IWineD3DSurface **surface)
|
||||||
{
|
{
|
||||||
struct IDirectDrawImpl *This = ddraw_from_device_parent(iface);
|
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,
|
static HRESULT STDMETHODCALLTYPE device_parent_CreateRenderTarget(IWineD3DDeviceParent *iface,
|
||||||
IUnknown *superior, UINT width, UINT height, WINED3DFORMAT format, WINED3DMULTISAMPLE_TYPE multisample_type,
|
IUnknown *superior, UINT width, UINT height, enum wined3d_format_id format,
|
||||||
DWORD multisample_quality, BOOL lockable, IWineD3DSurface **surface)
|
WINED3DMULTISAMPLE_TYPE multisample_type, DWORD multisample_quality, BOOL lockable,
|
||||||
|
IWineD3DSurface **surface)
|
||||||
{
|
{
|
||||||
struct IDirectDrawImpl *This = ddraw_from_device_parent(iface);
|
struct IDirectDrawImpl *This = ddraw_from_device_parent(iface);
|
||||||
IDirectDrawSurfaceImpl *d3d_surface = This->d3d_target;
|
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,
|
static HRESULT STDMETHODCALLTYPE device_parent_CreateDepthStencilSurface(IWineD3DDeviceParent *iface,
|
||||||
IUnknown *superior, UINT width, UINT height, WINED3DFORMAT format, WINED3DMULTISAMPLE_TYPE multisample_type,
|
IUnknown *superior, UINT width, UINT height, enum wined3d_format_id format,
|
||||||
DWORD multisample_quality, BOOL discard, IWineD3DSurface **surface)
|
WINED3DMULTISAMPLE_TYPE multisample_type, DWORD multisample_quality, BOOL discard,
|
||||||
|
IWineD3DSurface **surface)
|
||||||
{
|
{
|
||||||
struct IDirectDrawImpl *This = ddraw_from_device_parent(iface);
|
struct IDirectDrawImpl *This = ddraw_from_device_parent(iface);
|
||||||
IDirectDrawSurfaceImpl *ddraw_surface;
|
IDirectDrawSurfaceImpl *ddraw_surface;
|
||||||
|
@ -5611,7 +5613,7 @@ static HRESULT STDMETHODCALLTYPE device_parent_CreateDepthStencilSurface(IWineD3
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT STDMETHODCALLTYPE device_parent_CreateVolume(IWineD3DDeviceParent *iface,
|
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)
|
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",
|
TRACE("iface %p, superior %p, width %u, height %u, depth %u, format %#x, pool %#x, usage %#x, volume %p\n",
|
||||||
|
|
|
@ -641,8 +641,8 @@ static inline IDirect3DVertexBufferImpl *vb_from_vb1(IDirect3DVertexBuffer *ifac
|
||||||
#define GET_TEXCOORD_SIZE_FROM_FVF(d3dvtVertexType, tex_num) \
|
#define GET_TEXCOORD_SIZE_FROM_FVF(d3dvtVertexType, tex_num) \
|
||||||
(((((d3dvtVertexType) >> (16 + (2 * (tex_num)))) + 1) & 0x03) + 1)
|
(((((d3dvtVertexType) >> (16 + (2 * (tex_num)))) + 1) & 0x03) + 1)
|
||||||
|
|
||||||
void PixelFormat_WineD3DtoDD(DDPIXELFORMAT *DDPixelFormat, WINED3DFORMAT WineD3DFormat) DECLSPEC_HIDDEN;
|
void PixelFormat_WineD3DtoDD(DDPIXELFORMAT *DDPixelFormat, enum wined3d_format_id WineD3DFormat) DECLSPEC_HIDDEN;
|
||||||
WINED3DFORMAT PixelFormat_DD2WineD3D(const DDPIXELFORMAT *DDPixelFormat) DECLSPEC_HIDDEN;
|
enum wined3d_format_id PixelFormat_DD2WineD3D(const DDPIXELFORMAT *DDPixelFormat) DECLSPEC_HIDDEN;
|
||||||
void DDRAW_dump_surface_desc(const DDSURFACEDESC2 *lpddsd) DECLSPEC_HIDDEN;
|
void DDRAW_dump_surface_desc(const DDSURFACEDESC2 *lpddsd) DECLSPEC_HIDDEN;
|
||||||
void dump_D3DMATRIX(const D3DMATRIX *mat) DECLSPEC_HIDDEN;
|
void dump_D3DMATRIX(const D3DMATRIX *mat) DECLSPEC_HIDDEN;
|
||||||
void DDRAW_dump_DDCAPS(const DDCAPS *lpcaps) DECLSPEC_HIDDEN;
|
void DDRAW_dump_DDCAPS(const DDCAPS *lpcaps) DECLSPEC_HIDDEN;
|
||||||
|
|
|
@ -1122,7 +1122,7 @@ IDirect3DDeviceImpl_7_EnumTextureFormats(IDirect3DDevice7 *iface,
|
||||||
WINED3DDISPLAYMODE mode;
|
WINED3DDISPLAYMODE mode;
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
||||||
static const WINED3DFORMAT FormatList[] =
|
static const enum wined3d_format_id FormatList[] =
|
||||||
{
|
{
|
||||||
/* 32 bit */
|
/* 32 bit */
|
||||||
WINED3DFMT_B8G8R8A8_UNORM,
|
WINED3DFMT_B8G8R8A8_UNORM,
|
||||||
|
@ -1143,7 +1143,7 @@ IDirect3DDeviceImpl_7_EnumTextureFormats(IDirect3DDevice7 *iface,
|
||||||
WINED3DFMT_DXT5,
|
WINED3DFMT_DXT5,
|
||||||
};
|
};
|
||||||
|
|
||||||
static const WINED3DFORMAT BumpFormatList[] =
|
static const enum wined3d_format_id BumpFormatList[] =
|
||||||
{
|
{
|
||||||
WINED3DFMT_R8G8_SNORM,
|
WINED3DFMT_R8G8_SNORM,
|
||||||
WINED3DFMT_R5G5_SNORM_L6_UNORM,
|
WINED3DFMT_R5G5_SNORM_L6_UNORM,
|
||||||
|
@ -1171,7 +1171,7 @@ IDirect3DDeviceImpl_7_EnumTextureFormats(IDirect3DDevice7 *iface,
|
||||||
return hr;
|
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,
|
hr = IWineD3D_CheckDeviceFormat(This->ddraw->wineD3D,
|
||||||
WINED3DADAPTER_DEFAULT,
|
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,
|
hr = IWineD3D_CheckDeviceFormat(This->ddraw->wineD3D,
|
||||||
WINED3DADAPTER_DEFAULT,
|
WINED3DADAPTER_DEFAULT,
|
||||||
|
@ -1288,7 +1288,7 @@ IDirect3DDeviceImpl_2_EnumTextureFormats(IDirect3DDevice2 *iface,
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
WINED3DDISPLAYMODE mode;
|
WINED3DDISPLAYMODE mode;
|
||||||
|
|
||||||
static const WINED3DFORMAT FormatList[] =
|
static const enum wined3d_format_id FormatList[] =
|
||||||
{
|
{
|
||||||
/* 32 bit */
|
/* 32 bit */
|
||||||
WINED3DFMT_B8G8R8A8_UNORM,
|
WINED3DFMT_B8G8R8A8_UNORM,
|
||||||
|
@ -1323,7 +1323,7 @@ IDirect3DDeviceImpl_2_EnumTextureFormats(IDirect3DDevice2 *iface,
|
||||||
return hr;
|
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,
|
hr = IWineD3D_CheckDeviceFormat(This->ddraw->wineD3D,
|
||||||
0 /* Adapter */,
|
0 /* Adapter */,
|
||||||
|
|
|
@ -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)
|
static HRESULT WINAPI ddraw_surface7_SetSurfaceDesc(IDirectDrawSurface7 *iface, DDSURFACEDESC2 *DDSD, DWORD Flags)
|
||||||
{
|
{
|
||||||
IDirectDrawSurfaceImpl *This = (IDirectDrawSurfaceImpl *)iface;
|
IDirectDrawSurfaceImpl *This = (IDirectDrawSurfaceImpl *)iface;
|
||||||
WINED3DFORMAT newFormat = WINED3DFMT_UNKNOWN;
|
enum wined3d_format_id newFormat = WINED3DFMT_UNKNOWN;
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
|
|
||||||
TRACE("iface %p, surface_desc %p, flags %#x.\n", iface, DDSD, Flags);
|
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;
|
WINED3DPOOL pool = WINED3DPOOL_DEFAULT;
|
||||||
WINED3DSURFACE_DESC wined3d_desc;
|
WINED3DSURFACE_DESC wined3d_desc;
|
||||||
WINED3DFORMAT format;
|
enum wined3d_format_id format;
|
||||||
DWORD usage = 0;
|
DWORD usage = 0;
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
|
|
||||||
|
|
|
@ -33,19 +33,17 @@ static void DDRAW_dump_pixelformat(const DDPIXELFORMAT *pf);
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* PixelFormat_WineD3DtoDD
|
* PixelFormat_WineD3DtoDD
|
||||||
*
|
*
|
||||||
* Converts an WINED3DFORMAT value into a DDPIXELFORMAT structure
|
* Converts an wined3d format ID into a DDPIXELFORMAT structure
|
||||||
*
|
*
|
||||||
* Params:
|
* Params:
|
||||||
* DDPixelFormat: Address of the structure to write the pixel format to
|
* DDPixelFormat: Address of the structure to write the pixel format to
|
||||||
* WineD3DFormat: Source format
|
* WineD3DFormat: Source format
|
||||||
*
|
*
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
void
|
void PixelFormat_WineD3DtoDD(DDPIXELFORMAT *DDPixelFormat, enum wined3d_format_id WineD3DFormat)
|
||||||
PixelFormat_WineD3DtoDD(DDPIXELFORMAT *DDPixelFormat,
|
|
||||||
WINED3DFORMAT WineD3DFormat)
|
|
||||||
{
|
{
|
||||||
DWORD Size = DDPixelFormat->dwSize;
|
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;
|
if(Size==0) return;
|
||||||
|
|
||||||
|
@ -345,17 +343,17 @@ PixelFormat_WineD3DtoDD(DDPIXELFORMAT *DDPixelFormat,
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* PixelFormat_DD2WineD3D
|
* PixelFormat_DD2WineD3D
|
||||||
*
|
*
|
||||||
* Reads a DDPIXELFORMAT structure and returns the equal WINED3DFORMAT
|
* Reads a DDPIXELFORMAT structure and returns the equivalent wined3d
|
||||||
|
* format ID.
|
||||||
*
|
*
|
||||||
* Params:
|
* Params:
|
||||||
* DDPixelFormat: The source format
|
* DDPixelFormat: The source format
|
||||||
*
|
*
|
||||||
* Returns:
|
* 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
|
* WINED3DFMT_UNKNOWN if a matching format wasn't found
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
WINED3DFORMAT
|
enum wined3d_format_id PixelFormat_DD2WineD3D(const DDPIXELFORMAT *DDPixelFormat)
|
||||||
PixelFormat_DD2WineD3D(const DDPIXELFORMAT *DDPixelFormat)
|
|
||||||
{
|
{
|
||||||
TRACE("Convert a DirectDraw Pixelformat to a WineD3D Pixelformat\n");
|
TRACE("Convert a DirectDraw Pixelformat to a WineD3D Pixelformat\n");
|
||||||
if(TRACE_ON(ddraw))
|
if(TRACE_ON(ddraw))
|
||||||
|
|
|
@ -72,7 +72,7 @@ struct dxgi_device_layer
|
||||||
/* TRACE helper functions */
|
/* TRACE helper functions */
|
||||||
const char *debug_dxgi_format(DXGI_FORMAT format) DECLSPEC_HIDDEN;
|
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 */
|
/* IDXGIFactory */
|
||||||
struct dxgi_factory
|
struct dxgi_factory
|
||||||
|
|
|
@ -118,7 +118,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_output_GetDisplayModeList(IDXGIOutput *ifa
|
||||||
DXGI_FORMAT format, UINT flags, UINT *mode_count, DXGI_MODE_DESC *desc)
|
DXGI_FORMAT format, UINT flags, UINT *mode_count, DXGI_MODE_DESC *desc)
|
||||||
{
|
{
|
||||||
struct dxgi_output *This = (struct dxgi_output *)iface;
|
struct dxgi_output *This = (struct dxgi_output *)iface;
|
||||||
WINED3DFORMAT wined3d_format;
|
enum wined3d_format_id wined3d_format;
|
||||||
IWineD3D *wined3d;
|
IWineD3D *wined3d;
|
||||||
UINT i;
|
UINT i;
|
||||||
|
|
||||||
|
|
|
@ -127,7 +127,7 @@ const char *debug_dxgi_format(DXGI_FORMAT format)
|
||||||
|
|
||||||
#undef WINE_DXGI_TO_STR
|
#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)
|
switch(format)
|
||||||
{
|
{
|
||||||
|
|
|
@ -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];
|
const struct wined3d_stream_info_element *attrib = &si->elements[attrib_idx];
|
||||||
IWineD3DDeviceImpl *device = This->resource.device;
|
IWineD3DDeviceImpl *device = This->resource.device;
|
||||||
const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
|
const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
|
||||||
|
enum wined3d_format_id format;
|
||||||
BOOL ret = FALSE;
|
BOOL ret = FALSE;
|
||||||
WINED3DFORMAT format;
|
|
||||||
|
|
||||||
/* Ignore attributes that do not have our vbo. After that check we can be sure that the attribute is
|
/* 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.
|
* 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);
|
ret = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(DWORD) * stride);
|
||||||
for (i = 0; i < MAX_ATTRIBS; ++i)
|
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;
|
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,
|
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 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;
|
HRESULT hr;
|
||||||
const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
|
const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
|
||||||
BOOL dynamic_buffer_ok;
|
BOOL dynamic_buffer_ok;
|
||||||
|
|
|
@ -451,11 +451,11 @@ static const IWineD3DCubeTextureVtbl IWineD3DCubeTexture_Vtbl =
|
||||||
};
|
};
|
||||||
|
|
||||||
HRESULT cubetexture_init(IWineD3DCubeTextureImpl *texture, UINT edge_length, UINT levels,
|
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)
|
IUnknown *parent, const struct wined3d_parent_ops *parent_ops)
|
||||||
{
|
{
|
||||||
const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
|
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;
|
UINT pow2_edge_length;
|
||||||
unsigned int i, j;
|
unsigned int i, j;
|
||||||
UINT tmp_w;
|
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
|
/* TODO: It should only be possible to create textures for formats
|
||||||
* that are reported as supported. */
|
* 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);
|
WARN("(%p) : Texture cannot be created with a format of WINED3DFMT_UNKNOWN.\n", texture);
|
||||||
return WINED3DERR_INVALIDCALL;
|
return WINED3DERR_INVALIDCALL;
|
||||||
|
@ -550,7 +550,7 @@ HRESULT cubetexture_init(IWineD3DCubeTextureImpl *texture, UINT edge_length, UIN
|
||||||
IWineD3DSurface *surface;
|
IWineD3DSurface *surface;
|
||||||
|
|
||||||
hr = IWineD3DDeviceParent_CreateSurface(device->device_parent, parent, tmp_w, tmp_w,
|
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))
|
if (FAILED(hr))
|
||||||
{
|
{
|
||||||
FIXME("(%p) Failed to create surface, hr %#x.\n", texture, hr);
|
FIXME("(%p) Failed to create surface, hr %#x.\n", texture, hr);
|
||||||
|
|
|
@ -1038,7 +1038,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateStateBlock(IWineD3DDevice *iface,
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI IWineD3DDeviceImpl_CreateSurface(IWineD3DDevice *iface, UINT Width, UINT Height,
|
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,
|
DWORD Usage, WINED3DPOOL Pool, WINED3DMULTISAMPLE_TYPE MultiSample, DWORD MultisampleQuality,
|
||||||
WINED3DSURFTYPE Impl, IUnknown *parent, const struct wined3d_parent_ops *parent_ops)
|
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,
|
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)
|
IWineD3DTexture **ppTexture, IUnknown *parent, const struct wined3d_parent_ops *parent_ops)
|
||||||
{
|
{
|
||||||
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
|
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
|
||||||
|
@ -1141,7 +1141,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateTexture(IWineD3DDevice *iface,
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI IWineD3DDeviceImpl_CreateVolumeTexture(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)
|
IWineD3DVolumeTexture **ppVolumeTexture, IUnknown *parent, const struct wined3d_parent_ops *parent_ops)
|
||||||
{
|
{
|
||||||
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
|
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,
|
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)
|
IUnknown *parent, const struct wined3d_parent_ops *parent_ops)
|
||||||
{
|
{
|
||||||
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
|
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,
|
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)
|
IUnknown *parent, const struct wined3d_parent_ops *parent_ops)
|
||||||
{
|
{
|
||||||
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
|
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
|
||||||
|
@ -1365,7 +1365,7 @@ struct wined3d_fvf_convert_state
|
||||||
};
|
};
|
||||||
|
|
||||||
static void append_decl_element(struct wined3d_fvf_convert_state *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;
|
WINED3DVERTEXELEMENT *elements = state->elements;
|
||||||
const struct wined3d_format_desc *format_desc;
|
const struct wined3d_format_desc *format_desc;
|
||||||
|
@ -2887,7 +2887,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_GetMaterial(IWineD3DDevice *iface, WINE
|
||||||
* Get / Set Indices
|
* Get / Set Indices
|
||||||
*****/
|
*****/
|
||||||
static HRESULT WINAPI IWineD3DDeviceImpl_SetIndexBuffer(IWineD3DDevice *iface,
|
static HRESULT WINAPI IWineD3DDeviceImpl_SetIndexBuffer(IWineD3DDevice *iface,
|
||||||
IWineD3DBuffer *pIndexData, WINED3DFORMAT fmt)
|
IWineD3DBuffer *pIndexData, enum wined3d_format_id fmt)
|
||||||
{
|
{
|
||||||
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
|
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
|
||||||
IWineD3DBuffer *oldIdxs;
|
IWineD3DBuffer *oldIdxs;
|
||||||
|
@ -4739,7 +4739,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_DrawPrimitiveUP(IWineD3DDevice *iface,
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI IWineD3DDeviceImpl_DrawIndexedPrimitiveUP(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)
|
const void *pVertexStreamZeroData, UINT VertexStreamZeroStride)
|
||||||
{
|
{
|
||||||
int idxStride;
|
int idxStride;
|
||||||
|
@ -4813,7 +4813,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_DrawPrimitiveStrided(IWineD3DDevice *if
|
||||||
|
|
||||||
static HRESULT WINAPI IWineD3DDeviceImpl_DrawIndexedPrimitiveStrided(IWineD3DDevice *iface,
|
static HRESULT WINAPI IWineD3DDeviceImpl_DrawIndexedPrimitiveStrided(IWineD3DDevice *iface,
|
||||||
UINT vertex_count, const WineDirect3DVertexStridedData *DrawPrimStrideData,
|
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;
|
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *) iface;
|
||||||
DWORD idxSize = (IndexDataFormat == WINED3DFMT_R32_UINT ? 4 : 2);
|
DWORD idxSize = (IndexDataFormat == WINED3DFMT_R32_UINT ? 4 : 2);
|
||||||
|
|
|
@ -160,7 +160,9 @@ static const struct {
|
||||||
* Utility functions follow
|
* 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[] =
|
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 */
|
of the same bpp but different resolutions */
|
||||||
|
|
||||||
/* Note: dx9 supplies a format. Calls from d3d8 supply WINED3DFMT_UNKNOWN */
|
/* 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;
|
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)) {
|
if (Adapter >= IWineD3D_GetAdapterCount(iface)) {
|
||||||
return 0;
|
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 */
|
/* TODO: Store modes per adapter and read it from the adapter structure */
|
||||||
if (Adapter == 0) { /* Display */
|
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;
|
UINT format_bits = format_desc->byte_count * CHAR_BIT;
|
||||||
unsigned int i = 0;
|
unsigned int i = 0;
|
||||||
unsigned int j = 0;
|
unsigned int j = 0;
|
||||||
|
@ -2777,7 +2781,7 @@ static UINT WINAPI IWineD3DImpl_GetAdapterModeCount(IWineD3D *iface, UINT Ad
|
||||||
{
|
{
|
||||||
++j;
|
++j;
|
||||||
|
|
||||||
if (Format == WINED3DFMT_UNKNOWN)
|
if (format_id == WINED3DFMT_UNKNOWN)
|
||||||
{
|
{
|
||||||
/* This is for D3D8, do not enumerate P8 here */
|
/* This is for D3D8, do not enumerate P8 here */
|
||||||
if (mode.dmBitsPerPel == 32 || mode.dmBitsPerPel == 16) ++i;
|
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 */
|
/* 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;
|
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 */
|
/* Validate the parameters as much as possible */
|
||||||
if (NULL == pMode ||
|
if (!pMode || Adapter >= IWineD3DImpl_GetAdapterCount(iface)
|
||||||
Adapter >= IWineD3DImpl_GetAdapterCount(iface) ||
|
|| Mode >= IWineD3DImpl_GetAdapterModeCount(iface, Adapter, format_id))
|
||||||
Mode >= IWineD3DImpl_GetAdapterModeCount(iface, Adapter, Format)) {
|
{
|
||||||
return WINED3DERR_INVALIDCALL;
|
return WINED3DERR_INVALIDCALL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* TODO: Store modes per adapter and read it from the adapter structure */
|
/* TODO: Store modes per adapter and read it from the adapter structure */
|
||||||
if (Adapter == 0)
|
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;
|
UINT format_bits = format_desc->byte_count * CHAR_BIT;
|
||||||
DEVMODEW DevModeW;
|
DEVMODEW DevModeW;
|
||||||
int ModeIdx = 0;
|
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 */
|
just count through the ones with valid bit depths */
|
||||||
while ((i<=Mode) && EnumDisplaySettingsExW(NULL, j++, &DevModeW, 0))
|
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 */
|
/* This is for D3D8, do not enumerate P8 here */
|
||||||
if (DevModeW.dmBitsPerPel == 32 || DevModeW.dmBitsPerPel == 16) ++i;
|
if (DevModeW.dmBitsPerPel == 32 || DevModeW.dmBitsPerPel == 16) ++i;
|
||||||
|
@ -2837,8 +2845,9 @@ static HRESULT WINAPI IWineD3DImpl_EnumAdapterModes(IWineD3D *iface, UINT Adapte
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i == 0) {
|
if (i == 0)
|
||||||
TRACE_(d3d_caps)("No modes found for format (%x - %s)\n", Format, debug_d3dformat(Format));
|
{
|
||||||
|
TRACE_(d3d_caps)("No modes found for format (%x - %s)\n", format_id, debug_d3dformat(format_id));
|
||||||
return WINED3DERR_INVALIDCALL;
|
return WINED3DERR_INVALIDCALL;
|
||||||
}
|
}
|
||||||
ModeIdx = j - 1;
|
ModeIdx = j - 1;
|
||||||
|
@ -2851,12 +2860,13 @@ static HRESULT WINAPI IWineD3DImpl_EnumAdapterModes(IWineD3D *iface, UINT Adapte
|
||||||
if (DevModeW.dmFields & DM_DISPLAYFREQUENCY)
|
if (DevModeW.dmFields & DM_DISPLAYFREQUENCY)
|
||||||
pMode->RefreshRate = DevModeW.dmDisplayFrequency;
|
pMode->RefreshRate = DevModeW.dmDisplayFrequency;
|
||||||
|
|
||||||
if (Format == WINED3DFMT_UNKNOWN) {
|
if (format_id == WINED3DFMT_UNKNOWN)
|
||||||
pMode->Format = pixelformat_for_depth(DevModeW.dmBitsPerPel);
|
pMode->Format = pixelformat_for_depth(DevModeW.dmBitsPerPel);
|
||||||
} else {
|
else
|
||||||
pMode->Format = Format;
|
pMode->Format = format_id;
|
||||||
}
|
}
|
||||||
} else {
|
else
|
||||||
|
{
|
||||||
TRACE_(d3d_caps)("Requested mode out of range %d\n", Mode);
|
TRACE_(d3d_caps)("Requested mode out of range %d\n", Mode);
|
||||||
return WINED3DERR_INVALIDCALL;
|
return WINED3DERR_INVALIDCALL;
|
||||||
}
|
}
|
||||||
|
@ -3047,10 +3057,10 @@ static BOOL IWineD3DImpl_IsPixelFormatCompatibleWithDepthFmt(const struct wined3
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI IWineD3DImpl_CheckDepthStencilMatch(IWineD3D *iface, UINT Adapter, WINED3DDEVTYPE DeviceType,
|
static HRESULT WINAPI IWineD3DImpl_CheckDepthStencilMatch(IWineD3D *iface,
|
||||||
WINED3DFORMAT AdapterFormat,
|
UINT Adapter, WINED3DDEVTYPE DeviceType, enum wined3d_format_id AdapterFormat,
|
||||||
WINED3DFORMAT RenderTargetFormat,
|
enum wined3d_format_id RenderTargetFormat, enum wined3d_format_id DepthStencilFormat)
|
||||||
WINED3DFORMAT DepthStencilFormat) {
|
{
|
||||||
IWineD3DImpl *This = (IWineD3DImpl *)iface;
|
IWineD3DImpl *This = (IWineD3DImpl *)iface;
|
||||||
int nCfgs;
|
int nCfgs;
|
||||||
const WineD3D_PixelFormat *cfgs;
|
const WineD3D_PixelFormat *cfgs;
|
||||||
|
@ -3102,8 +3112,9 @@ static HRESULT WINAPI IWineD3DImpl_CheckDepthStencilMatch(IWineD3D *iface, UINT
|
||||||
return WINED3DERR_NOTAVAILABLE;
|
return WINED3DERR_NOTAVAILABLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI IWineD3DImpl_CheckDeviceMultiSampleType(IWineD3D *iface, UINT Adapter, WINED3DDEVTYPE DeviceType,
|
static HRESULT WINAPI IWineD3DImpl_CheckDeviceMultiSampleType(IWineD3D *iface, UINT Adapter,
|
||||||
WINED3DFORMAT SurfaceFormat, BOOL Windowed, WINED3DMULTISAMPLE_TYPE MultiSampleType, DWORD *pQualityLevels)
|
WINED3DDEVTYPE DeviceType, enum wined3d_format_id SurfaceFormat, BOOL Windowed,
|
||||||
|
WINED3DMULTISAMPLE_TYPE MultiSampleType, DWORD *pQualityLevels)
|
||||||
{
|
{
|
||||||
IWineD3DImpl *This = (IWineD3DImpl *)iface;
|
IWineD3DImpl *This = (IWineD3DImpl *)iface;
|
||||||
const struct wined3d_format_desc *glDesc;
|
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,
|
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;
|
HRESULT hr = WINED3DERR_NOTAVAILABLE;
|
||||||
UINT nmodes;
|
UINT nmodes;
|
||||||
|
@ -3722,8 +3733,8 @@ static BOOL CheckVertexTextureCapability(struct wined3d_adapter *adapter,
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapter, WINED3DDEVTYPE DeviceType,
|
static HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapter, WINED3DDEVTYPE DeviceType,
|
||||||
WINED3DFORMAT AdapterFormat, DWORD Usage, WINED3DRESOURCETYPE RType, WINED3DFORMAT CheckFormat,
|
enum wined3d_format_id AdapterFormat, DWORD Usage, WINED3DRESOURCETYPE RType,
|
||||||
WINED3DSURFTYPE SurfaceType)
|
enum wined3d_format_id CheckFormat, WINED3DSURFTYPE SurfaceType)
|
||||||
{
|
{
|
||||||
IWineD3DImpl *This = (IWineD3DImpl *)iface;
|
IWineD3DImpl *This = (IWineD3DImpl *)iface;
|
||||||
struct wined3d_adapter *adapter = &This->adapters[Adapter];
|
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,
|
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",
|
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),
|
iface, adapter_idx, debug_d3ddevicetype(device_type), debug_d3dformat(src_format),
|
||||||
|
|
|
@ -306,7 +306,8 @@ static void drawStridedSlow(IWineD3DDevice *iface, const struct wined3d_context
|
||||||
}
|
}
|
||||||
|
|
||||||
/* GL locking is done by the caller */
|
/* 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;
|
const struct wined3d_gl_info *gl_info = &This->adapter->gl_info;
|
||||||
|
|
||||||
|
|
|
@ -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,
|
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 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)
|
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_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);
|
void (*cleanup)(IWineD3DSurfaceImpl *This);
|
||||||
unsigned int resource_size;
|
unsigned int resource_size;
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
|
@ -401,7 +401,7 @@ HRESULT surface_init(IWineD3DSurfaceImpl *surface, WINED3DSURFTYPE surface_type,
|
||||||
/* Flags */
|
/* Flags */
|
||||||
surface->Flags = SFLAG_NORMCOORD; /* Default to normalized coords. */
|
surface->Flags = SFLAG_NORMCOORD; /* Default to normalized coords. */
|
||||||
if (discard) surface->Flags |= SFLAG_DISCARD;
|
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.
|
/* Quick lockable sanity check.
|
||||||
* TODO: remove this after surfaces, usage and lockability have been debugged properly
|
* 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;
|
IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *)iface;
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
|
|
||||||
|
|
|
@ -485,9 +485,10 @@ HRESULT WINAPI IWineD3DBaseSurfaceImpl_GetClipper(IWineD3DSurface *iface, IWineD
|
||||||
return WINED3D_OK;
|
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;
|
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);
|
&This->resource.device->adapter->gl_info);
|
||||||
|
|
||||||
if (This->resource.format_desc->format != WINED3DFMT_UNKNOWN)
|
if (This->resource.format_desc->format != WINED3DFMT_UNKNOWN)
|
||||||
|
@ -496,12 +497,12 @@ HRESULT WINAPI IWineD3DBaseSurfaceImpl_SetFormat(IWineD3DSurface *iface, WINED3D
|
||||||
return WINED3DERR_INVALIDCALL;
|
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->resource.size = wined3d_format_calculate_size(format_desc, This->resource.device->surface_alignment,
|
||||||
This->pow2Width, This->pow2Height);
|
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;
|
This->resource.format_desc = format_desc;
|
||||||
|
|
||||||
|
@ -776,8 +777,9 @@ static void convert_yuy2_x8r8g8b8(const BYTE *src, BYTE *dst,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
struct d3dfmt_convertor_desc {
|
struct d3dfmt_convertor_desc
|
||||||
WINED3DFORMAT from, to;
|
{
|
||||||
|
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);
|
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},
|
{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;
|
unsigned int i;
|
||||||
for(i = 0; i < (sizeof(convertors) / sizeof(convertors[0])); 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
|
* 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;
|
IWineD3DSurface *ret = NULL;
|
||||||
const struct d3dfmt_convertor_desc *conv;
|
const struct d3dfmt_convertor_desc *conv;
|
||||||
WINED3DLOCKED_RECT lock_src, lock_dst;
|
WINED3DLOCKED_RECT lock_src, lock_dst;
|
||||||
|
|
|
@ -771,7 +771,7 @@ HRESULT swapchain_init(IWineD3DSwapChainImpl *swapchain, WINED3DSURFTYPE surface
|
||||||
|
|
||||||
if (surface_type == SURFACE_OPENGL)
|
if (surface_type == SURFACE_OPENGL)
|
||||||
{
|
{
|
||||||
static const WINED3DFORMAT formats[] =
|
static const enum wined3d_format_id formats[] =
|
||||||
{
|
{
|
||||||
WINED3DFMT_D24_UNORM_S8_UINT,
|
WINED3DFMT_D24_UNORM_S8_UINT,
|
||||||
WINED3DFMT_D32_UNORM,
|
WINED3DFMT_D32_UNORM,
|
||||||
|
|
|
@ -462,11 +462,11 @@ static const IWineD3DTextureVtbl IWineD3DTexture_Vtbl =
|
||||||
};
|
};
|
||||||
|
|
||||||
HRESULT texture_init(IWineD3DTextureImpl *texture, UINT width, UINT height, UINT levels,
|
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)
|
IUnknown *parent, const struct wined3d_parent_ops *parent_ops)
|
||||||
{
|
{
|
||||||
const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
|
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 pow2_width, pow2_height;
|
||||||
UINT tmp_w, tmp_h;
|
UINT tmp_w, tmp_h;
|
||||||
unsigned int i;
|
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
|
/* TODO: It should only be possible to create textures for formats
|
||||||
* that are reported as supported. */
|
* 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);
|
WARN("(%p) : Texture cannot be created with a format of WINED3DFMT_UNKNOWN.\n", texture);
|
||||||
return WINED3DERR_INVALIDCALL;
|
return WINED3DERR_INVALIDCALL;
|
||||||
|
|
|
@ -31,7 +31,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d);
|
||||||
|
|
||||||
struct StaticPixelFormatDesc
|
struct StaticPixelFormatDesc
|
||||||
{
|
{
|
||||||
WINED3DFORMAT format;
|
enum wined3d_format_id id;
|
||||||
DWORD alphaMask, redMask, greenMask, blueMask;
|
DWORD alphaMask, redMask, greenMask, blueMask;
|
||||||
UINT bpp;
|
UINT bpp;
|
||||||
short depthSize, stencilSize;
|
short depthSize, stencilSize;
|
||||||
|
@ -49,7 +49,7 @@ struct StaticPixelFormatDesc
|
||||||
*/
|
*/
|
||||||
static const struct StaticPixelFormatDesc formats[] =
|
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},
|
{WINED3DFMT_UNKNOWN, 0x0, 0x0, 0x0, 0x0, 0, 0, 0},
|
||||||
/* FourCC formats */
|
/* FourCC formats */
|
||||||
{WINED3DFMT_UYVY, 0x0, 0x0, 0x0, 0x0, 2, 0, 0},
|
{WINED3DFMT_UYVY, 0x0, 0x0, 0x0, 0x0, 2, 0, 0},
|
||||||
|
@ -135,7 +135,7 @@ static const struct StaticPixelFormatDesc formats[] =
|
||||||
|
|
||||||
struct wined3d_format_base_flags
|
struct wined3d_format_base_flags
|
||||||
{
|
{
|
||||||
WINED3DFORMAT format;
|
enum wined3d_format_id id;
|
||||||
DWORD flags;
|
DWORD flags;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -182,7 +182,7 @@ static const struct wined3d_format_base_flags format_base_flags[] =
|
||||||
|
|
||||||
struct wined3d_format_compression_info
|
struct wined3d_format_compression_info
|
||||||
{
|
{
|
||||||
WINED3DFORMAT format;
|
enum wined3d_format_id id;
|
||||||
UINT block_width;
|
UINT block_width;
|
||||||
UINT block_height;
|
UINT block_height;
|
||||||
UINT block_byte_count;
|
UINT block_byte_count;
|
||||||
|
@ -200,7 +200,7 @@ static const struct wined3d_format_compression_info format_compression_info[] =
|
||||||
|
|
||||||
struct wined3d_format_vertex_info
|
struct wined3d_format_vertex_info
|
||||||
{
|
{
|
||||||
WINED3DFORMAT format;
|
enum wined3d_format_id id;
|
||||||
enum wined3d_ffp_emit_idx emit_idx;
|
enum wined3d_ffp_emit_idx emit_idx;
|
||||||
GLint component_count;
|
GLint component_count;
|
||||||
GLenum gl_vtx_type;
|
GLenum gl_vtx_type;
|
||||||
|
@ -232,7 +232,7 @@ static const struct wined3d_format_vertex_info format_vertex_info[] =
|
||||||
|
|
||||||
struct wined3d_format_texture_info
|
struct wined3d_format_texture_info
|
||||||
{
|
{
|
||||||
WINED3DFORMAT format;
|
enum wined3d_format_id id;
|
||||||
GLint gl_internal;
|
GLint gl_internal;
|
||||||
GLint gl_srgb_internal;
|
GLint gl_srgb_internal;
|
||||||
GLint gl_rt_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[] =
|
static const struct wined3d_format_texture_info format_texture_info[] =
|
||||||
{
|
{
|
||||||
/* WINED3DFORMAT internal srgbInternal rtInternal
|
/* format id internal srgbInternal rtInternal
|
||||||
format type
|
format type
|
||||||
flags
|
flags
|
||||||
extension */
|
extension */
|
||||||
|
@ -856,18 +856,22 @@ static const struct wined3d_format_texture_info format_texture_info[] =
|
||||||
ARB_TEXTURE_COMPRESSION_RGTC, NULL},
|
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.
|
/* First check if the format is at the position of its value.
|
||||||
* This will catch the argb formats before the loop is entered
|
* This will catch the argb formats before the loop is entered. */
|
||||||
*/
|
if (format_id < (sizeof(formats) / sizeof(*formats))
|
||||||
if(fmt < (sizeof(formats) / sizeof(formats[0])) && formats[fmt].format == fmt) {
|
&& formats[format_id].id == format_id)
|
||||||
return fmt;
|
{
|
||||||
} else {
|
return format_id;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
for(i = 0; i < (sizeof(formats) / sizeof(formats[0])); i++) {
|
|
||||||
if(formats[i].format == fmt) {
|
for (i = 0; i < (sizeof(formats) / sizeof(*formats)); ++i)
|
||||||
return i;
|
{
|
||||||
}
|
if (formats[i].id == format_id) return i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return -1;
|
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)
|
for (i = 0; i < format_count; ++i)
|
||||||
{
|
{
|
||||||
struct wined3d_format_desc *desc = &gl_info->gl_formats[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->red_mask = formats[i].redMask;
|
||||||
desc->green_mask = formats[i].greenMask;
|
desc->green_mask = formats[i].greenMask;
|
||||||
desc->blue_mask = formats[i].blueMask;
|
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)
|
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)
|
if (fmt_idx == -1)
|
||||||
{
|
{
|
||||||
ERR("Format %s (%#x) not found.\n",
|
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);
|
HeapFree(GetProcessHeap(), 0, gl_info->gl_formats);
|
||||||
return FALSE;
|
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)
|
for (i = 0; i < (sizeof(format_compression_info) / sizeof(*format_compression_info)); ++i)
|
||||||
{
|
{
|
||||||
struct wined3d_format_desc *format_desc;
|
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)
|
if (fmt_idx == -1)
|
||||||
{
|
{
|
||||||
ERR("Format %s (%#x) not found.\n",
|
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;
|
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)
|
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;
|
struct wined3d_format_desc *desc;
|
||||||
|
|
||||||
if (fmt_idx == -1)
|
if (fmt_idx == -1)
|
||||||
{
|
{
|
||||||
ERR("Format %s (%#x) not found.\n",
|
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;
|
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;
|
struct wined3d_format_desc *desc;
|
||||||
unsigned int fmt_idx, i;
|
unsigned int fmt_idx, i;
|
||||||
static const WINED3DFORMAT fmts16[] =
|
static const enum wined3d_format_id fmts16[] =
|
||||||
{
|
{
|
||||||
WINED3DFMT_R16_FLOAT,
|
WINED3DFMT_R16_FLOAT,
|
||||||
WINED3DFMT_R16G16_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)
|
for (i = 0; i < (sizeof(format_vertex_info) / sizeof(*format_vertex_info)); ++i)
|
||||||
{
|
{
|
||||||
struct wined3d_format_desc *format_desc;
|
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)
|
if (fmt_idx == -1)
|
||||||
{
|
{
|
||||||
ERR("Format %s (%#x) not found.\n",
|
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;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1538,12 +1542,15 @@ fail:
|
||||||
return FALSE;
|
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) {
|
if (idx == -1)
|
||||||
FIXME("Can't find format %s (%#x) in the format lookup table\n", debug_d3dformat(fmt), fmt);
|
{
|
||||||
|
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 */
|
/* Get the caller a valid pointer */
|
||||||
idx = getFmtIdx(WINED3DFMT_UNKNOWN);
|
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
|
* Trace formatting of useful values
|
||||||
*/
|
*/
|
||||||
const char* debug_d3dformat(WINED3DFORMAT fmt) {
|
const char *debug_d3dformat(enum wined3d_format_id format_id)
|
||||||
switch (fmt) {
|
{
|
||||||
#define FMT_TO_STR(fmt) case fmt: return #fmt
|
switch (format_id)
|
||||||
|
{
|
||||||
|
#define FMT_TO_STR(format_id) case format_id: return #format_id
|
||||||
FMT_TO_STR(WINED3DFMT_UNKNOWN);
|
FMT_TO_STR(WINED3DFMT_UNKNOWN);
|
||||||
FMT_TO_STR(WINED3DFMT_B8G8R8_UNORM);
|
FMT_TO_STR(WINED3DFMT_B8G8R8_UNORM);
|
||||||
FMT_TO_STR(WINED3DFMT_B5G5R5X1_UNORM);
|
FMT_TO_STR(WINED3DFMT_B5G5R5X1_UNORM);
|
||||||
|
@ -1715,15 +1724,15 @@ const char* debug_d3dformat(WINED3DFORMAT fmt) {
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
char fourcc[5];
|
char fourcc[5];
|
||||||
fourcc[0] = (char)(fmt);
|
fourcc[0] = (char)(format_id);
|
||||||
fourcc[1] = (char)(fmt >> 8);
|
fourcc[1] = (char)(format_id >> 8);
|
||||||
fourcc[2] = (char)(fmt >> 16);
|
fourcc[2] = (char)(format_id >> 16);
|
||||||
fourcc[3] = (char)(fmt >> 24);
|
fourcc[3] = (char)(format_id >> 24);
|
||||||
fourcc[4] = 0;
|
fourcc[4] = 0;
|
||||||
if (isprint(fourcc[0]) && isprint(fourcc[1]) && isprint(fourcc[2]) && isprint(fourcc[3]))
|
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
|
else
|
||||||
FIXME("Unrecognized %#x WINED3DFORMAT!\n", fmt);
|
FIXME("Unrecognized %#x WINED3DFORMAT!\n", format_id);
|
||||||
}
|
}
|
||||||
return "unrecognized";
|
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*/
|
/* Setup this textures matrix according to the texture flags*/
|
||||||
/* GL locking is done by the caller (state handler) */
|
/* GL locking is done by the caller (state handler) */
|
||||||
void set_texture_matrix(const float *smat, DWORD flags, BOOL calculatedCoords, BOOL transformed,
|
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];
|
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)
|
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;
|
unsigned int r, g, b, a;
|
||||||
DWORD ret;
|
DWORD ret;
|
||||||
|
|
||||||
|
@ -2650,8 +2659,10 @@ DWORD wined3d_format_convert_from_float(const struct wined3d_format_desc *format
|
||||||
}
|
}
|
||||||
|
|
||||||
/* DirectDraw stuff */
|
/* DirectDraw stuff */
|
||||||
WINED3DFORMAT pixelformat_for_depth(DWORD depth) {
|
enum wined3d_format_id pixelformat_for_depth(DWORD depth)
|
||||||
switch(depth) {
|
{
|
||||||
|
switch (depth)
|
||||||
|
{
|
||||||
case 8: return WINED3DFMT_P8_UINT;
|
case 8: return WINED3DFMT_P8_UINT;
|
||||||
case 15: return WINED3DFMT_B5G5R5X1_UNORM;
|
case 15: return WINED3DFMT_B5G5R5X1_UNORM;
|
||||||
case 16: return WINED3DFMT_B5G6R5_UNORM;
|
case 16: return WINED3DFMT_B5G6R5_UNORM;
|
||||||
|
|
|
@ -358,11 +358,11 @@ static const IWineD3DVolumeVtbl IWineD3DVolume_Vtbl =
|
||||||
};
|
};
|
||||||
|
|
||||||
HRESULT volume_init(IWineD3DVolumeImpl *volume, IWineD3DDeviceImpl *device, UINT width,
|
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)
|
IUnknown *parent, const struct wined3d_parent_ops *parent_ops)
|
||||||
{
|
{
|
||||||
const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
|
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;
|
HRESULT hr;
|
||||||
|
|
||||||
if (!gl_info->supported[EXT_TEXTURE3D])
|
if (!gl_info->supported[EXT_TEXTURE3D])
|
||||||
|
|
|
@ -384,18 +384,18 @@ static const IWineD3DVolumeTextureVtbl IWineD3DVolumeTexture_Vtbl =
|
||||||
};
|
};
|
||||||
|
|
||||||
HRESULT volumetexture_init(IWineD3DVolumeTextureImpl *texture, UINT width, UINT height,
|
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)
|
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_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;
|
UINT tmp_w, tmp_h, tmp_d;
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
|
|
||||||
/* TODO: It should only be possible to create textures for formats
|
/* TODO: It should only be possible to create textures for formats
|
||||||
* that are reported as supported. */
|
* 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);
|
WARN("(%p) : Texture cannot be created with a format of WINED3DFMT_UNKNOWN.\n", texture);
|
||||||
return WINED3DERR_INVALIDCALL;
|
return WINED3DERR_INVALIDCALL;
|
||||||
|
@ -457,7 +457,7 @@ HRESULT volumetexture_init(IWineD3DVolumeTextureImpl *texture, UINT width, UINT
|
||||||
|
|
||||||
/* Create the volume. */
|
/* Create the volume. */
|
||||||
hr = IWineD3DDeviceParent_CreateVolume(device->device_parent, parent,
|
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))
|
if (FAILED(hr))
|
||||||
{
|
{
|
||||||
ERR("Creating a volume for the volume texture failed, hr %#x.\n", hr);
|
ERR("Creating a volume for the volume texture failed, hr %#x.\n", hr);
|
||||||
|
|
|
@ -1663,7 +1663,7 @@ struct IWineD3DDeviceImpl
|
||||||
|
|
||||||
/* DirectDraw stuff */
|
/* DirectDraw stuff */
|
||||||
DWORD ddraw_width, ddraw_height;
|
DWORD ddraw_width, ddraw_height;
|
||||||
WINED3DFORMAT ddraw_format;
|
enum wined3d_format_id ddraw_format;
|
||||||
|
|
||||||
/* Final position fixup constant */
|
/* Final position fixup constant */
|
||||||
float posFixup[4];
|
float posFixup[4];
|
||||||
|
@ -1888,7 +1888,7 @@ typedef struct IWineD3DTextureImpl
|
||||||
} IWineD3DTextureImpl;
|
} IWineD3DTextureImpl;
|
||||||
|
|
||||||
HRESULT texture_init(IWineD3DTextureImpl *texture, UINT width, UINT height, UINT levels,
|
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;
|
IUnknown *parent, const struct wined3d_parent_ops *parent_ops) DECLSPEC_HIDDEN;
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
@ -1903,7 +1903,7 @@ typedef struct IWineD3DCubeTextureImpl
|
||||||
} IWineD3DCubeTextureImpl;
|
} IWineD3DCubeTextureImpl;
|
||||||
|
|
||||||
HRESULT cubetexture_init(IWineD3DCubeTextureImpl *texture, UINT edge_length, UINT levels,
|
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;
|
IUnknown *parent, const struct wined3d_parent_ops *parent_ops) DECLSPEC_HIDDEN;
|
||||||
|
|
||||||
typedef struct _WINED3DVOLUMET_DESC
|
typedef struct _WINED3DVOLUMET_DESC
|
||||||
|
@ -1934,7 +1934,7 @@ typedef struct IWineD3DVolumeImpl
|
||||||
|
|
||||||
void volume_add_dirty_box(IWineD3DVolume *iface, const WINED3DBOX *dirty_box) DECLSPEC_HIDDEN;
|
void volume_add_dirty_box(IWineD3DVolume *iface, const WINED3DBOX *dirty_box) DECLSPEC_HIDDEN;
|
||||||
HRESULT volume_init(IWineD3DVolumeImpl *volume, IWineD3DDeviceImpl *device, UINT width,
|
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;
|
IUnknown *parent, const struct wined3d_parent_ops *parent_ops) DECLSPEC_HIDDEN;
|
||||||
void volume_set_container(IWineD3DVolumeImpl *volume, struct IWineD3DVolumeTextureImpl *container) DECLSPEC_HIDDEN;
|
void volume_set_container(IWineD3DVolumeImpl *volume, struct IWineD3DVolumeTextureImpl *container) DECLSPEC_HIDDEN;
|
||||||
|
|
||||||
|
@ -1950,7 +1950,7 @@ typedef struct IWineD3DVolumeTextureImpl
|
||||||
} IWineD3DVolumeTextureImpl;
|
} IWineD3DVolumeTextureImpl;
|
||||||
|
|
||||||
HRESULT volumetexture_init(IWineD3DVolumeTextureImpl *texture, UINT width, UINT height,
|
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;
|
WINED3DPOOL pool, IUnknown *parent, const struct wined3d_parent_ops *parent_ops) DECLSPEC_HIDDEN;
|
||||||
|
|
||||||
typedef struct _WINED3DSURFACET_DESC
|
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;
|
GLenum surface_get_gl_buffer(IWineD3DSurfaceImpl *surface) DECLSPEC_HIDDEN;
|
||||||
HRESULT surface_init(IWineD3DSurfaceImpl *surface, WINED3DSURFTYPE surface_type, UINT alignment,
|
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 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;
|
WINED3DPOOL pool, IUnknown *parent, const struct wined3d_parent_ops *parent_ops) DECLSPEC_HIDDEN;
|
||||||
BOOL surface_init_sysmem(IWineD3DSurfaceImpl *surface) DECLSPEC_HIDDEN;
|
BOOL surface_init_sysmem(IWineD3DSurfaceImpl *surface) DECLSPEC_HIDDEN;
|
||||||
void surface_internal_preload(IWineD3DSurfaceImpl *surface, enum WINED3DSRGB srgb) 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;
|
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_SetClipper(IWineD3DSurface *iface, IWineD3DClipper *clipper) DECLSPEC_HIDDEN;
|
||||||
HRESULT WINAPI IWineD3DBaseSurfaceImpl_GetClipper(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 IWineD3DBaseSurfaceImpl_CreateDIBSection(IWineD3DSurface *iface) DECLSPEC_HIDDEN;
|
||||||
HRESULT WINAPI IWineD3DBaseSurfaceImpl_Blt(IWineD3DSurface *iface, const RECT *dst_rect, IWineD3DSurface *src_surface,
|
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;
|
const RECT *src_rect, DWORD flags, const WINEDDBLTFX *fx, WINED3DTEXTUREFILTERTYPE filter) DECLSPEC_HIDDEN;
|
||||||
|
@ -2340,7 +2341,7 @@ struct IWineD3DStateBlockImpl
|
||||||
|
|
||||||
/* Indices */
|
/* Indices */
|
||||||
IWineD3DBuffer* pIndexData;
|
IWineD3DBuffer* pIndexData;
|
||||||
WINED3DFORMAT IndexFmt;
|
enum wined3d_format_id IndexFmt;
|
||||||
INT baseVertexIndex;
|
INT baseVertexIndex;
|
||||||
INT loadBaseVertexIndex; /* non-indexed drawing needs 0 here, indexed 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;
|
GLuint *buffer_object) DECLSPEC_HIDDEN;
|
||||||
BYTE *buffer_get_sysmem(struct wined3d_buffer *This, const struct wined3d_gl_info *gl_info) 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,
|
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;
|
const char *data, IUnknown *parent, const struct wined3d_parent_ops *parent_ops) DECLSPEC_HIDDEN;
|
||||||
|
|
||||||
/* IWineD3DRendertargetView */
|
/* IWineD3DRendertargetView */
|
||||||
|
@ -2545,7 +2546,7 @@ struct IWineD3DSwapChainImpl
|
||||||
IWineD3DSurfaceImpl *front_buffer;
|
IWineD3DSurfaceImpl *front_buffer;
|
||||||
WINED3DPRESENT_PARAMETERS presentParms;
|
WINED3DPRESENT_PARAMETERS presentParms;
|
||||||
DWORD orig_width, orig_height;
|
DWORD orig_width, orig_height;
|
||||||
WINED3DFORMAT orig_fmt;
|
enum wined3d_format_id orig_fmt;
|
||||||
WINED3DGAMMARAMP orig_gamma;
|
WINED3DGAMMARAMP orig_gamma;
|
||||||
BOOL render_to_fbo;
|
BOOL render_to_fbo;
|
||||||
const struct wined3d_format_desc *ds_format;
|
const struct wined3d_format_desc *ds_format;
|
||||||
|
@ -2598,7 +2599,7 @@ void swapchain_setup_fullscreen_window(IWineD3DSwapChainImpl *swapchain, UINT w,
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Trace routines */
|
/* 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_d3ddevicetype(WINED3DDEVTYPE devtype) DECLSPEC_HIDDEN;
|
||||||
const char *debug_d3dresourcetype(WINED3DRESOURCETYPE res) DECLSPEC_HIDDEN;
|
const char *debug_d3dresourcetype(WINED3DRESOURCETYPE res) DECLSPEC_HIDDEN;
|
||||||
const char *debug_d3dusage(DWORD usage) 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,
|
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;
|
DWORD arg1, DWORD arg2, DWORD arg3, INT texture_idx, DWORD dst) DECLSPEC_HIDDEN;
|
||||||
void set_texture_matrix(const float *smat, DWORD flags, BOOL calculatedCoords,
|
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,
|
void texture_activate_dimensions(DWORD stage, IWineD3DStateBlockImpl *stateblock,
|
||||||
struct wined3d_context *context) DECLSPEC_HIDDEN;
|
struct wined3d_context *context) DECLSPEC_HIDDEN;
|
||||||
void sampler_texdim(DWORD state, IWineD3DStateBlockImpl *stateblock,
|
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;
|
DWORD flags, const PALETTEENTRY *entries, IUnknown *parent) DECLSPEC_HIDDEN;
|
||||||
|
|
||||||
/* DirectDraw utility functions */
|
/* 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
|
* Pixel format management
|
||||||
|
@ -2960,7 +2961,7 @@ extern WINED3DFORMAT pixelformat_for_depth(DWORD depth) DECLSPEC_HIDDEN;
|
||||||
|
|
||||||
struct wined3d_format_desc
|
struct wined3d_format_desc
|
||||||
{
|
{
|
||||||
WINED3DFORMAT format;
|
enum wined3d_format_id format;
|
||||||
DWORD red_mask;
|
DWORD red_mask;
|
||||||
DWORD green_mask;
|
DWORD green_mask;
|
||||||
DWORD blue_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);
|
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;
|
const struct wined3d_gl_info *gl_info) DECLSPEC_HIDDEN;
|
||||||
UINT wined3d_format_calculate_size(const struct wined3d_format_desc *format,
|
UINT wined3d_format_calculate_size(const struct wined3d_format_desc *format,
|
||||||
UINT alignment, UINT width, UINT height) DECLSPEC_HIDDEN;
|
UINT alignment, UINT width, UINT height) DECLSPEC_HIDDEN;
|
||||||
|
|
|
@ -139,7 +139,7 @@ typedef enum _WINED3DDEGREETYPE
|
||||||
((unsigned long)(unsigned char)(ch0) | ((unsigned long)(unsigned char)(ch1) << 8) | \
|
((unsigned long)(unsigned char)(ch0) | ((unsigned long)(unsigned char)(ch1) << 8) | \
|
||||||
((unsigned long)(unsigned char)(ch2) << 16) | ((unsigned long)(unsigned char)(ch3) << 24))
|
((unsigned long)(unsigned char)(ch2) << 16) | ((unsigned long)(unsigned char)(ch3) << 24))
|
||||||
|
|
||||||
typedef enum _WINED3DFORMAT
|
enum wined3d_format_id
|
||||||
{
|
{
|
||||||
WINED3DFMT_UNKNOWN,
|
WINED3DFMT_UNKNOWN,
|
||||||
WINED3DFMT_B8G8R8_UNORM,
|
WINED3DFMT_B8G8R8_UNORM,
|
||||||
|
@ -275,7 +275,7 @@ typedef enum _WINED3DFORMAT
|
||||||
WINED3DFMT_NVHS = WINEMAKEFOURCC('N','V','H','S'),
|
WINED3DFMT_NVHS = WINEMAKEFOURCC('N','V','H','S'),
|
||||||
|
|
||||||
WINED3DFMT_FORCE_DWORD = 0xffffffff
|
WINED3DFMT_FORCE_DWORD = 0xffffffff
|
||||||
} WINED3DFORMAT;
|
};
|
||||||
|
|
||||||
typedef enum _WINED3DRENDERSTATETYPE
|
typedef enum _WINED3DRENDERSTATETYPE
|
||||||
{
|
{
|
||||||
|
@ -1540,7 +1540,7 @@ typedef struct _WINED3DDISPLAYMODE
|
||||||
UINT Width;
|
UINT Width;
|
||||||
UINT Height;
|
UINT Height;
|
||||||
UINT RefreshRate;
|
UINT RefreshRate;
|
||||||
WINED3DFORMAT Format;
|
enum wined3d_format_id Format;
|
||||||
} WINED3DDISPLAYMODE;
|
} WINED3DDISPLAYMODE;
|
||||||
|
|
||||||
typedef struct _WINED3DCOLORVALUE
|
typedef struct _WINED3DCOLORVALUE
|
||||||
|
@ -1672,7 +1672,7 @@ typedef struct _WINED3DPRESENT_PARAMETERS
|
||||||
{
|
{
|
||||||
UINT BackBufferWidth;
|
UINT BackBufferWidth;
|
||||||
UINT BackBufferHeight;
|
UINT BackBufferHeight;
|
||||||
WINED3DFORMAT BackBufferFormat;
|
enum wined3d_format_id BackBufferFormat;
|
||||||
UINT BackBufferCount;
|
UINT BackBufferCount;
|
||||||
WINED3DMULTISAMPLE_TYPE MultiSampleType;
|
WINED3DMULTISAMPLE_TYPE MultiSampleType;
|
||||||
DWORD MultiSampleQuality;
|
DWORD MultiSampleQuality;
|
||||||
|
@ -1680,7 +1680,7 @@ typedef struct _WINED3DPRESENT_PARAMETERS
|
||||||
HWND hDeviceWindow;
|
HWND hDeviceWindow;
|
||||||
BOOL Windowed;
|
BOOL Windowed;
|
||||||
BOOL EnableAutoDepthStencil;
|
BOOL EnableAutoDepthStencil;
|
||||||
WINED3DFORMAT AutoDepthStencilFormat;
|
enum wined3d_format_id AutoDepthStencilFormat;
|
||||||
DWORD Flags;
|
DWORD Flags;
|
||||||
UINT FullScreen_RefreshRateInHz;
|
UINT FullScreen_RefreshRateInHz;
|
||||||
UINT PresentationInterval;
|
UINT PresentationInterval;
|
||||||
|
@ -1689,7 +1689,7 @@ typedef struct _WINED3DPRESENT_PARAMETERS
|
||||||
|
|
||||||
typedef struct _WINED3DSURFACE_DESC
|
typedef struct _WINED3DSURFACE_DESC
|
||||||
{
|
{
|
||||||
WINED3DFORMAT format;
|
enum wined3d_format_id format;
|
||||||
WINED3DRESOURCETYPE resource_type;
|
WINED3DRESOURCETYPE resource_type;
|
||||||
DWORD usage;
|
DWORD usage;
|
||||||
WINED3DPOOL pool;
|
WINED3DPOOL pool;
|
||||||
|
@ -1702,7 +1702,7 @@ typedef struct _WINED3DSURFACE_DESC
|
||||||
|
|
||||||
typedef struct _WINED3DVOLUME_DESC
|
typedef struct _WINED3DVOLUME_DESC
|
||||||
{
|
{
|
||||||
WINED3DFORMAT Format;
|
enum wined3d_format_id Format;
|
||||||
WINED3DRESOURCETYPE Type;
|
WINED3DRESOURCETYPE Type;
|
||||||
DWORD Usage;
|
DWORD Usage;
|
||||||
WINED3DPOOL Pool;
|
WINED3DPOOL Pool;
|
||||||
|
@ -1720,7 +1720,7 @@ typedef struct _WINED3DCLIPSTATUS
|
||||||
|
|
||||||
typedef struct _WINED3DVERTEXELEMENT
|
typedef struct _WINED3DVERTEXELEMENT
|
||||||
{
|
{
|
||||||
WINED3DFORMAT format;
|
enum wined3d_format_id format;
|
||||||
WORD input_slot;
|
WORD input_slot;
|
||||||
WORD offset;
|
WORD offset;
|
||||||
UINT output_slot; /* D3D 8 & 10 */
|
UINT output_slot; /* D3D 8 & 10 */
|
||||||
|
@ -1850,7 +1850,7 @@ typedef struct _WINED3DBUFFER_DESC
|
||||||
|
|
||||||
typedef struct WineDirect3DStridedData
|
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 */
|
const BYTE *lpData; /* Pointer to start of data */
|
||||||
DWORD dwStride; /* Stride between occurrences of this data */
|
DWORD dwStride; /* Stride between occurrences of this data */
|
||||||
} WineDirect3DStridedData;
|
} WineDirect3DStridedData;
|
||||||
|
@ -2131,7 +2131,7 @@ interface IWineD3DDeviceParent : IUnknown
|
||||||
[in] IUnknown *superior,
|
[in] IUnknown *superior,
|
||||||
[in] UINT width,
|
[in] UINT width,
|
||||||
[in] UINT height,
|
[in] UINT height,
|
||||||
[in] WINED3DFORMAT format,
|
[in] enum wined3d_format_id format_id,
|
||||||
[in] DWORD usage,
|
[in] DWORD usage,
|
||||||
[in] WINED3DPOOL pool,
|
[in] WINED3DPOOL pool,
|
||||||
[in] UINT level,
|
[in] UINT level,
|
||||||
|
@ -2143,7 +2143,7 @@ interface IWineD3DDeviceParent : IUnknown
|
||||||
[in] IUnknown *superior,
|
[in] IUnknown *superior,
|
||||||
[in] UINT width,
|
[in] UINT width,
|
||||||
[in] UINT height,
|
[in] UINT height,
|
||||||
[in] WINED3DFORMAT format,
|
[in] enum wined3d_format_id format_id,
|
||||||
[in] WINED3DMULTISAMPLE_TYPE multisample_type,
|
[in] WINED3DMULTISAMPLE_TYPE multisample_type,
|
||||||
[in] DWORD multisample_quality,
|
[in] DWORD multisample_quality,
|
||||||
[in] BOOL lockable,
|
[in] BOOL lockable,
|
||||||
|
@ -2154,7 +2154,7 @@ interface IWineD3DDeviceParent : IUnknown
|
||||||
[in] IUnknown *superior,
|
[in] IUnknown *superior,
|
||||||
[in] UINT width,
|
[in] UINT width,
|
||||||
[in] UINT height,
|
[in] UINT height,
|
||||||
[in] WINED3DFORMAT format,
|
[in] enum wined3d_format_id format_id,
|
||||||
[in] WINED3DMULTISAMPLE_TYPE multisample_type,
|
[in] WINED3DMULTISAMPLE_TYPE multisample_type,
|
||||||
[in] DWORD multisample_quality,
|
[in] DWORD multisample_quality,
|
||||||
[in] BOOL discard,
|
[in] BOOL discard,
|
||||||
|
@ -2166,7 +2166,7 @@ interface IWineD3DDeviceParent : IUnknown
|
||||||
[in] UINT width,
|
[in] UINT width,
|
||||||
[in] UINT height,
|
[in] UINT height,
|
||||||
[in] UINT depth,
|
[in] UINT depth,
|
||||||
[in] WINED3DFORMAT format,
|
[in] enum wined3d_format_id format_id,
|
||||||
[in] WINED3DPOOL pool,
|
[in] WINED3DPOOL pool,
|
||||||
[in] DWORD usage,
|
[in] DWORD usage,
|
||||||
[out] IWineD3DVolume **volume
|
[out] IWineD3DVolume **volume
|
||||||
|
@ -2209,11 +2209,11 @@ interface IWineD3D : IWineD3DBase
|
||||||
);
|
);
|
||||||
UINT GetAdapterModeCount(
|
UINT GetAdapterModeCount(
|
||||||
[in] UINT adapter_idx,
|
[in] UINT adapter_idx,
|
||||||
[in] WINED3DFORMAT format
|
[in] enum wined3d_format_id format_id
|
||||||
);
|
);
|
||||||
HRESULT EnumAdapterModes(
|
HRESULT EnumAdapterModes(
|
||||||
[in] UINT adapter_idx,
|
[in] UINT adapter_idx,
|
||||||
[in] WINED3DFORMAT format,
|
[in] enum wined3d_format_id format_id,
|
||||||
[in] UINT mode_idx,
|
[in] UINT mode_idx,
|
||||||
[out] WINED3DDISPLAYMODE *mode
|
[out] WINED3DDISPLAYMODE *mode
|
||||||
);
|
);
|
||||||
|
@ -2229,7 +2229,7 @@ interface IWineD3D : IWineD3DBase
|
||||||
HRESULT CheckDeviceMultiSampleType(
|
HRESULT CheckDeviceMultiSampleType(
|
||||||
[in] UINT adapter_idx,
|
[in] UINT adapter_idx,
|
||||||
[in] WINED3DDEVTYPE device_type,
|
[in] WINED3DDEVTYPE device_type,
|
||||||
[in] WINED3DFORMAT surface_format,
|
[in] enum wined3d_format_id surface_format_id,
|
||||||
[in] BOOL windowed,
|
[in] BOOL windowed,
|
||||||
[in] WINED3DMULTISAMPLE_TYPE multisample_type,
|
[in] WINED3DMULTISAMPLE_TYPE multisample_type,
|
||||||
[out] DWORD *quality_levels
|
[out] DWORD *quality_levels
|
||||||
|
@ -2237,31 +2237,31 @@ interface IWineD3D : IWineD3DBase
|
||||||
HRESULT CheckDepthStencilMatch(
|
HRESULT CheckDepthStencilMatch(
|
||||||
[in] UINT adapter_idx,
|
[in] UINT adapter_idx,
|
||||||
[in] WINED3DDEVTYPE device_type,
|
[in] WINED3DDEVTYPE device_type,
|
||||||
[in] WINED3DFORMAT adapter_format,
|
[in] enum wined3d_format_id adapter_format_id,
|
||||||
[in] WINED3DFORMAT render_target_format,
|
[in] enum wined3d_format_id render_target_format_id,
|
||||||
[in] WINED3DFORMAT depth_stencil_format
|
[in] enum wined3d_format_id depth_stencil_format_id
|
||||||
);
|
);
|
||||||
HRESULT CheckDeviceType(
|
HRESULT CheckDeviceType(
|
||||||
[in] UINT adapter_idx,
|
[in] UINT adapter_idx,
|
||||||
[in] WINED3DDEVTYPE device_type,
|
[in] WINED3DDEVTYPE device_type,
|
||||||
[in] WINED3DFORMAT display_format,
|
[in] enum wined3d_format_id display_format_id,
|
||||||
[in] WINED3DFORMAT backbuffer_format,
|
[in] enum wined3d_format_id backbuffer_format_id,
|
||||||
[in] BOOL windowed
|
[in] BOOL windowed
|
||||||
);
|
);
|
||||||
HRESULT CheckDeviceFormat(
|
HRESULT CheckDeviceFormat(
|
||||||
[in] UINT adaper_idx,
|
[in] UINT adaper_idx,
|
||||||
[in] WINED3DDEVTYPE device_type,
|
[in] WINED3DDEVTYPE device_type,
|
||||||
[in] WINED3DFORMAT adapter_format,
|
[in] enum wined3d_format_id adapter_format_id,
|
||||||
[in] DWORD usage,
|
[in] DWORD usage,
|
||||||
[in] WINED3DRESOURCETYPE resource_type,
|
[in] WINED3DRESOURCETYPE resource_type,
|
||||||
[in] WINED3DFORMAT check_format,
|
[in] enum wined3d_format_id check_format,
|
||||||
[in] WINED3DSURFTYPE surface_type
|
[in] WINED3DSURFTYPE surface_type
|
||||||
);
|
);
|
||||||
HRESULT CheckDeviceFormatConversion(
|
HRESULT CheckDeviceFormatConversion(
|
||||||
[in] UINT adapter_idx,
|
[in] UINT adapter_idx,
|
||||||
[in] WINED3DDEVTYPE device_type,
|
[in] WINED3DDEVTYPE device_type,
|
||||||
[in] WINED3DFORMAT source_format,
|
[in] enum wined3d_format_id source_format_id,
|
||||||
[in] WINED3DFORMAT target_format
|
[in] enum wined3d_format_id target_format_id
|
||||||
);
|
);
|
||||||
HRESULT GetDeviceCaps(
|
HRESULT GetDeviceCaps(
|
||||||
[in] UINT adapter_idx,
|
[in] UINT adapter_idx,
|
||||||
|
@ -2484,7 +2484,7 @@ interface IWineD3DSurface : IWineD3DResource
|
||||||
const void *GetData(
|
const void *GetData(
|
||||||
);
|
);
|
||||||
HRESULT SetFormat(
|
HRESULT SetFormat(
|
||||||
[in] WINED3DFORMAT format
|
[in] enum wined3d_format_id format_id
|
||||||
);
|
);
|
||||||
HRESULT PrivateSetup(
|
HRESULT PrivateSetup(
|
||||||
);
|
);
|
||||||
|
@ -2842,7 +2842,7 @@ interface IWineD3DDevice : IWineD3DBase
|
||||||
HRESULT CreateSurface(
|
HRESULT CreateSurface(
|
||||||
[in] UINT width,
|
[in] UINT width,
|
||||||
[in] UINT height,
|
[in] UINT height,
|
||||||
[in] WINED3DFORMAT format,
|
[in] enum wined3d_format_id format_id,
|
||||||
[in] BOOL lockable,
|
[in] BOOL lockable,
|
||||||
[in] BOOL discard,
|
[in] BOOL discard,
|
||||||
[in] UINT level,
|
[in] UINT level,
|
||||||
|
@ -2865,7 +2865,7 @@ interface IWineD3DDevice : IWineD3DBase
|
||||||
[in] UINT height,
|
[in] UINT height,
|
||||||
[in] UINT levels,
|
[in] UINT levels,
|
||||||
[in] DWORD usage,
|
[in] DWORD usage,
|
||||||
[in] WINED3DFORMAT format,
|
[in] enum wined3d_format_id format_id,
|
||||||
[in] WINED3DPOOL pool,
|
[in] WINED3DPOOL pool,
|
||||||
[out] IWineD3DTexture **texture,
|
[out] IWineD3DTexture **texture,
|
||||||
[in] IUnknown *parent,
|
[in] IUnknown *parent,
|
||||||
|
@ -2877,7 +2877,7 @@ interface IWineD3DDevice : IWineD3DBase
|
||||||
[in] UINT depth,
|
[in] UINT depth,
|
||||||
[in] UINT levels,
|
[in] UINT levels,
|
||||||
[in] DWORD usage,
|
[in] DWORD usage,
|
||||||
[in] WINED3DFORMAT format,
|
[in] enum wined3d_format_id format_id,
|
||||||
[in] WINED3DPOOL pool,
|
[in] WINED3DPOOL pool,
|
||||||
[out] IWineD3DVolumeTexture **texture,
|
[out] IWineD3DVolumeTexture **texture,
|
||||||
[in] IUnknown *parent,
|
[in] IUnknown *parent,
|
||||||
|
@ -2888,7 +2888,7 @@ interface IWineD3DDevice : IWineD3DBase
|
||||||
[in] UINT height,
|
[in] UINT height,
|
||||||
[in] UINT depth,
|
[in] UINT depth,
|
||||||
[in] DWORD usage,
|
[in] DWORD usage,
|
||||||
[in] WINED3DFORMAT format,
|
[in] enum wined3d_format_id format_id,
|
||||||
[in] WINED3DPOOL pool,
|
[in] WINED3DPOOL pool,
|
||||||
[out] IWineD3DVolume **volume,
|
[out] IWineD3DVolume **volume,
|
||||||
[in] IUnknown *parent,
|
[in] IUnknown *parent,
|
||||||
|
@ -2898,7 +2898,7 @@ interface IWineD3DDevice : IWineD3DBase
|
||||||
[in] UINT edge_length,
|
[in] UINT edge_length,
|
||||||
[in] UINT levels,
|
[in] UINT levels,
|
||||||
[in] DWORD usage,
|
[in] DWORD usage,
|
||||||
[in] WINED3DFORMAT format,
|
[in] enum wined3d_format_id format_id,
|
||||||
[in] WINED3DPOOL pool,
|
[in] WINED3DPOOL pool,
|
||||||
[out] IWineD3DCubeTexture **texture,
|
[out] IWineD3DCubeTexture **texture,
|
||||||
[in] IUnknown *parent,
|
[in] IUnknown *parent,
|
||||||
|
@ -3062,7 +3062,7 @@ interface IWineD3DDevice : IWineD3DBase
|
||||||
);
|
);
|
||||||
HRESULT SetIndexBuffer(
|
HRESULT SetIndexBuffer(
|
||||||
[in] IWineD3DBuffer *index_buffer,
|
[in] IWineD3DBuffer *index_buffer,
|
||||||
[in] WINED3DFORMAT format
|
[in] enum wined3d_format_id format_id
|
||||||
);
|
);
|
||||||
HRESULT GetIndexBuffer(
|
HRESULT GetIndexBuffer(
|
||||||
[out] IWineD3DBuffer **index_buffer
|
[out] IWineD3DBuffer **index_buffer
|
||||||
|
@ -3345,7 +3345,7 @@ interface IWineD3DDevice : IWineD3DBase
|
||||||
HRESULT DrawIndexedPrimitiveUP(
|
HRESULT DrawIndexedPrimitiveUP(
|
||||||
[in] UINT index_count,
|
[in] UINT index_count,
|
||||||
[in] const void *index_data,
|
[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] const void *stream_data,
|
||||||
[in] UINT stream_stride
|
[in] UINT stream_stride
|
||||||
);
|
);
|
||||||
|
@ -3358,7 +3358,7 @@ interface IWineD3DDevice : IWineD3DBase
|
||||||
[in] const WineDirect3DVertexStridedData *strided_data,
|
[in] const WineDirect3DVertexStridedData *strided_data,
|
||||||
[in] UINT vertex_count,
|
[in] UINT vertex_count,
|
||||||
[in] const void *index_data,
|
[in] const void *index_data,
|
||||||
[in] WINED3DFORMAT index_data_format
|
[in] enum wined3d_format_id index_data_format_id
|
||||||
);
|
);
|
||||||
HRESULT DrawRectPatch(
|
HRESULT DrawRectPatch(
|
||||||
[in] UINT handle,
|
[in] UINT handle,
|
||||||
|
|
Loading…
Reference in New Issue