Commit 9a849104 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Get rid of the WINED3DMULTISAMPLE_TYPE typedef.

parent 08545dc7
......@@ -1406,7 +1406,7 @@ static HRESULT CDECL device_parent_create_surface(struct wined3d_device_parent *
static HRESULT CDECL device_parent_create_rendertarget(struct wined3d_device_parent *device_parent,
void *container_parent, UINT width, UINT height, enum wined3d_format_id format,
WINED3DMULTISAMPLE_TYPE multisample_type, DWORD multisample_quality, BOOL lockable,
enum wined3d_multisample_type multisample_type, DWORD multisample_quality, BOOL lockable,
struct wined3d_surface **surface)
{
struct d3d10_device *device = device_from_wined3d_device_parent(device_parent);
......@@ -1449,7 +1449,7 @@ static HRESULT CDECL device_parent_create_rendertarget(struct wined3d_device_par
}
static HRESULT CDECL device_parent_create_depth_stencil(struct wined3d_device_parent *device_parent,
UINT width, UINT height, enum wined3d_format_id format, WINED3DMULTISAMPLE_TYPE multisample_type,
UINT width, UINT height, enum wined3d_format_id format, enum wined3d_multisample_type multisample_type,
DWORD multisample_quality, BOOL discard, struct wined3d_surface **surface)
{
struct d3d10_device *device = device_from_wined3d_device_parent(device_parent);
......
......@@ -238,7 +238,7 @@ HRESULT d3d10_texture2d_init(struct d3d10_texture2d *texture, struct d3d10_devic
hr = wined3d_surface_create(device->wined3d_device, desc->Width, desc->Height,
wined3dformat_from_dxgi_format(desc->Format), 0, desc->Usage, WINED3DPOOL_DEFAULT,
desc->SampleDesc.Count > 1 ? desc->SampleDesc.Count : WINED3DMULTISAMPLE_NONE,
desc->SampleDesc.Count > 1 ? desc->SampleDesc.Count : WINED3D_MULTISAMPLE_NONE,
desc->SampleDesc.Quality, SURFACE_OPENGL, 0, texture, &d3d10_texture2d_wined3d_parent_ops,
&texture->wined3d_surface);
if (FAILED(hr))
......
......@@ -2843,7 +2843,7 @@ static HRESULT CDECL device_parent_create_surface(struct wined3d_device_parent *
static HRESULT CDECL device_parent_create_rendertarget(struct wined3d_device_parent *device_parent,
void *container_parent, UINT width, UINT height, enum wined3d_format_id format,
WINED3DMULTISAMPLE_TYPE multisample_type, DWORD multisample_quality, BOOL lockable,
enum wined3d_multisample_type multisample_type, DWORD multisample_quality, BOOL lockable,
struct wined3d_surface **surface)
{
IDirect3DDevice8Impl *device = device_from_device_parent(device_parent);
......@@ -2874,7 +2874,7 @@ static HRESULT CDECL device_parent_create_rendertarget(struct wined3d_device_par
}
static HRESULT CDECL device_parent_create_depth_stencil(struct wined3d_device_parent *device_parent,
UINT width, UINT height, enum wined3d_format_id format, WINED3DMULTISAMPLE_TYPE multisample_type,
UINT width, UINT height, enum wined3d_format_id format, enum wined3d_multisample_type multisample_type,
DWORD multisample_quality, BOOL discard, struct wined3d_surface **surface)
{
IDirect3DDevice8Impl *device = device_from_device_parent(device_parent);
......
......@@ -261,7 +261,8 @@ static HRESULT WINAPI IDirect3D8Impl_CheckDeviceMultiSampleType(IDirect3D8 *ifac
wined3d_mutex_lock();
hr = wined3d_check_device_multisample_type(This->WineD3D, Adapter, DeviceType,
wined3dformat_from_d3dformat(SurfaceFormat), Windowed, (WINED3DMULTISAMPLE_TYPE)MultiSampleType, NULL);
wined3dformat_from_d3dformat(SurfaceFormat), Windowed,
(enum wined3d_multisample_type)MultiSampleType, NULL);
wined3d_mutex_unlock();
return hr;
......
......@@ -3140,7 +3140,7 @@ static HRESULT CDECL device_parent_create_surface(struct wined3d_device_parent *
static HRESULT CDECL device_parent_create_rendertarget(struct wined3d_device_parent *device_parent,
void *container_parent, UINT width, UINT height, enum wined3d_format_id format,
WINED3DMULTISAMPLE_TYPE multisample_type, DWORD multisample_quality, BOOL lockable,
enum wined3d_multisample_type multisample_type, DWORD multisample_quality, BOOL lockable,
struct wined3d_surface **surface)
{
struct IDirect3DDevice9Impl *device = device_from_device_parent(device_parent);
......@@ -3172,7 +3172,7 @@ static HRESULT CDECL device_parent_create_rendertarget(struct wined3d_device_par
}
static HRESULT CDECL device_parent_create_depth_stencil(struct wined3d_device_parent *device_parent,
UINT width, UINT height, enum wined3d_format_id format, WINED3DMULTISAMPLE_TYPE multisample_type,
UINT width, UINT height, enum wined3d_format_id format, enum wined3d_multisample_type multisample_type,
DWORD multisample_quality, BOOL discard, struct wined3d_surface **surface)
{
struct IDirect3DDevice9Impl *device = device_from_device_parent(device_parent);
......
......@@ -5414,7 +5414,7 @@ static const struct wined3d_parent_ops ddraw_frontbuffer_parent_ops =
static HRESULT CDECL device_parent_create_rendertarget(struct wined3d_device_parent *device_parent,
void *container_parent, UINT width, UINT height, enum wined3d_format_id format,
WINED3DMULTISAMPLE_TYPE multisample_type, DWORD multisample_quality, BOOL lockable,
enum wined3d_multisample_type multisample_type, DWORD multisample_quality, BOOL lockable,
struct wined3d_surface **surface)
{
struct IDirectDrawImpl *ddraw = ddraw_from_device_parent(device_parent);
......@@ -5445,7 +5445,7 @@ static HRESULT CDECL device_parent_create_rendertarget(struct wined3d_device_par
}
static HRESULT CDECL device_parent_create_depth_stencil(struct wined3d_device_parent *device_parent,
UINT width, UINT height, enum wined3d_format_id format, WINED3DMULTISAMPLE_TYPE multisample_type,
UINT width, UINT height, enum wined3d_format_id format, enum wined3d_multisample_type multisample_type,
DWORD multisample_quality, BOOL discard, struct wined3d_surface **surface)
{
ERR("DirectDraw doesn't have and shouldn't try creating implicit depth buffers.\n");
......
......@@ -5518,7 +5518,7 @@ HRESULT ddraw_surface_init(IDirectDrawSurfaceImpl *surface, IDirectDrawImpl *ddr
surface->first_attached = surface;
hr = wined3d_surface_create(ddraw->wined3d_device, desc->dwWidth, desc->dwHeight, format, mip_level,
usage, pool, WINED3DMULTISAMPLE_NONE, 0, DefaultSurfaceType, flags,
usage, pool, WINED3D_MULTISAMPLE_NONE, 0, DefaultSurfaceType, flags,
surface, &ddraw_surface_wined3d_parent_ops, &surface->wined3d_surface);
if (FAILED(hr))
{
......
......@@ -209,7 +209,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_factory_CreateSwapChain(IWineDXGIFactory *
}
else
{
wined3d_desc.multisample_type = WINED3DMULTISAMPLE_NONE;
wined3d_desc.multisample_type = WINED3D_MULTISAMPLE_NONE;
wined3d_desc.multisample_quality = 0;
}
wined3d_desc.swap_effect = WINED3D_SWAP_EFFECT_DISCARD;
......
......@@ -1197,7 +1197,7 @@ static HRESULT buffer_init(struct wined3d_buffer *buffer, struct wined3d_device
}
hr = resource_init(&buffer->resource, device, WINED3DRTYPE_BUFFER, format,
WINED3DMULTISAMPLE_NONE, 0, usage, pool, size, 1, 1, size,
WINED3D_MULTISAMPLE_NONE, 0, usage, pool, size, 1, 1, size,
parent, parent_ops, &buffer_resource_ops);
if (FAILED(hr))
{
......
......@@ -946,7 +946,7 @@ static void device_load_logo(struct wined3d_device *device, const char *filename
}
hr = wined3d_surface_create(device, bm.bmWidth, bm.bmHeight, WINED3DFMT_B5G6R5_UNORM, 0, 0,
WINED3DPOOL_DEFAULT, WINED3DMULTISAMPLE_NONE, 0, SURFACE_OPENGL, WINED3D_SURFACE_MAPPABLE,
WINED3DPOOL_DEFAULT, WINED3D_MULTISAMPLE_NONE, 0, SURFACE_OPENGL, WINED3D_SURFACE_MAPPABLE,
NULL, &wined3d_null_parent_ops, &device->logo_surface);
if (FAILED(hr))
{
......
......@@ -3252,7 +3252,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,
enum wined3d_device_type device_type, enum wined3d_format_id surface_format_id, BOOL windowed,
WINED3DMULTISAMPLE_TYPE multisample_type, DWORD *quality_levels)
enum wined3d_multisample_type multisample_type, DWORD *quality_levels)
{
const struct wined3d_gl_info *gl_info;
......@@ -3277,7 +3277,7 @@ HRESULT CDECL wined3d_check_device_multisample_type(const struct wined3d *wined3
if (quality_levels)
{
if (multisample_type == WINED3DMULTISAMPLE_NONMASKABLE)
if (multisample_type == WINED3D_MULTISAMPLE_NON_MASKABLE)
/* FIXME: This is probably wrong. */
*quality_levels = gl_info->limits.samples;
else
......
......@@ -78,7 +78,7 @@ static void resource_check_usage(DWORD usage)
HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device *device,
WINED3DRESOURCETYPE resource_type, const struct wined3d_format *format,
WINED3DMULTISAMPLE_TYPE multisample_type, UINT multisample_quality,
enum wined3d_multisample_type multisample_type, UINT multisample_quality,
DWORD usage, WINED3DPOOL pool, UINT width, UINT height, UINT depth, UINT size,
void *parent, const struct wined3d_parent_ops *parent_ops,
const struct wined3d_resource_ops *resource_ops)
......
......@@ -3557,7 +3557,7 @@ static struct wined3d_surface *surface_convert_format(struct wined3d_surface *so
wined3d_surface_create(source->resource.device, source->resource.width,
source->resource.height, to_fmt, 0 /* level */, 0 /* usage */, WINED3DPOOL_SCRATCH,
WINED3DMULTISAMPLE_NONE /* TODO: Multisampled conversion */, 0 /* MultiSampleQuality */,
WINED3D_MULTISAMPLE_NONE /* TODO: Multisampled conversion */, 0 /* MultiSampleQuality */,
source->surface_type, WINED3D_SURFACE_MAPPABLE | WINED3D_SURFACE_DISCARD,
NULL /* parent */, &wined3d_null_parent_ops, &ret);
if (!ret)
......@@ -7095,7 +7095,7 @@ const struct blit_shader cpu_blit = {
};
static HRESULT surface_init(struct wined3d_surface *surface, WINED3DSURFTYPE surface_type, UINT alignment,
UINT width, UINT height, UINT level, WINED3DMULTISAMPLE_TYPE multisample_type,
UINT width, UINT height, UINT level, enum wined3d_multisample_type multisample_type,
UINT multisample_quality, struct wined3d_device *device, DWORD usage, enum wined3d_format_id format_id,
WINED3DPOOL pool, DWORD flags, void *parent, const struct wined3d_parent_ops *parent_ops)
{
......@@ -7237,7 +7237,7 @@ static HRESULT surface_init(struct wined3d_surface *surface, WINED3DSURFTYPE sur
HRESULT CDECL wined3d_surface_create(struct wined3d_device *device, UINT width, UINT height,
enum wined3d_format_id format_id, UINT level, DWORD usage, WINED3DPOOL pool,
WINED3DMULTISAMPLE_TYPE multisample_type, DWORD multisample_quality, WINED3DSURFTYPE surface_type,
enum wined3d_multisample_type multisample_type, DWORD multisample_quality, WINED3DSURFTYPE surface_type,
DWORD flags, void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_surface **surface)
{
struct wined3d_surface *object;
......
......@@ -33,7 +33,7 @@ static HRESULT wined3d_texture_init(struct wined3d_texture *texture, const struc
HRESULT hr;
hr = resource_init(&texture->resource, device, resource_type, format,
WINED3DMULTISAMPLE_NONE, 0, usage, pool, 0, 0, 0, 0,
WINED3D_MULTISAMPLE_NONE, 0, usage, pool, 0, 0, 0, 0,
parent, parent_ops, resource_ops);
if (FAILED(hr))
{
......
......@@ -280,7 +280,7 @@ static HRESULT volume_init(struct wined3d_volume *volume, struct wined3d_device
}
hr = resource_init(&volume->resource, device, WINED3DRTYPE_VOLUME, format,
WINED3DMULTISAMPLE_NONE, 0, usage, pool, width, height, depth,
WINED3D_MULTISAMPLE_NONE, 0, usage, pool, width, height, depth,
width * height * depth * format->byte_count, parent, parent_ops,
&volume_resource_ops);
if (FAILED(hr))
......
......@@ -1837,7 +1837,7 @@ struct wined3d_resource
struct wined3d_device *device;
WINED3DRESOURCETYPE resourceType;
const struct wined3d_format *format;
WINED3DMULTISAMPLE_TYPE multisample_type;
enum wined3d_multisample_type multisample_type;
UINT multisample_quality;
DWORD usage;
WINED3DPOOL pool;
......@@ -1861,7 +1861,7 @@ void resource_cleanup(struct wined3d_resource *resource) DECLSPEC_HIDDEN;
DWORD resource_get_priority(const struct wined3d_resource *resource) DECLSPEC_HIDDEN;
HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device *device,
WINED3DRESOURCETYPE resource_type, const struct wined3d_format *format,
WINED3DMULTISAMPLE_TYPE multisample_type, UINT multisample_quality,
enum wined3d_multisample_type multisample_type, UINT multisample_quality,
DWORD usage, WINED3DPOOL pool, UINT width, UINT height, UINT depth, UINT size,
void *parent, const struct wined3d_parent_ops *parent_ops,
const struct wined3d_resource_ops *resource_ops) DECLSPEC_HIDDEN;
......
......@@ -527,27 +527,26 @@ enum wined3d_sampler_state
};
#define WINED3D_HIGHEST_SAMPLER_STATE WINED3D_SAMP_DMAP_OFFSET
typedef enum _WINED3DMULTISAMPLE_TYPE
{
WINED3DMULTISAMPLE_NONE = 0,
WINED3DMULTISAMPLE_NONMASKABLE = 1,
WINED3DMULTISAMPLE_2_SAMPLES = 2,
WINED3DMULTISAMPLE_3_SAMPLES = 3,
WINED3DMULTISAMPLE_4_SAMPLES = 4,
WINED3DMULTISAMPLE_5_SAMPLES = 5,
WINED3DMULTISAMPLE_6_SAMPLES = 6,
WINED3DMULTISAMPLE_7_SAMPLES = 7,
WINED3DMULTISAMPLE_8_SAMPLES = 8,
WINED3DMULTISAMPLE_9_SAMPLES = 9,
WINED3DMULTISAMPLE_10_SAMPLES = 10,
WINED3DMULTISAMPLE_11_SAMPLES = 11,
WINED3DMULTISAMPLE_12_SAMPLES = 12,
WINED3DMULTISAMPLE_13_SAMPLES = 13,
WINED3DMULTISAMPLE_14_SAMPLES = 14,
WINED3DMULTISAMPLE_15_SAMPLES = 15,
WINED3DMULTISAMPLE_16_SAMPLES = 16,
WINED3DMULTISAMPLE_FORCE_DWORD = 0xffffffff
} WINED3DMULTISAMPLE_TYPE;
enum wined3d_multisample_type
{
WINED3D_MULTISAMPLE_NONE = 0,
WINED3D_MULTISAMPLE_NON_MASKABLE = 1,
WINED3D_MULTISAMPLE_2_SAMPLES = 2,
WINED3D_MULTISAMPLE_3_SAMPLES = 3,
WINED3D_MULTISAMPLE_4_SAMPLES = 4,
WINED3D_MULTISAMPLE_5_SAMPLES = 5,
WINED3D_MULTISAMPLE_6_SAMPLES = 6,
WINED3D_MULTISAMPLE_7_SAMPLES = 7,
WINED3D_MULTISAMPLE_8_SAMPLES = 8,
WINED3D_MULTISAMPLE_9_SAMPLES = 9,
WINED3D_MULTISAMPLE_10_SAMPLES = 10,
WINED3D_MULTISAMPLE_11_SAMPLES = 11,
WINED3D_MULTISAMPLE_12_SAMPLES = 12,
WINED3D_MULTISAMPLE_13_SAMPLES = 13,
WINED3D_MULTISAMPLE_14_SAMPLES = 14,
WINED3D_MULTISAMPLE_15_SAMPLES = 15,
WINED3D_MULTISAMPLE_16_SAMPLES = 16,
};
typedef enum _WINED3DTEXTURESTAGESTATETYPE
{
......@@ -1625,7 +1624,7 @@ struct wined3d_swapchain_desc
UINT backbuffer_height;
enum wined3d_format_id backbuffer_format;
UINT backbuffer_count;
WINED3DMULTISAMPLE_TYPE multisample_type;
enum wined3d_multisample_type multisample_type;
DWORD multisample_quality;
enum wined3d_swap_effect swap_effect;
HWND device_window;
......@@ -1642,7 +1641,7 @@ struct wined3d_resource_desc
{
WINED3DRESOURCETYPE resource_type;
enum wined3d_format_id format;
WINED3DMULTISAMPLE_TYPE multisample_type;
enum wined3d_multisample_type multisample_type;
UINT multisample_quality;
DWORD usage;
WINED3DPOOL pool;
......@@ -1994,10 +1993,10 @@ struct wined3d_device_parent_ops
UINT width, UINT height, enum wined3d_format_id format_id, DWORD usage, WINED3DPOOL pool,
UINT level, WINED3DCUBEMAP_FACES face, struct wined3d_surface **surface);
HRESULT (__cdecl *create_rendertarget)(struct wined3d_device_parent *device_parent, void *container_parent,
UINT width, UINT height, enum wined3d_format_id format_id, WINED3DMULTISAMPLE_TYPE multisample_type,
UINT width, UINT height, enum wined3d_format_id format_id, enum wined3d_multisample_type multisample_type,
DWORD multisample_quality, BOOL lockable, struct wined3d_surface **surface);
HRESULT (__cdecl *create_depth_stencil)(struct wined3d_device_parent *device_parent,
UINT width, UINT height, enum wined3d_format_id format_id, WINED3DMULTISAMPLE_TYPE multisample_type,
UINT width, UINT height, enum wined3d_format_id format_id, enum wined3d_multisample_type multisample_type,
DWORD multisample_quality, BOOL discard, struct wined3d_surface **surface);
HRESULT (__cdecl *create_volume)(struct wined3d_device_parent *device_parent, void *container_parent,
UINT width, UINT height, UINT depth, enum wined3d_format_id format_id, WINED3DPOOL pool, DWORD usage,
......@@ -2023,7 +2022,7 @@ HRESULT __cdecl wined3d_check_device_format_conversion(const struct wined3d *win
enum wined3d_format_id target_format_id);
HRESULT __cdecl wined3d_check_device_multisample_type(const struct wined3d *wined3d, UINT adapter_idx,
enum wined3d_device_type device_type, enum wined3d_format_id surface_format_id, BOOL windowed,
WINED3DMULTISAMPLE_TYPE multisample_type, DWORD *quality_levels);
enum wined3d_multisample_type multisample_type, DWORD *quality_levels);
HRESULT __cdecl wined3d_check_device_type(const struct wined3d *wined3d, UINT adapter_idx,
enum wined3d_device_type device_type, enum wined3d_format_id display_format_id,
enum wined3d_format_id backbuffer_format_id, BOOL windowed);
......@@ -2310,7 +2309,7 @@ HRESULT __cdecl wined3d_surface_blt(struct wined3d_surface *dst_surface, const R
const WINEDDBLTFX *blt_fx, WINED3DTEXTUREFILTERTYPE filter);
HRESULT __cdecl wined3d_surface_create(struct wined3d_device *device, UINT width, UINT height,
enum wined3d_format_id format_id, UINT level, DWORD usage, WINED3DPOOL pool,
WINED3DMULTISAMPLE_TYPE multisample_type, DWORD multisample_quality, WINED3DSURFTYPE surface_type,
enum wined3d_multisample_type multisample_type, DWORD multisample_quality, WINED3DSURFTYPE surface_type,
DWORD flags, void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_surface **surface);
ULONG __cdecl wined3d_surface_decref(struct wined3d_surface *surface);
HRESULT __cdecl wined3d_surface_flip(struct wined3d_surface *surface, struct wined3d_surface *override, DWORD flags);
......
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