mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 11:43:31 +00:00
wined3d: Get rid of the WINED3DSURFTYPE typedef.
This commit is contained in:
parent
d8b00ecf34
commit
3769afa33d
18 changed files with 58 additions and 56 deletions
|
@ -239,7 +239,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, WINED3D_POOL_DEFAULT,
|
||||
desc->SampleDesc.Count > 1 ? desc->SampleDesc.Count : WINED3D_MULTISAMPLE_NONE,
|
||||
desc->SampleDesc.Quality, SURFACE_OPENGL, 0, texture, &d3d10_texture2d_wined3d_parent_ops,
|
||||
desc->SampleDesc.Quality, WINED3D_SURFACE_TYPE_OPENGL, 0, texture, &d3d10_texture2d_wined3d_parent_ops,
|
||||
&texture->wined3d_surface);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
|
|
|
@ -243,7 +243,7 @@ static HRESULT WINAPI IDirect3D8Impl_CheckDeviceFormat(LPDIRECT3D8 iface, UINT A
|
|||
|
||||
wined3d_mutex_lock();
|
||||
hr = wined3d_check_device_format(This->WineD3D, Adapter, DeviceType, wined3dformat_from_d3dformat(AdapterFormat),
|
||||
Usage, wined3d_rtype, wined3dformat_from_d3dformat(CheckFormat), SURFACE_OPENGL);
|
||||
Usage, wined3d_rtype, wined3dformat_from_d3dformat(CheckFormat), WINED3D_SURFACE_TYPE_OPENGL);
|
||||
wined3d_mutex_unlock();
|
||||
|
||||
return hr;
|
||||
|
|
|
@ -339,7 +339,7 @@ HRESULT surface_init(IDirect3DSurface8Impl *surface, IDirect3DDevice8Impl *devic
|
|||
wined3d_mutex_lock();
|
||||
hr = wined3d_surface_create(device->wined3d_device, width, height, wined3dformat_from_d3dformat(format),
|
||||
level, usage & WINED3DUSAGE_MASK, (enum wined3d_pool)pool, multisample_type, multisample_quality,
|
||||
SURFACE_OPENGL, flags, surface, &d3d8_surface_wined3d_parent_ops, &surface->wined3d_surface);
|
||||
WINED3D_SURFACE_TYPE_OPENGL, flags, surface, &d3d8_surface_wined3d_parent_ops, &surface->wined3d_surface);
|
||||
wined3d_mutex_unlock();
|
||||
if (FAILED(hr))
|
||||
{
|
||||
|
|
|
@ -175,7 +175,7 @@ HRESULT swapchain_init(IDirect3DSwapChain8Impl *swapchain, IDirect3DDevice8Impl
|
|||
|
||||
wined3d_mutex_lock();
|
||||
hr = wined3d_swapchain_create(device->wined3d_device, &desc,
|
||||
SURFACE_OPENGL, swapchain, &d3d8_swapchain_wined3d_parent_ops,
|
||||
WINED3D_SURFACE_TYPE_OPENGL, swapchain, &d3d8_swapchain_wined3d_parent_ops,
|
||||
&swapchain->wined3d_swapchain);
|
||||
wined3d_mutex_unlock();
|
||||
|
||||
|
|
|
@ -251,7 +251,7 @@ static HRESULT WINAPI IDirect3D9Impl_CheckDeviceFormat(IDirect3D9Ex *iface, UINT
|
|||
|
||||
wined3d_mutex_lock();
|
||||
hr = wined3d_check_device_format(This->WineD3D, Adapter, DeviceType, wined3dformat_from_d3dformat(AdapterFormat),
|
||||
Usage, wined3d_rtype, wined3dformat_from_d3dformat(CheckFormat), SURFACE_OPENGL);
|
||||
Usage, wined3d_rtype, wined3dformat_from_d3dformat(CheckFormat), WINED3D_SURFACE_TYPE_OPENGL);
|
||||
wined3d_mutex_unlock();
|
||||
|
||||
return hr;
|
||||
|
|
|
@ -432,7 +432,7 @@ HRESULT surface_init(IDirect3DSurface9Impl *surface, IDirect3DDevice9Impl *devic
|
|||
wined3d_mutex_lock();
|
||||
hr = wined3d_surface_create(device->wined3d_device, width, height, wined3dformat_from_d3dformat(format),
|
||||
level, usage & WINED3DUSAGE_MASK, (enum wined3d_pool)pool, multisample_type, multisample_quality,
|
||||
SURFACE_OPENGL, flags, surface, &d3d9_surface_wined3d_parent_ops, &surface->wined3d_surface);
|
||||
WINED3D_SURFACE_TYPE_OPENGL, flags, surface, &d3d9_surface_wined3d_parent_ops, &surface->wined3d_surface);
|
||||
wined3d_mutex_unlock();
|
||||
if (FAILED(hr))
|
||||
{
|
||||
|
|
|
@ -264,7 +264,7 @@ HRESULT swapchain_init(IDirect3DSwapChain9Impl *swapchain, IDirect3DDevice9Impl
|
|||
|
||||
wined3d_mutex_lock();
|
||||
hr = wined3d_swapchain_create(device->wined3d_device, &desc,
|
||||
SURFACE_OPENGL, swapchain, &d3d9_swapchain_wined3d_parent_ops,
|
||||
WINED3D_SURFACE_TYPE_OPENGL, swapchain, &d3d9_swapchain_wined3d_parent_ops,
|
||||
&swapchain->wined3d_swapchain);
|
||||
wined3d_mutex_unlock();
|
||||
|
||||
|
|
|
@ -201,7 +201,7 @@ static HRESULT WINAPI ddraw7_QueryInterface(IDirectDraw7 *iface, REFIID refiid,
|
|||
IsEqualGUID( &IID_IDirect3D7 , refiid ) )
|
||||
{
|
||||
/* Check the surface implementation */
|
||||
if (DefaultSurfaceType != SURFACE_OPENGL)
|
||||
if (DefaultSurfaceType != WINED3D_SURFACE_TYPE_OPENGL)
|
||||
{
|
||||
WARN("The app requests a Direct3D interface, but non-opengl surfaces where set in winecfg\n");
|
||||
/* Do not abort here, only reject 3D Device creation */
|
||||
|
@ -418,7 +418,7 @@ void ddraw_destroy_swapchain(IDirectDrawImpl *ddraw)
|
|||
wined3d_swapchain_decref(ddraw->wined3d_swapchain);
|
||||
ddraw->wined3d_swapchain = NULL;
|
||||
|
||||
if (DefaultSurfaceType == SURFACE_OPENGL)
|
||||
if (DefaultSurfaceType == WINED3D_SURFACE_TYPE_OPENGL)
|
||||
{
|
||||
UINT i;
|
||||
|
||||
|
@ -689,7 +689,7 @@ static HRESULT ddraw_create_swapchain(IDirectDrawImpl *ddraw, HWND window, BOOL
|
|||
swapchain_desc.device_window = window;
|
||||
swapchain_desc.windowed = windowed;
|
||||
|
||||
if (DefaultSurfaceType == SURFACE_OPENGL)
|
||||
if (DefaultSurfaceType == WINED3D_SURFACE_TYPE_OPENGL)
|
||||
hr = ddraw_attach_d3d_device(ddraw, &swapchain_desc);
|
||||
else
|
||||
hr = wined3d_device_init_gdi(ddraw->wined3d_device, &swapchain_desc);
|
||||
|
@ -918,7 +918,7 @@ static HRESULT WINAPI ddraw7_SetCooperativeLevel(IDirectDraw7 *iface, HWND hwnd,
|
|||
|
||||
if (This->wined3d_swapchain)
|
||||
{
|
||||
if (DefaultSurfaceType != SURFACE_GDI)
|
||||
if (DefaultSurfaceType != WINED3D_SURFACE_TYPE_GDI)
|
||||
{
|
||||
restore_state = TRUE;
|
||||
|
||||
|
@ -1305,7 +1305,8 @@ static HRESULT WINAPI ddraw7_GetCaps(IDirectDraw7 *iface, DDCAPS *DriverCaps, DD
|
|||
/* Even if WineD3D supports 3D rendering, remove the cap if ddraw is configured
|
||||
* not to use it
|
||||
*/
|
||||
if(DefaultSurfaceType == SURFACE_GDI) {
|
||||
if (DefaultSurfaceType == WINED3D_SURFACE_TYPE_GDI)
|
||||
{
|
||||
caps.dwCaps &= ~DDCAPS_3D;
|
||||
caps.ddsCaps.dwCaps &= ~(DDSCAPS_3DDEVICE | DDSCAPS_MIPMAP | DDSCAPS_TEXTURE | DDSCAPS_ZBUFFER);
|
||||
}
|
||||
|
@ -2609,7 +2610,7 @@ static HRESULT ddraw_create_surface(IDirectDrawImpl *This, DDSURFACEDESC2 *pDDSD
|
|||
DDRAW_dump_surface_desc(pDDSD);
|
||||
}
|
||||
|
||||
if ((pDDSD->ddsCaps.dwCaps & DDSCAPS_3DDEVICE) && DefaultSurfaceType != SURFACE_OPENGL)
|
||||
if ((pDDSD->ddsCaps.dwCaps & DDSCAPS_3DDEVICE) && DefaultSurfaceType != WINED3D_SURFACE_TYPE_OPENGL)
|
||||
{
|
||||
WARN("The application requests a 3D capable surface, but a non-OpenGL surface type was set in the registry.\n");
|
||||
/* Do not fail surface creation, only fail 3D device creation. */
|
||||
|
@ -4438,7 +4439,7 @@ static HRESULT WINAPI d3d7_CreateDevice(IDirect3D7 *iface, REFCLSID riid,
|
|||
*device = NULL;
|
||||
|
||||
/* Fail device creation if non-opengl surfaces are used. */
|
||||
if (DefaultSurfaceType != SURFACE_OPENGL)
|
||||
if (DefaultSurfaceType != WINED3D_SURFACE_TYPE_OPENGL)
|
||||
{
|
||||
ERR("The application wants to create a Direct3D device, but non-opengl surfaces are set in the registry.\n");
|
||||
ERR("Please set the surface implementation to opengl or autodetection to allow 3D rendering.\n");
|
||||
|
@ -4685,7 +4686,7 @@ static HRESULT WINAPI d3d7_EnumZBufferFormats(IDirect3D7 *iface, REFCLSID device
|
|||
for (i = 0; i < (sizeof(formats) / sizeof(*formats)); ++i)
|
||||
{
|
||||
hr = wined3d_check_device_format(This->wined3d, WINED3DADAPTER_DEFAULT, type, mode.format_id,
|
||||
WINED3DUSAGE_DEPTHSTENCIL, WINED3D_RTYPE_SURFACE, formats[i], SURFACE_OPENGL);
|
||||
WINED3DUSAGE_DEPTHSTENCIL, WINED3D_RTYPE_SURFACE, formats[i], WINED3D_SURFACE_TYPE_OPENGL);
|
||||
if (SUCCEEDED(hr))
|
||||
{
|
||||
DDPIXELFORMAT pformat;
|
||||
|
@ -4710,7 +4711,7 @@ static HRESULT WINAPI d3d7_EnumZBufferFormats(IDirect3D7 *iface, REFCLSID device
|
|||
* pixel format, so we use dwZBufferBitDepth=32. Some games expect 24. Windows Vista and
|
||||
* newer enumerate both versions, so we do the same(bug 22434) */
|
||||
hr = wined3d_check_device_format(This->wined3d, WINED3DADAPTER_DEFAULT, type, mode.format_id,
|
||||
WINED3DUSAGE_DEPTHSTENCIL, WINED3D_RTYPE_SURFACE, WINED3DFMT_X8D24_UNORM, SURFACE_OPENGL);
|
||||
WINED3DUSAGE_DEPTHSTENCIL, WINED3D_RTYPE_SURFACE, WINED3DFMT_X8D24_UNORM, WINED3D_SURFACE_TYPE_OPENGL);
|
||||
if (SUCCEEDED(hr))
|
||||
{
|
||||
DDPIXELFORMAT x8d24 =
|
||||
|
|
|
@ -138,7 +138,7 @@ void DDRAW_Convert_DDDEVICEIDENTIFIER_2_To_1(const DDDEVICEIDENTIFIER2 *pIn, DDD
|
|||
struct wined3d_vertex_declaration *ddraw_find_decl(IDirectDrawImpl *This, DWORD fvf) DECLSPEC_HIDDEN;
|
||||
|
||||
/* The default surface type */
|
||||
extern WINED3DSURFTYPE DefaultSurfaceType DECLSPEC_HIDDEN;
|
||||
extern enum wined3d_surface_type DefaultSurfaceType DECLSPEC_HIDDEN;
|
||||
|
||||
/*****************************************************************************
|
||||
* IDirectDrawSurface implementation structure
|
||||
|
|
|
@ -1162,7 +1162,7 @@ IDirect3DDeviceImpl_7_EnumTextureFormats(IDirect3DDevice7 *iface,
|
|||
for (i = 0; i < sizeof(FormatList) / sizeof(*FormatList); ++i)
|
||||
{
|
||||
hr = wined3d_check_device_format(This->ddraw->wined3d, WINED3DADAPTER_DEFAULT, WINED3D_DEVICE_TYPE_HAL,
|
||||
mode.format_id, 0, WINED3D_RTYPE_TEXTURE, FormatList[i], SURFACE_OPENGL);
|
||||
mode.format_id, 0, WINED3D_RTYPE_TEXTURE, FormatList[i], WINED3D_SURFACE_TYPE_OPENGL);
|
||||
if (hr == D3D_OK)
|
||||
{
|
||||
DDPIXELFORMAT pformat;
|
||||
|
@ -1186,7 +1186,7 @@ IDirect3DDeviceImpl_7_EnumTextureFormats(IDirect3DDevice7 *iface,
|
|||
{
|
||||
hr = wined3d_check_device_format(This->ddraw->wined3d, WINED3DADAPTER_DEFAULT,
|
||||
WINED3D_DEVICE_TYPE_HAL, mode.format_id, WINED3DUSAGE_QUERY_LEGACYBUMPMAP,
|
||||
WINED3D_RTYPE_TEXTURE, BumpFormatList[i], SURFACE_OPENGL);
|
||||
WINED3D_RTYPE_TEXTURE, BumpFormatList[i], WINED3D_SURFACE_TYPE_OPENGL);
|
||||
if (hr == D3D_OK)
|
||||
{
|
||||
DDPIXELFORMAT pformat;
|
||||
|
@ -1299,7 +1299,7 @@ IDirect3DDeviceImpl_2_EnumTextureFormats(IDirect3DDevice2 *iface,
|
|||
for (i = 0; i < sizeof(FormatList) / sizeof(*FormatList); ++i)
|
||||
{
|
||||
hr = wined3d_check_device_format(This->ddraw->wined3d, 0, WINED3D_DEVICE_TYPE_HAL,
|
||||
mode.format_id, 0, WINED3D_RTYPE_TEXTURE, FormatList[i], SURFACE_OPENGL);
|
||||
mode.format_id, 0, WINED3D_RTYPE_TEXTURE, FormatList[i], WINED3D_SURFACE_TYPE_OPENGL);
|
||||
if (hr == D3D_OK)
|
||||
{
|
||||
DDSURFACEDESC sdesc;
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
WINE_DEFAULT_DEBUG_CHANNEL(ddraw);
|
||||
|
||||
/* The configured default surface */
|
||||
WINED3DSURFTYPE DefaultSurfaceType = SURFACE_OPENGL;
|
||||
enum wined3d_surface_type DefaultSurfaceType = WINED3D_SURFACE_TYPE_OPENGL;
|
||||
|
||||
static struct list global_ddraw_list = LIST_INIT(global_ddraw_list);
|
||||
|
||||
|
@ -869,12 +869,12 @@ DllMain(HINSTANCE hInstDLL,
|
|||
if (!strcmp(buffer,"gdi"))
|
||||
{
|
||||
TRACE("Defaulting to GDI surfaces\n");
|
||||
DefaultSurfaceType = SURFACE_GDI;
|
||||
DefaultSurfaceType = WINED3D_SURFACE_TYPE_GDI;
|
||||
}
|
||||
else if (!strcmp(buffer,"opengl"))
|
||||
{
|
||||
TRACE("Defaulting to opengl surfaces\n");
|
||||
DefaultSurfaceType = SURFACE_OPENGL;
|
||||
DefaultSurfaceType = WINED3D_SURFACE_TYPE_OPENGL;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -280,7 +280,7 @@ HRESULT dxgi_swapchain_init(struct dxgi_swapchain *swapchain, struct dxgi_device
|
|||
swapchain->refcount = 1;
|
||||
|
||||
hr = wined3d_swapchain_create(device->wined3d_device, desc,
|
||||
SURFACE_OPENGL, swapchain, &dxgi_swapchain_wined3d_parent_ops,
|
||||
WINED3D_SURFACE_TYPE_OPENGL, swapchain, &dxgi_swapchain_wined3d_parent_ops,
|
||||
&swapchain->wined3d_swapchain);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
|
|
|
@ -951,7 +951,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,
|
||||
WINED3D_POOL_DEFAULT, WINED3D_MULTISAMPLE_NONE, 0, SURFACE_OPENGL, WINED3D_SURFACE_MAPPABLE,
|
||||
WINED3D_POOL_DEFAULT, WINED3D_MULTISAMPLE_NONE, 0, WINED3D_SURFACE_TYPE_OPENGL, WINED3D_SURFACE_MAPPABLE,
|
||||
NULL, &wined3d_null_parent_ops, &device->logo_surface);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
|
|
|
@ -3721,9 +3721,9 @@ static BOOL CheckTextureCapability(const struct wined3d_adapter *adapter, const
|
|||
static BOOL CheckSurfaceCapability(const struct wined3d_adapter *adapter,
|
||||
const struct wined3d_format *adapter_format,
|
||||
const struct wined3d_format *check_format,
|
||||
WINED3DSURFTYPE SurfaceType)
|
||||
enum wined3d_surface_type surface_type)
|
||||
{
|
||||
if (SurfaceType == SURFACE_GDI)
|
||||
if (surface_type == WINED3D_SURFACE_TYPE_GDI)
|
||||
{
|
||||
switch (check_format->id)
|
||||
{
|
||||
|
@ -3794,7 +3794,8 @@ static BOOL CheckVertexTextureCapability(const struct wined3d_adapter *adapter,
|
|||
|
||||
HRESULT CDECL wined3d_check_device_format(const struct wined3d *wined3d, UINT adapter_idx,
|
||||
enum wined3d_device_type device_type, enum wined3d_format_id adapter_format_id, DWORD usage,
|
||||
enum wined3d_resource_type resource_type, enum wined3d_format_id check_format_id, WINED3DSURFTYPE surface_type)
|
||||
enum wined3d_resource_type resource_type, enum wined3d_format_id check_format_id,
|
||||
enum wined3d_surface_type surface_type)
|
||||
{
|
||||
const struct wined3d_adapter *adapter = &wined3d->adapters[adapter_idx];
|
||||
const struct wined3d_gl_info *gl_info = &adapter->gl_info;
|
||||
|
@ -3823,7 +3824,7 @@ HRESULT CDECL wined3d_check_device_format(const struct wined3d *wined3d, UINT ad
|
|||
* - WINED3DUSAGE_SOFTWAREPROCESSING
|
||||
* - WINED3DUSAGE_QUERY_WRAPANDMIP
|
||||
*/
|
||||
if (surface_type != SURFACE_OPENGL)
|
||||
if (surface_type != WINED3D_SURFACE_TYPE_OPENGL)
|
||||
{
|
||||
TRACE_(d3d_caps)("[FAILED]\n");
|
||||
return WINED3DERR_NOTAVAILABLE;
|
||||
|
@ -3985,7 +3986,7 @@ HRESULT CDECL wined3d_check_device_format(const struct wined3d *wined3d, UINT ad
|
|||
* - WINED3DUSAGE_TEXTAPI (d3d9ex)
|
||||
* - WINED3DUSAGE_QUERY_WRAPANDMIP
|
||||
*/
|
||||
if (surface_type != SURFACE_OPENGL)
|
||||
if (surface_type != WINED3D_SURFACE_TYPE_OPENGL)
|
||||
{
|
||||
TRACE_(d3d_caps)("[FAILED]\n");
|
||||
return WINED3DERR_NOTAVAILABLE;
|
||||
|
@ -4123,7 +4124,7 @@ HRESULT CDECL wined3d_check_device_format(const struct wined3d *wined3d, UINT ad
|
|||
* - D3DUSAGE_SOFTWAREPROCESSING
|
||||
* - D3DUSAGE_QUERY_WRAPANDMIP
|
||||
*/
|
||||
if (surface_type != SURFACE_OPENGL)
|
||||
if (surface_type != WINED3D_SURFACE_TYPE_OPENGL)
|
||||
{
|
||||
TRACE_(d3d_caps)("[FAILED]\n");
|
||||
return WINED3DERR_NOTAVAILABLE;
|
||||
|
@ -4385,7 +4386,7 @@ HRESULT CDECL wined3d_check_device_type(const struct wined3d *wined3d, UINT adap
|
|||
|
||||
/* Use CheckDeviceFormat to see if the backbuffer_format is usable with the given display_format */
|
||||
hr = wined3d_check_device_format(wined3d, adapter_idx, device_type, display_format,
|
||||
WINED3DUSAGE_RENDERTARGET, WINED3D_RTYPE_SURFACE, backbuffer_format, SURFACE_OPENGL);
|
||||
WINED3DUSAGE_RENDERTARGET, WINED3D_RTYPE_SURFACE, backbuffer_format, WINED3D_SURFACE_TYPE_OPENGL);
|
||||
if (FAILED(hr))
|
||||
TRACE_(d3d_caps)("Unsupported display/backbuffer format combination %s / %s.\n",
|
||||
debug_d3dformat(display_format), debug_d3dformat(backbuffer_format));
|
||||
|
|
|
@ -7200,7 +7200,7 @@ const struct blit_shader cpu_blit = {
|
|||
cpu_blit_depth_fill,
|
||||
};
|
||||
|
||||
static HRESULT surface_init(struct wined3d_surface *surface, WINED3DSURFTYPE surface_type, UINT alignment,
|
||||
static HRESULT surface_init(struct wined3d_surface *surface, enum wined3d_surface_type surface_type, UINT alignment,
|
||||
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,
|
||||
enum wined3d_pool pool, DWORD flags, void *parent, const struct wined3d_parent_ops *parent_ops)
|
||||
|
@ -7265,11 +7265,11 @@ static HRESULT surface_init(struct wined3d_surface *surface, WINED3DSURFTYPE sur
|
|||
|
||||
switch (surface_type)
|
||||
{
|
||||
case SURFACE_OPENGL:
|
||||
case WINED3D_SURFACE_TYPE_OPENGL:
|
||||
surface->surface_ops = &surface_ops;
|
||||
break;
|
||||
|
||||
case SURFACE_GDI:
|
||||
case WINED3D_SURFACE_TYPE_GDI:
|
||||
surface->surface_ops = &gdi_surface_ops;
|
||||
break;
|
||||
|
||||
|
@ -7343,8 +7343,9 @@ 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, enum wined3d_pool pool,
|
||||
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)
|
||||
enum wined3d_multisample_type multisample_type, DWORD multisample_quality,
|
||||
enum wined3d_surface_type surface_type, DWORD flags, void *parent,
|
||||
const struct wined3d_parent_ops *parent_ops, struct wined3d_surface **surface)
|
||||
{
|
||||
struct wined3d_surface *object;
|
||||
HRESULT hr;
|
||||
|
@ -7355,7 +7356,7 @@ HRESULT CDECL wined3d_surface_create(struct wined3d_device *device, UINT width,
|
|||
surface, debug_d3dusage(usage), usage, debug_d3dpool(pool), multisample_type, multisample_quality);
|
||||
TRACE("surface_type %#x, flags %#x, parent %p, parent_ops %p.\n", surface_type, flags, parent, parent_ops);
|
||||
|
||||
if (surface_type == SURFACE_OPENGL && !device->adapter)
|
||||
if (surface_type == WINED3D_SURFACE_TYPE_OPENGL && !device->adapter)
|
||||
{
|
||||
ERR("OpenGL surfaces are not available without OpenGL.\n");
|
||||
return WINED3DERR_NOTAVAILABLE;
|
||||
|
|
|
@ -848,7 +848,7 @@ void swapchain_update_render_to_fbo(struct wined3d_swapchain *swapchain)
|
|||
}
|
||||
|
||||
/* Do not call while under the GL lock. */
|
||||
static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, WINED3DSURFTYPE surface_type,
|
||||
static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, enum wined3d_surface_type surface_type,
|
||||
struct wined3d_device *device, struct wined3d_swapchain_desc *desc,
|
||||
void *parent, const struct wined3d_parent_ops *parent_ops)
|
||||
{
|
||||
|
@ -876,11 +876,11 @@ static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, WINED3DSURFTY
|
|||
|
||||
switch (surface_type)
|
||||
{
|
||||
case SURFACE_GDI:
|
||||
case WINED3D_SURFACE_TYPE_GDI:
|
||||
swapchain->swapchain_ops = &swapchain_gdi_ops;
|
||||
break;
|
||||
|
||||
case SURFACE_OPENGL:
|
||||
case WINED3D_SURFACE_TYPE_OPENGL:
|
||||
swapchain->swapchain_ops = &swapchain_gl_ops;
|
||||
break;
|
||||
|
||||
|
@ -944,10 +944,8 @@ static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, WINED3DSURFTY
|
|||
}
|
||||
|
||||
surface_set_container(swapchain->front_buffer, WINED3D_CONTAINER_SWAPCHAIN, swapchain);
|
||||
if (surface_type == SURFACE_OPENGL)
|
||||
{
|
||||
if (surface_type == WINED3D_SURFACE_TYPE_OPENGL)
|
||||
surface_modify_location(swapchain->front_buffer, SFLAG_INDRAWABLE, TRUE);
|
||||
}
|
||||
|
||||
/* MSDN says we're only allowed a single fullscreen swapchain per device,
|
||||
* so we should really check to see if there is a fullscreen swapchain
|
||||
|
@ -972,7 +970,7 @@ static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, WINED3DSURFTY
|
|||
displaymode_set = TRUE;
|
||||
}
|
||||
|
||||
if (surface_type == SURFACE_OPENGL)
|
||||
if (surface_type == WINED3D_SURFACE_TYPE_OPENGL)
|
||||
{
|
||||
static const enum wined3d_format_id formats[] =
|
||||
{
|
||||
|
@ -1060,7 +1058,7 @@ static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, WINED3DSURFTY
|
|||
}
|
||||
|
||||
/* Swapchains share the depth/stencil buffer, so only create a single depthstencil surface. */
|
||||
if (desc->enable_auto_depth_stencil && surface_type == SURFACE_OPENGL)
|
||||
if (desc->enable_auto_depth_stencil && surface_type == WINED3D_SURFACE_TYPE_OPENGL)
|
||||
{
|
||||
TRACE("Creating depth/stencil buffer.\n");
|
||||
if (!device->auto_depth_stencil)
|
||||
|
@ -1136,7 +1134,7 @@ err:
|
|||
|
||||
/* Do not call while under the GL lock. */
|
||||
HRESULT CDECL wined3d_swapchain_create(struct wined3d_device *device,
|
||||
struct wined3d_swapchain_desc *desc, WINED3DSURFTYPE surface_type,
|
||||
struct wined3d_swapchain_desc *desc, enum wined3d_surface_type surface_type,
|
||||
void *parent, const struct wined3d_parent_ops *parent_ops,
|
||||
struct wined3d_swapchain **swapchain)
|
||||
{
|
||||
|
|
|
@ -2034,7 +2034,7 @@ struct wined3d_surface
|
|||
|
||||
DWORD flags;
|
||||
|
||||
WINED3DSURFTYPE surface_type;
|
||||
enum wined3d_surface_type surface_type;
|
||||
UINT pow2Width;
|
||||
UINT pow2Height;
|
||||
|
||||
|
|
|
@ -748,11 +748,11 @@ enum wined3d_decl_usage
|
|||
WINED3D_DECL_USAGE_SAMPLE = 13
|
||||
};
|
||||
|
||||
typedef enum _WINED3DSURFTYPE
|
||||
enum wined3d_surface_type
|
||||
{
|
||||
SURFACE_OPENGL, /* OpenGL surface: Renders using libGL, needed for 3D */
|
||||
SURFACE_GDI, /* User surface. No 3D, DirectDraw rendering with GDI */
|
||||
} WINED3DSURFTYPE;
|
||||
WINED3D_SURFACE_TYPE_OPENGL, /* OpenGL surface: Renders using libGL, needed for 3D */
|
||||
WINED3D_SURFACE_TYPE_GDI, /* User surface. No 3D, DirectDraw rendering with GDI */
|
||||
};
|
||||
|
||||
enum wined3d_sysval_semantic
|
||||
{
|
||||
|
@ -2005,7 +2005,7 @@ HRESULT __cdecl wined3d_check_depth_stencil_match(const struct wined3d *wined3d,
|
|||
HRESULT __cdecl wined3d_check_device_format(const struct wined3d *wined3d, UINT adaper_idx,
|
||||
enum wined3d_device_type device_type, enum wined3d_format_id adapter_format_id, DWORD usage,
|
||||
enum wined3d_resource_type resource_type, enum wined3d_format_id check_format_id,
|
||||
WINED3DSURFTYPE surface_type);
|
||||
enum wined3d_surface_type surface_type);
|
||||
HRESULT __cdecl wined3d_check_device_format_conversion(const struct wined3d *wined3d, UINT adapter_idx,
|
||||
enum wined3d_device_type device_type, enum wined3d_format_id source_format_id,
|
||||
enum wined3d_format_id target_format_id);
|
||||
|
@ -2300,8 +2300,9 @@ HRESULT __cdecl wined3d_surface_blt(struct wined3d_surface *dst_surface, const R
|
|||
const WINEDDBLTFX *blt_fx, enum wined3d_texture_filter_type filter);
|
||||
HRESULT __cdecl wined3d_surface_create(struct wined3d_device *device, UINT width, UINT height,
|
||||
enum wined3d_format_id format_id, UINT level, DWORD usage, enum wined3d_pool pool,
|
||||
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);
|
||||
enum wined3d_multisample_type multisample_type, DWORD multisample_quality,
|
||||
enum wined3d_surface_type 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);
|
||||
HRESULT __cdecl wined3d_surface_get_blt_status(const struct wined3d_surface *surface, DWORD flags);
|
||||
|
@ -2338,7 +2339,7 @@ HRESULT __cdecl wined3d_surface_update_overlay_z_order(struct wined3d_surface *s
|
|||
DWORD flags, struct wined3d_surface *ref);
|
||||
|
||||
HRESULT __cdecl wined3d_swapchain_create(struct wined3d_device *device,
|
||||
struct wined3d_swapchain_desc *desc, WINED3DSURFTYPE surface_type, void *parent,
|
||||
struct wined3d_swapchain_desc *desc, enum wined3d_surface_type surface_type, void *parent,
|
||||
const struct wined3d_parent_ops *parent_ops, struct wined3d_swapchain **swapchain);
|
||||
ULONG __cdecl wined3d_swapchain_decref(struct wined3d_swapchain *swapchain);
|
||||
HRESULT __cdecl wined3d_swapchain_get_back_buffer(const struct wined3d_swapchain *swapchain,
|
||||
|
|
Loading…
Reference in a new issue