Commit 67bca436 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Get rid of the WINED3DDEVTYPE typedef.

parent ebb85da5
...@@ -1451,7 +1451,7 @@ static HRESULT WINAPI ddraw7_GetFourCCCodes(IDirectDraw7 *iface, DWORD *NumCodes ...@@ -1451,7 +1451,7 @@ static HRESULT WINAPI ddraw7_GetFourCCCodes(IDirectDraw7 *iface, DWORD *NumCodes
for (i = 0; i < (sizeof(formats) / sizeof(formats[0])); ++i) for (i = 0; i < (sizeof(formats) / sizeof(formats[0])); ++i)
{ {
hr = wined3d_check_device_format(This->wined3d, WINED3DADAPTER_DEFAULT, WINED3DDEVTYPE_HAL, hr = wined3d_check_device_format(This->wined3d, WINED3DADAPTER_DEFAULT, WINED3D_DEVICE_TYPE_HAL,
mode.format_id, 0, WINED3DRTYPE_SURFACE, formats[i], DefaultSurfaceType); mode.format_id, 0, WINED3DRTYPE_SURFACE, formats[i], DefaultSurfaceType);
if (SUCCEEDED(hr)) if (SUCCEEDED(hr))
{ {
...@@ -4534,7 +4534,7 @@ static HRESULT WINAPI d3d7_EnumZBufferFormats(IDirect3D7 *iface, REFCLSID device ...@@ -4534,7 +4534,7 @@ static HRESULT WINAPI d3d7_EnumZBufferFormats(IDirect3D7 *iface, REFCLSID device
{ {
IDirectDrawImpl *This = impl_from_IDirect3D7(iface); IDirectDrawImpl *This = impl_from_IDirect3D7(iface);
struct wined3d_display_mode mode; struct wined3d_display_mode mode;
WINED3DDEVTYPE type; enum wined3d_device_type type;
unsigned int i; unsigned int i;
HRESULT hr; HRESULT hr;
...@@ -4560,28 +4560,28 @@ static HRESULT WINAPI d3d7_EnumZBufferFormats(IDirect3D7 *iface, REFCLSID device ...@@ -4560,28 +4560,28 @@ static HRESULT WINAPI d3d7_EnumZBufferFormats(IDirect3D7 *iface, REFCLSID device
|| IsEqualGUID(device_iid, &IID_D3DDEVICE_WineD3D)) || IsEqualGUID(device_iid, &IID_D3DDEVICE_WineD3D))
{ {
TRACE("Asked for HAL device.\n"); TRACE("Asked for HAL device.\n");
type = WINED3DDEVTYPE_HAL; type = WINED3D_DEVICE_TYPE_HAL;
} }
else if (IsEqualGUID(device_iid, &IID_IDirect3DRGBDevice) else if (IsEqualGUID(device_iid, &IID_IDirect3DRGBDevice)
|| IsEqualGUID(device_iid, &IID_IDirect3DMMXDevice)) || IsEqualGUID(device_iid, &IID_IDirect3DMMXDevice))
{ {
TRACE("Asked for SW device.\n"); TRACE("Asked for SW device.\n");
type = WINED3DDEVTYPE_SW; type = WINED3D_DEVICE_TYPE_SW;
} }
else if (IsEqualGUID(device_iid, &IID_IDirect3DRefDevice)) else if (IsEqualGUID(device_iid, &IID_IDirect3DRefDevice))
{ {
TRACE("Asked for REF device.\n"); TRACE("Asked for REF device.\n");
type = WINED3DDEVTYPE_REF; type = WINED3D_DEVICE_TYPE_REF;
} }
else if (IsEqualGUID(device_iid, &IID_IDirect3DNullDevice)) else if (IsEqualGUID(device_iid, &IID_IDirect3DNullDevice))
{ {
TRACE("Asked for NULLREF device.\n"); TRACE("Asked for NULLREF device.\n");
type = WINED3DDEVTYPE_NULLREF; type = WINED3D_DEVICE_TYPE_NULLREF;
} }
else else
{ {
FIXME("Unexpected device GUID %s.\n", debugstr_guid(device_iid)); FIXME("Unexpected device GUID %s.\n", debugstr_guid(device_iid));
type = WINED3DDEVTYPE_HAL; type = WINED3D_DEVICE_TYPE_HAL;
} }
wined3d_mutex_lock(); wined3d_mutex_lock();
...@@ -4712,7 +4712,7 @@ HRESULT IDirect3DImpl_GetCaps(const struct wined3d *wined3d, D3DDEVICEDESC *desc ...@@ -4712,7 +4712,7 @@ HRESULT IDirect3DImpl_GetCaps(const struct wined3d *wined3d, D3DDEVICEDESC *desc
memset(&wined3d_caps, 0, sizeof(wined3d_caps)); memset(&wined3d_caps, 0, sizeof(wined3d_caps));
wined3d_mutex_lock(); wined3d_mutex_lock();
hr = wined3d_get_device_caps(wined3d, 0, WINED3DDEVTYPE_HAL, &wined3d_caps); hr = wined3d_get_device_caps(wined3d, 0, WINED3D_DEVICE_TYPE_HAL, &wined3d_caps);
wined3d_mutex_unlock(); wined3d_mutex_unlock();
if (FAILED(hr)) if (FAILED(hr))
{ {
...@@ -5469,7 +5469,7 @@ static const struct wined3d_device_parent_ops ddraw_wined3d_device_parent_ops = ...@@ -5469,7 +5469,7 @@ static const struct wined3d_device_parent_ops ddraw_wined3d_device_parent_ops =
device_parent_create_swapchain, device_parent_create_swapchain,
}; };
HRESULT ddraw_init(IDirectDrawImpl *ddraw, WINED3DDEVTYPE device_type) HRESULT ddraw_init(IDirectDrawImpl *ddraw, enum wined3d_device_type device_type)
{ {
HRESULT hr; HRESULT hr;
HDC hDC; HDC hDC;
......
...@@ -122,7 +122,7 @@ struct IDirectDrawImpl ...@@ -122,7 +122,7 @@ struct IDirectDrawImpl
#define DDRAW_WINDOW_CLASS_NAME "ddraw_wc" #define DDRAW_WINDOW_CLASS_NAME "ddraw_wc"
HRESULT ddraw_init(IDirectDrawImpl *ddraw, WINED3DDEVTYPE device_type) DECLSPEC_HIDDEN; HRESULT ddraw_init(IDirectDrawImpl *ddraw, enum wined3d_device_type device_type) DECLSPEC_HIDDEN;
void ddraw_destroy_swapchain(IDirectDrawImpl *ddraw) DECLSPEC_HIDDEN; void ddraw_destroy_swapchain(IDirectDrawImpl *ddraw) DECLSPEC_HIDDEN;
static inline void ddraw_set_swapchain_window(struct IDirectDrawImpl *ddraw, HWND window) static inline void ddraw_set_swapchain_window(struct IDirectDrawImpl *ddraw, HWND window)
......
...@@ -1154,7 +1154,7 @@ IDirect3DDeviceImpl_7_EnumTextureFormats(IDirect3DDevice7 *iface, ...@@ -1154,7 +1154,7 @@ IDirect3DDeviceImpl_7_EnumTextureFormats(IDirect3DDevice7 *iface,
for (i = 0; i < sizeof(FormatList) / sizeof(*FormatList); ++i) for (i = 0; i < sizeof(FormatList) / sizeof(*FormatList); ++i)
{ {
hr = wined3d_check_device_format(This->ddraw->wined3d, WINED3DADAPTER_DEFAULT, WINED3DDEVTYPE_HAL, hr = wined3d_check_device_format(This->ddraw->wined3d, WINED3DADAPTER_DEFAULT, WINED3D_DEVICE_TYPE_HAL,
mode.format_id, 0, WINED3DRTYPE_TEXTURE, FormatList[i], SURFACE_OPENGL); mode.format_id, 0, WINED3DRTYPE_TEXTURE, FormatList[i], SURFACE_OPENGL);
if (hr == D3D_OK) if (hr == D3D_OK)
{ {
...@@ -1178,7 +1178,7 @@ IDirect3DDeviceImpl_7_EnumTextureFormats(IDirect3DDevice7 *iface, ...@@ -1178,7 +1178,7 @@ IDirect3DDeviceImpl_7_EnumTextureFormats(IDirect3DDevice7 *iface,
for (i = 0; i < sizeof(BumpFormatList) / sizeof(*BumpFormatList); ++i) for (i = 0; i < sizeof(BumpFormatList) / sizeof(*BumpFormatList); ++i)
{ {
hr = wined3d_check_device_format(This->ddraw->wined3d, WINED3DADAPTER_DEFAULT, hr = wined3d_check_device_format(This->ddraw->wined3d, WINED3DADAPTER_DEFAULT,
WINED3DDEVTYPE_HAL, mode.format_id, WINED3DUSAGE_QUERY_LEGACYBUMPMAP, WINED3D_DEVICE_TYPE_HAL, mode.format_id, WINED3DUSAGE_QUERY_LEGACYBUMPMAP,
WINED3DRTYPE_TEXTURE, BumpFormatList[i], SURFACE_OPENGL); WINED3DRTYPE_TEXTURE, BumpFormatList[i], SURFACE_OPENGL);
if (hr == D3D_OK) if (hr == D3D_OK)
{ {
...@@ -1291,7 +1291,7 @@ IDirect3DDeviceImpl_2_EnumTextureFormats(IDirect3DDevice2 *iface, ...@@ -1291,7 +1291,7 @@ IDirect3DDeviceImpl_2_EnumTextureFormats(IDirect3DDevice2 *iface,
for (i = 0; i < sizeof(FormatList) / sizeof(*FormatList); ++i) for (i = 0; i < sizeof(FormatList) / sizeof(*FormatList); ++i)
{ {
hr = wined3d_check_device_format(This->ddraw->wined3d, 0, WINED3DDEVTYPE_HAL, hr = wined3d_check_device_format(This->ddraw->wined3d, 0, WINED3D_DEVICE_TYPE_HAL,
mode.format_id, 0, WINED3DRTYPE_TEXTURE, FormatList[i], SURFACE_OPENGL); mode.format_id, 0, WINED3DRTYPE_TEXTURE, FormatList[i], SURFACE_OPENGL);
if (hr == D3D_OK) if (hr == D3D_OK)
{ {
......
...@@ -186,7 +186,7 @@ DDRAW_Create(const GUID *guid, ...@@ -186,7 +186,7 @@ DDRAW_Create(const GUID *guid,
IUnknown *UnkOuter, IUnknown *UnkOuter,
REFIID iid) REFIID iid)
{ {
WINED3DDEVTYPE devicetype; enum wined3d_device_type device_type;
IDirectDrawImpl *This; IDirectDrawImpl *This;
HRESULT hr; HRESULT hr;
...@@ -204,15 +204,15 @@ DDRAW_Create(const GUID *guid, ...@@ -204,15 +204,15 @@ DDRAW_Create(const GUID *guid,
* WineD3D always uses OpenGL for D3D rendering. One could make it request * WineD3D always uses OpenGL for D3D rendering. One could make it request
* indirect rendering * indirect rendering
*/ */
devicetype = WINED3DDEVTYPE_REF; device_type = WINED3D_DEVICE_TYPE_REF;
} }
else if(guid == (GUID *) DDCREATE_HARDWAREONLY) else if(guid == (GUID *) DDCREATE_HARDWAREONLY)
{ {
devicetype = WINED3DDEVTYPE_HAL; device_type = WINED3D_DEVICE_TYPE_HAL;
} }
else else
{ {
devicetype = 0; device_type = 0;
} }
/* DDraw doesn't support aggregation, according to msdn */ /* DDraw doesn't support aggregation, according to msdn */
...@@ -227,7 +227,7 @@ DDRAW_Create(const GUID *guid, ...@@ -227,7 +227,7 @@ DDRAW_Create(const GUID *guid,
return E_OUTOFMEMORY; return E_OUTOFMEMORY;
} }
hr = ddraw_init(This, devicetype); hr = ddraw_init(This, device_type);
if (FAILED(hr)) if (FAILED(hr))
{ {
WARN("Failed to initialize ddraw object, hr %#x.\n", hr); WARN("Failed to initialize ddraw object, hr %#x.\n", hr);
......
...@@ -400,7 +400,7 @@ HRESULT dxgi_device_init(struct dxgi_device *device, struct dxgi_device_layer *l ...@@ -400,7 +400,7 @@ HRESULT dxgi_device_init(struct dxgi_device *device, struct dxgi_device_layer *l
FIXME("Ignoring adapter type.\n"); FIXME("Ignoring adapter type.\n");
hr = wined3d_get_device_caps(wined3d, adapter_ordinal, WINED3DDEVTYPE_HAL, &caps); hr = wined3d_get_device_caps(wined3d, adapter_ordinal, WINED3D_DEVICE_TYPE_HAL, &caps);
if (FAILED(hr) || caps.VertexShaderVersion < 4 || caps.PixelShaderVersion < 4) if (FAILED(hr) || caps.VertexShaderVersion < 4 || caps.PixelShaderVersion < 4)
{ {
WARN("Direct3D 10 is not supported on this GPU with the current shader backend.\n"); WARN("Direct3D 10 is not supported on this GPU with the current shader backend.\n");
...@@ -410,7 +410,7 @@ HRESULT dxgi_device_init(struct dxgi_device *device, struct dxgi_device_layer *l ...@@ -410,7 +410,7 @@ HRESULT dxgi_device_init(struct dxgi_device *device, struct dxgi_device_layer *l
} }
EnterCriticalSection(&dxgi_cs); EnterCriticalSection(&dxgi_cs);
hr = wined3d_device_create(wined3d, adapter_ordinal, WINED3DDEVTYPE_HAL, NULL, 0, 4, hr = wined3d_device_create(wined3d, adapter_ordinal, WINED3D_DEVICE_TYPE_HAL, NULL, 0, 4,
wined3d_device_parent, &device->wined3d_device); wined3d_device_parent, &device->wined3d_device);
IWineDXGIDeviceParent_Release(dxgi_device_parent); IWineDXGIDeviceParent_Release(dxgi_device_parent);
wined3d_decref(wined3d); wined3d_decref(wined3d);
......
...@@ -5887,7 +5887,7 @@ HRESULT CDECL wined3d_device_get_surface_from_dc(const struct wined3d_device *de ...@@ -5887,7 +5887,7 @@ HRESULT CDECL wined3d_device_get_surface_from_dc(const struct wined3d_device *de
} }
HRESULT device_init(struct wined3d_device *device, struct wined3d *wined3d, HRESULT device_init(struct wined3d_device *device, struct wined3d *wined3d,
UINT adapter_idx, WINED3DDEVTYPE device_type, HWND focus_window, DWORD flags, UINT adapter_idx, enum wined3d_device_type device_type, HWND focus_window, DWORD flags,
BYTE surface_alignment, struct wined3d_device_parent *device_parent) BYTE surface_alignment, struct wined3d_device_parent *device_parent)
{ {
struct wined3d_adapter *adapter = &wined3d->adapters[adapter_idx]; struct wined3d_adapter *adapter = &wined3d->adapters[adapter_idx];
......
...@@ -3127,7 +3127,7 @@ static BOOL wined3d_check_pixel_format_depth(const struct wined3d_gl_info *gl_in ...@@ -3127,7 +3127,7 @@ static BOOL wined3d_check_pixel_format_depth(const struct wined3d_gl_info *gl_in
} }
HRESULT CDECL wined3d_check_depth_stencil_match(const struct wined3d *wined3d, HRESULT CDECL wined3d_check_depth_stencil_match(const struct wined3d *wined3d,
UINT adapter_idx, WINED3DDEVTYPE device_type, enum wined3d_format_id adapter_format_id, UINT adapter_idx, enum wined3d_device_type device_type, enum wined3d_format_id adapter_format_id,
enum wined3d_format_id render_target_format_id, enum wined3d_format_id depth_stencil_format_id) enum wined3d_format_id render_target_format_id, enum wined3d_format_id depth_stencil_format_id)
{ {
const struct wined3d_format *rt_format; const struct wined3d_format *rt_format;
...@@ -3181,7 +3181,7 @@ HRESULT CDECL wined3d_check_depth_stencil_match(const struct wined3d *wined3d, ...@@ -3181,7 +3181,7 @@ HRESULT CDECL wined3d_check_depth_stencil_match(const struct wined3d *wined3d,
} }
HRESULT CDECL wined3d_check_device_multisample_type(const struct wined3d *wined3d, UINT adapter_idx, HRESULT CDECL wined3d_check_device_multisample_type(const struct wined3d *wined3d, UINT adapter_idx,
WINED3DDEVTYPE device_type, enum wined3d_format_id surface_format_id, BOOL windowed, enum wined3d_device_type device_type, enum wined3d_format_id surface_format_id, BOOL windowed,
WINED3DMULTISAMPLE_TYPE multisample_type, DWORD *quality_levels) WINED3DMULTISAMPLE_TYPE multisample_type, DWORD *quality_levels)
{ {
const struct wined3d_gl_info *gl_info; const struct wined3d_gl_info *gl_info;
...@@ -3721,7 +3721,7 @@ static BOOL CheckVertexTextureCapability(const struct wined3d_adapter *adapter, ...@@ -3721,7 +3721,7 @@ static BOOL CheckVertexTextureCapability(const struct wined3d_adapter *adapter,
} }
HRESULT CDECL wined3d_check_device_format(const struct wined3d *wined3d, UINT adapter_idx, HRESULT CDECL wined3d_check_device_format(const struct wined3d *wined3d, UINT adapter_idx,
WINED3DDEVTYPE device_type, enum wined3d_format_id adapter_format_id, DWORD usage, enum wined3d_device_type device_type, enum wined3d_format_id adapter_format_id, DWORD usage,
WINED3DRESOURCETYPE resource_type, enum wined3d_format_id check_format_id, WINED3DSURFTYPE surface_type) WINED3DRESOURCETYPE resource_type, enum wined3d_format_id check_format_id, WINED3DSURFTYPE surface_type)
{ {
const struct wined3d_adapter *adapter = &wined3d->adapters[adapter_idx]; const struct wined3d_adapter *adapter = &wined3d->adapters[adapter_idx];
...@@ -4212,7 +4212,7 @@ HRESULT CDECL wined3d_check_device_format(const struct wined3d *wined3d, UINT ad ...@@ -4212,7 +4212,7 @@ HRESULT CDECL wined3d_check_device_format(const struct wined3d *wined3d, UINT ad
} }
HRESULT CDECL wined3d_check_device_format_conversion(const struct wined3d *wined3d, UINT adapter_idx, HRESULT CDECL wined3d_check_device_format_conversion(const struct wined3d *wined3d, UINT adapter_idx,
WINED3DDEVTYPE device_type, enum wined3d_format_id src_format, enum wined3d_format_id dst_format) enum wined3d_device_type device_type, enum wined3d_format_id src_format, enum wined3d_format_id dst_format)
{ {
FIXME("wined3d %p, adapter_idx %u, device_type %s, src_format %s, dst_format %s stub!\n", FIXME("wined3d %p, adapter_idx %u, device_type %s, src_format %s, dst_format %s stub!\n",
wined3d, adapter_idx, debug_d3ddevicetype(device_type), debug_d3dformat(src_format), wined3d, adapter_idx, debug_d3ddevicetype(device_type), debug_d3dformat(src_format),
...@@ -4221,8 +4221,9 @@ HRESULT CDECL wined3d_check_device_format_conversion(const struct wined3d *wined ...@@ -4221,8 +4221,9 @@ HRESULT CDECL wined3d_check_device_format_conversion(const struct wined3d *wined
return WINED3D_OK; return WINED3D_OK;
} }
HRESULT CDECL wined3d_check_device_type(const struct wined3d *wined3d, UINT adapter_idx, WINED3DDEVTYPE device_type, HRESULT CDECL wined3d_check_device_type(const struct wined3d *wined3d, UINT adapter_idx,
enum wined3d_format_id display_format, enum wined3d_format_id backbuffer_format, BOOL windowed) enum wined3d_device_type device_type, enum wined3d_format_id display_format,
enum wined3d_format_id backbuffer_format, BOOL windowed)
{ {
UINT mode_count; UINT mode_count;
HRESULT hr; HRESULT hr;
...@@ -4321,7 +4322,7 @@ HRESULT CDECL wined3d_check_device_type(const struct wined3d *wined3d, UINT adap ...@@ -4321,7 +4322,7 @@ HRESULT CDECL wined3d_check_device_type(const struct wined3d *wined3d, UINT adap
} }
HRESULT CDECL wined3d_get_device_caps(const struct wined3d *wined3d, UINT adapter_idx, HRESULT CDECL wined3d_get_device_caps(const struct wined3d *wined3d, UINT adapter_idx,
WINED3DDEVTYPE device_type, WINED3DCAPS *caps) enum wined3d_device_type device_type, WINED3DCAPS *caps)
{ {
const struct wined3d_adapter *adapter = &wined3d->adapters[adapter_idx]; const struct wined3d_adapter *adapter = &wined3d->adapters[adapter_idx];
const struct wined3d_gl_info *gl_info = &adapter->gl_info; const struct wined3d_gl_info *gl_info = &adapter->gl_info;
...@@ -4343,7 +4344,7 @@ HRESULT CDECL wined3d_get_device_caps(const struct wined3d *wined3d, UINT adapte ...@@ -4343,7 +4344,7 @@ HRESULT CDECL wined3d_get_device_caps(const struct wined3d *wined3d, UINT adapte
The following fields apply to both d3d8 and d3d9 The following fields apply to both d3d8 and d3d9
------------------------------------------------ */ ------------------------------------------------ */
/* Not quite true, but use h/w supported by opengl I suppose */ /* Not quite true, but use h/w supported by opengl I suppose */
caps->DeviceType = (device_type == WINED3DDEVTYPE_HAL) ? WINED3DDEVTYPE_HAL : WINED3DDEVTYPE_REF; caps->DeviceType = (device_type == WINED3D_DEVICE_TYPE_HAL) ? WINED3D_DEVICE_TYPE_HAL : WINED3D_DEVICE_TYPE_REF;
caps->AdapterOrdinal = adapter_idx; caps->AdapterOrdinal = adapter_idx;
caps->Caps = 0; caps->Caps = 0;
...@@ -4945,7 +4946,7 @@ HRESULT CDECL wined3d_get_device_caps(const struct wined3d *wined3d, UINT adapte ...@@ -4945,7 +4946,7 @@ HRESULT CDECL wined3d_get_device_caps(const struct wined3d *wined3d, UINT adapte
return WINED3D_OK; return WINED3D_OK;
} }
HRESULT CDECL wined3d_device_create(struct wined3d *wined3d, UINT adapter_idx, WINED3DDEVTYPE device_type, HRESULT CDECL wined3d_device_create(struct wined3d *wined3d, UINT adapter_idx, enum wined3d_device_type device_type,
HWND focus_window, DWORD flags, BYTE surface_alignment, struct wined3d_device_parent *device_parent, HWND focus_window, DWORD flags, BYTE surface_alignment, struct wined3d_device_parent *device_parent,
struct wined3d_device **device) struct wined3d_device **device)
{ {
......
...@@ -1875,17 +1875,17 @@ const char *debug_d3dformat(enum wined3d_format_id format_id) ...@@ -1875,17 +1875,17 @@ const char *debug_d3dformat(enum wined3d_format_id format_id)
} }
} }
const char *debug_d3ddevicetype(WINED3DDEVTYPE devtype) const char *debug_d3ddevicetype(enum wined3d_device_type device_type)
{ {
switch (devtype) switch (device_type)
{ {
#define DEVTYPE_TO_STR(dev) case dev: return #dev #define DEVTYPE_TO_STR(dev) case dev: return #dev
DEVTYPE_TO_STR(WINED3DDEVTYPE_HAL); DEVTYPE_TO_STR(WINED3D_DEVICE_TYPE_HAL);
DEVTYPE_TO_STR(WINED3DDEVTYPE_REF); DEVTYPE_TO_STR(WINED3D_DEVICE_TYPE_REF);
DEVTYPE_TO_STR(WINED3DDEVTYPE_SW); DEVTYPE_TO_STR(WINED3D_DEVICE_TYPE_SW);
#undef DEVTYPE_TO_STR #undef DEVTYPE_TO_STR
default: default:
FIXME("Unrecognized %u WINED3DDEVTYPE!\n", devtype); FIXME("Unrecognized device type %#x.\n", device_type);
return "unrecognized"; return "unrecognized";
} }
} }
......
...@@ -1766,7 +1766,7 @@ HRESULT device_clear_render_targets(struct wined3d_device *device, UINT rt_count ...@@ -1766,7 +1766,7 @@ HRESULT device_clear_render_targets(struct wined3d_device *device, UINT rt_count
BOOL device_context_add(struct wined3d_device *device, struct wined3d_context *context) DECLSPEC_HIDDEN; BOOL device_context_add(struct wined3d_device *device, struct wined3d_context *context) DECLSPEC_HIDDEN;
void device_context_remove(struct wined3d_device *device, struct wined3d_context *context) DECLSPEC_HIDDEN; void device_context_remove(struct wined3d_device *device, struct wined3d_context *context) DECLSPEC_HIDDEN;
HRESULT device_init(struct wined3d_device *device, struct wined3d *wined3d, HRESULT device_init(struct wined3d_device *device, struct wined3d *wined3d,
UINT adapter_idx, WINED3DDEVTYPE device_type, HWND focus_window, DWORD flags, UINT adapter_idx, enum wined3d_device_type device_type, HWND focus_window, DWORD flags,
BYTE surface_alignment, struct wined3d_device_parent *device_parent) DECLSPEC_HIDDEN; BYTE surface_alignment, struct wined3d_device_parent *device_parent) DECLSPEC_HIDDEN;
void device_preload_textures(const struct wined3d_device *device) DECLSPEC_HIDDEN; void device_preload_textures(const struct wined3d_device *device) DECLSPEC_HIDDEN;
LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL unicode, LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL unicode,
...@@ -2468,7 +2468,7 @@ void swapchain_update_render_to_fbo(struct wined3d_swapchain *swapchain) DECLSPE ...@@ -2468,7 +2468,7 @@ void swapchain_update_render_to_fbo(struct wined3d_swapchain *swapchain) DECLSPE
/* Trace routines */ /* Trace routines */
const char *debug_d3dformat(enum wined3d_format_id format_id) 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(enum wined3d_device_type device_type) 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;
const char *debug_d3dusagequery(DWORD usagequery) DECLSPEC_HIDDEN; const char *debug_d3dusagequery(DWORD usagequery) DECLSPEC_HIDDEN;
......
...@@ -89,14 +89,13 @@ enum wined3d_primitive_type ...@@ -89,14 +89,13 @@ enum wined3d_primitive_type
WINED3D_PT_TRIANGLESTRIP_ADJ = 13, WINED3D_PT_TRIANGLESTRIP_ADJ = 13,
}; };
typedef enum _WINED3DDEVTYPE enum wined3d_device_type
{ {
WINED3DDEVTYPE_HAL = 1, WINED3D_DEVICE_TYPE_HAL = 1,
WINED3DDEVTYPE_REF = 2, WINED3D_DEVICE_TYPE_REF = 2,
WINED3DDEVTYPE_SW = 3, WINED3D_DEVICE_TYPE_SW = 3,
WINED3DDEVTYPE_NULLREF = 4, WINED3D_DEVICE_TYPE_NULLREF = 4,
WINED3DDEVTYPE_FORCE_DWORD = 0xffffffff };
} WINED3DDEVTYPE;
typedef enum _WINED3DDEGREETYPE typedef enum _WINED3DDEGREETYPE
{ {
...@@ -1689,7 +1688,7 @@ struct wined3d_vertex_element ...@@ -1689,7 +1688,7 @@ struct wined3d_vertex_element
struct wined3d_device_creation_parameters struct wined3d_device_creation_parameters
{ {
UINT adapter_idx; UINT adapter_idx;
WINED3DDEVTYPE device_type; enum wined3d_device_type device_type;
HWND focus_window; HWND focus_window;
DWORD flags; DWORD flags;
}; };
...@@ -1781,7 +1780,7 @@ struct wined3d_ddraw_caps ...@@ -1781,7 +1780,7 @@ struct wined3d_ddraw_caps
typedef struct _WINED3DCAPS typedef struct _WINED3DCAPS
{ {
WINED3DDEVTYPE DeviceType; enum wined3d_device_type DeviceType;
UINT AdapterOrdinal; UINT AdapterOrdinal;
DWORD Caps; DWORD Caps;
...@@ -2029,20 +2028,20 @@ void __stdcall wined3d_mutex_lock(void); ...@@ -2029,20 +2028,20 @@ void __stdcall wined3d_mutex_lock(void);
void __stdcall wined3d_mutex_unlock(void); void __stdcall wined3d_mutex_unlock(void);
HRESULT __cdecl wined3d_check_depth_stencil_match(const struct wined3d *wined3d, UINT adapter_idx, HRESULT __cdecl wined3d_check_depth_stencil_match(const struct wined3d *wined3d, UINT adapter_idx,
WINED3DDEVTYPE device_type, enum wined3d_format_id adapter_format_id, enum wined3d_device_type device_type, enum wined3d_format_id adapter_format_id,
enum wined3d_format_id render_target_format_id, enum wined3d_format_id depth_stencil_format_id); enum wined3d_format_id render_target_format_id, enum wined3d_format_id depth_stencil_format_id);
HRESULT __cdecl wined3d_check_device_format(const struct wined3d *wined3d, UINT adaper_idx, HRESULT __cdecl wined3d_check_device_format(const struct wined3d *wined3d, UINT adaper_idx,
WINED3DDEVTYPE device_type, enum wined3d_format_id adapter_format_id, DWORD usage, enum wined3d_device_type device_type, enum wined3d_format_id adapter_format_id, DWORD usage,
WINED3DRESOURCETYPE resource_type, enum wined3d_format_id check_format_id, WINED3DRESOURCETYPE resource_type, enum wined3d_format_id check_format_id,
WINED3DSURFTYPE surface_type); WINED3DSURFTYPE surface_type);
HRESULT __cdecl wined3d_check_device_format_conversion(const struct wined3d *wined3d, UINT adapter_idx, HRESULT __cdecl wined3d_check_device_format_conversion(const struct wined3d *wined3d, UINT adapter_idx,
WINED3DDEVTYPE device_type, enum wined3d_format_id source_format_id, enum wined3d_device_type device_type, enum wined3d_format_id source_format_id,
enum wined3d_format_id target_format_id); enum wined3d_format_id target_format_id);
HRESULT __cdecl wined3d_check_device_multisample_type(const struct wined3d *wined3d, UINT adapter_idx, HRESULT __cdecl wined3d_check_device_multisample_type(const struct wined3d *wined3d, UINT adapter_idx,
WINED3DDEVTYPE device_type, enum wined3d_format_id surface_format_id, BOOL windowed, enum wined3d_device_type device_type, enum wined3d_format_id surface_format_id, BOOL windowed,
WINED3DMULTISAMPLE_TYPE multisample_type, DWORD *quality_levels); WINED3DMULTISAMPLE_TYPE multisample_type, DWORD *quality_levels);
HRESULT __cdecl wined3d_check_device_type(const struct wined3d *wined3d, UINT adapter_idx, HRESULT __cdecl wined3d_check_device_type(const struct wined3d *wined3d, UINT adapter_idx,
WINED3DDEVTYPE device_type, enum wined3d_format_id display_format_id, enum wined3d_device_type device_type, enum wined3d_format_id display_format_id,
enum wined3d_format_id backbuffer_format_id, BOOL windowed); enum wined3d_format_id backbuffer_format_id, BOOL windowed);
struct wined3d * __cdecl wined3d_create(UINT dxVersion, DWORD flags, void *parent); struct wined3d * __cdecl wined3d_create(UINT dxVersion, DWORD flags, void *parent);
ULONG __cdecl wined3d_decref(struct wined3d *wined3d); ULONG __cdecl wined3d_decref(struct wined3d *wined3d);
...@@ -2057,7 +2056,7 @@ UINT __cdecl wined3d_get_adapter_mode_count(const struct wined3d *wined3d, ...@@ -2057,7 +2056,7 @@ UINT __cdecl wined3d_get_adapter_mode_count(const struct wined3d *wined3d,
UINT adapter_idx, enum wined3d_format_id format_id); UINT adapter_idx, enum wined3d_format_id format_id);
HMONITOR __cdecl wined3d_get_adapter_monitor(const struct wined3d *wined3d, UINT adapter_idx); HMONITOR __cdecl wined3d_get_adapter_monitor(const struct wined3d *wined3d, UINT adapter_idx);
HRESULT __cdecl wined3d_get_device_caps(const struct wined3d *wined3d, UINT adapter_idx, HRESULT __cdecl wined3d_get_device_caps(const struct wined3d *wined3d, UINT adapter_idx,
WINED3DDEVTYPE device_type, WINED3DCAPS *caps); enum wined3d_device_type device_type, WINED3DCAPS *caps);
void * __cdecl wined3d_get_parent(const struct wined3d *wined3d); void * __cdecl wined3d_get_parent(const struct wined3d *wined3d);
ULONG __cdecl wined3d_incref(struct wined3d *wined3d); ULONG __cdecl wined3d_incref(struct wined3d *wined3d);
HRESULT __cdecl wined3d_register_software_device(struct wined3d *wined3d, void *init_function); HRESULT __cdecl wined3d_register_software_device(struct wined3d *wined3d, void *init_function);
...@@ -2088,7 +2087,7 @@ void __cdecl wined3d_device_clear_rendertarget_view(struct wined3d_device *devic ...@@ -2088,7 +2087,7 @@ void __cdecl wined3d_device_clear_rendertarget_view(struct wined3d_device *devic
HRESULT __cdecl wined3d_device_color_fill(struct wined3d_device *device, struct wined3d_surface *surface, HRESULT __cdecl wined3d_device_color_fill(struct wined3d_device *device, struct wined3d_surface *surface,
const RECT *rect, const struct wined3d_color *color); const RECT *rect, const struct wined3d_color *color);
HRESULT __cdecl wined3d_device_create(struct wined3d *wined3d, UINT adapter_idx, HRESULT __cdecl wined3d_device_create(struct wined3d *wined3d, UINT adapter_idx,
WINED3DDEVTYPE device_type, HWND focus_window, DWORD behaviour_flags, BYTE surface_alignment, enum wined3d_device_type device_type, HWND focus_window, DWORD behaviour_flags, BYTE surface_alignment,
struct wined3d_device_parent *device_parent, struct wined3d_device **device); struct wined3d_device_parent *device_parent, struct wined3d_device **device);
ULONG __cdecl wined3d_device_decref(struct wined3d_device *device); ULONG __cdecl wined3d_device_decref(struct wined3d_device *device);
HRESULT __cdecl wined3d_device_delete_patch(struct wined3d_device *device, UINT handle); HRESULT __cdecl wined3d_device_delete_patch(struct wined3d_device *device, UINT handle);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment