mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 04:39:45 +00:00
wined3d: Remove wined3d_backbuffer_type.
This commit is contained in:
parent
9d29be2800
commit
2936e4ac54
@ -732,6 +732,8 @@ static HRESULT WINAPI d3d8_device_GetBackBuffer(IDirect3DDevice8 *iface,
|
||||
TRACE("iface %p, backbuffer_idx %u, backbuffer_type %#x, backbuffer %p.\n",
|
||||
iface, backbuffer_idx, backbuffer_type, backbuffer);
|
||||
|
||||
/* backbuffer_type is ignored by native. */
|
||||
|
||||
/* No need to check for backbuffer == NULL, Windows crashes in that case. */
|
||||
wined3d_mutex_lock();
|
||||
if (!(swapchain = wined3d_device_get_swapchain(device->wined3d_device, 0)))
|
||||
@ -741,8 +743,7 @@ static HRESULT WINAPI d3d8_device_GetBackBuffer(IDirect3DDevice8 *iface,
|
||||
return D3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
if (!(wined3d_texture = wined3d_swapchain_get_back_buffer(swapchain,
|
||||
backbuffer_idx, (enum wined3d_backbuffer_type)backbuffer_type)))
|
||||
if (!(wined3d_texture = wined3d_swapchain_get_back_buffer(swapchain, backbuffer_idx)))
|
||||
{
|
||||
wined3d_mutex_unlock();
|
||||
*backbuffer = NULL;
|
||||
|
@ -120,6 +120,8 @@ static HRESULT WINAPI d3d8_swapchain_GetBackBuffer(IDirect3DSwapChain8 *iface,
|
||||
TRACE("iface %p, backbuffer_idx %u, backbuffer_type %#x, backbuffer %p.\n",
|
||||
iface, backbuffer_idx, backbuffer_type, backbuffer);
|
||||
|
||||
/* backbuffer_type is ignored by native. */
|
||||
|
||||
if (!backbuffer)
|
||||
{
|
||||
WARN("The output pointer is NULL, returning D3DERR_INVALIDCALL.\n");
|
||||
@ -127,8 +129,7 @@ static HRESULT WINAPI d3d8_swapchain_GetBackBuffer(IDirect3DSwapChain8 *iface,
|
||||
}
|
||||
|
||||
wined3d_mutex_lock();
|
||||
if ((wined3d_texture = wined3d_swapchain_get_back_buffer(swapchain->wined3d_swapchain,
|
||||
backbuffer_idx, (enum wined3d_backbuffer_type)backbuffer_type)))
|
||||
if ((wined3d_texture = wined3d_swapchain_get_back_buffer(swapchain->wined3d_swapchain, backbuffer_idx)))
|
||||
{
|
||||
wined3d_resource = wined3d_texture_get_sub_resource(wined3d_texture, 0);
|
||||
surface_impl = wined3d_resource_get_parent(wined3d_resource);
|
||||
|
@ -754,6 +754,8 @@ static HRESULT WINAPI d3d9_device_GetBackBuffer(IDirect3DDevice9Ex *iface, UINT
|
||||
TRACE("iface %p, swapchain %u, backbuffer_idx %u, backbuffer_type %#x, backbuffer %p.\n",
|
||||
iface, swapchain, backbuffer_idx, backbuffer_type, backbuffer);
|
||||
|
||||
/* backbuffer_type is ignored by native. */
|
||||
|
||||
/* No need to check for backbuffer == NULL, Windows crashes in that case. */
|
||||
wined3d_mutex_lock();
|
||||
|
||||
@ -764,8 +766,7 @@ static HRESULT WINAPI d3d9_device_GetBackBuffer(IDirect3DDevice9Ex *iface, UINT
|
||||
return D3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
if (!(wined3d_texture = wined3d_swapchain_get_back_buffer(wined3d_swapchain,
|
||||
backbuffer_idx, (enum wined3d_backbuffer_type)backbuffer_type)))
|
||||
if (!(wined3d_texture = wined3d_swapchain_get_back_buffer(wined3d_swapchain, backbuffer_idx)))
|
||||
{
|
||||
wined3d_mutex_unlock();
|
||||
*backbuffer = NULL;
|
||||
|
@ -160,6 +160,8 @@ static HRESULT WINAPI d3d9_swapchain_GetBackBuffer(IDirect3DSwapChain9Ex *iface,
|
||||
TRACE("iface %p, backbuffer_idx %u, backbuffer_type %#x, backbuffer %p.\n",
|
||||
iface, backbuffer_idx, backbuffer_type, backbuffer);
|
||||
|
||||
/* backbuffer_type is ignored by native. */
|
||||
|
||||
if (!backbuffer)
|
||||
{
|
||||
WARN("The output pointer is NULL, returning D3DERR_INVALIDCALL.\n");
|
||||
@ -167,8 +169,7 @@ static HRESULT WINAPI d3d9_swapchain_GetBackBuffer(IDirect3DSwapChain9Ex *iface,
|
||||
}
|
||||
|
||||
wined3d_mutex_lock();
|
||||
if ((wined3d_texture = wined3d_swapchain_get_back_buffer(swapchain->wined3d_swapchain,
|
||||
backbuffer_idx, (enum wined3d_backbuffer_type)backbuffer_type)))
|
||||
if ((wined3d_texture = wined3d_swapchain_get_back_buffer(swapchain->wined3d_swapchain, backbuffer_idx)))
|
||||
{
|
||||
wined3d_resource = wined3d_texture_get_sub_resource(wined3d_texture, 0);
|
||||
surface_impl = wined3d_resource_get_parent(wined3d_resource);
|
||||
|
@ -152,8 +152,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_swapchain_GetBuffer(IDXGISwapChain *iface,
|
||||
|
||||
EnterCriticalSection(&dxgi_cs);
|
||||
|
||||
if (!(texture = wined3d_swapchain_get_back_buffer(This->wined3d_swapchain,
|
||||
buffer_idx, WINED3D_BACKBUFFER_TYPE_MONO)))
|
||||
if (!(texture = wined3d_swapchain_get_back_buffer(This->wined3d_swapchain, buffer_idx)))
|
||||
{
|
||||
LeaveCriticalSection(&dxgi_cs);
|
||||
return DXGI_ERROR_INVALID_CALL;
|
||||
@ -235,8 +234,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_swapchain_ResizeBuffers(IDXGISwapChain *if
|
||||
wined3d_swapchain_get_desc(swapchain->wined3d_swapchain, &wined3d_desc);
|
||||
for (i = 0; i < wined3d_desc.backbuffer_count; ++i)
|
||||
{
|
||||
texture = wined3d_swapchain_get_back_buffer(swapchain->wined3d_swapchain,
|
||||
i, WINED3D_BACKBUFFER_TYPE_MONO);
|
||||
texture = wined3d_swapchain_get_back_buffer(swapchain->wined3d_swapchain, i);
|
||||
parent = wined3d_texture_get_parent(texture);
|
||||
IUnknown_AddRef(parent);
|
||||
if (IUnknown_Release(parent))
|
||||
|
@ -178,10 +178,10 @@ HRESULT CDECL wined3d_swapchain_get_front_buffer_data(const struct wined3d_swapc
|
||||
}
|
||||
|
||||
struct wined3d_texture * CDECL wined3d_swapchain_get_back_buffer(const struct wined3d_swapchain *swapchain,
|
||||
UINT back_buffer_idx, enum wined3d_backbuffer_type type)
|
||||
UINT back_buffer_idx)
|
||||
{
|
||||
TRACE("swapchain %p, back_buffer_idx %u, type %#x.\n",
|
||||
swapchain, back_buffer_idx, type);
|
||||
TRACE("swapchain %p, back_buffer_idx %u.\n",
|
||||
swapchain, back_buffer_idx);
|
||||
|
||||
/* Return invalid if there is no backbuffer array, otherwise it will
|
||||
* crash when ddraw is used (there swapchain->back_buffers is always
|
||||
|
@ -503,13 +503,6 @@ enum wined3d_patch_edge_style
|
||||
WINED3D_PATCH_EDGE_CONTINUOUS = 1,
|
||||
};
|
||||
|
||||
enum wined3d_backbuffer_type
|
||||
{
|
||||
WINED3D_BACKBUFFER_TYPE_MONO = 0,
|
||||
WINED3D_BACKBUFFER_TYPE_LEFT = 1,
|
||||
WINED3D_BACKBUFFER_TYPE_RIGHT = 2,
|
||||
};
|
||||
|
||||
enum wined3d_swap_effect
|
||||
{
|
||||
WINED3D_SWAP_EFFECT_DISCARD = 1,
|
||||
@ -2512,7 +2505,7 @@ HRESULT __cdecl wined3d_swapchain_create(struct wined3d_device *device, struct w
|
||||
void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_swapchain **swapchain);
|
||||
ULONG __cdecl wined3d_swapchain_decref(struct wined3d_swapchain *swapchain);
|
||||
struct wined3d_texture * __cdecl wined3d_swapchain_get_back_buffer(const struct wined3d_swapchain *swapchain,
|
||||
UINT backbuffer_idx, enum wined3d_backbuffer_type backbuffer_type);
|
||||
UINT backbuffer_idx);
|
||||
struct wined3d_device * __cdecl wined3d_swapchain_get_device(const struct wined3d_swapchain *swapchain);
|
||||
HRESULT __cdecl wined3d_swapchain_get_display_mode(const struct wined3d_swapchain *swapchain,
|
||||
struct wined3d_display_mode *mode, enum wined3d_display_rotation *rotation);
|
||||
|
Loading…
Reference in New Issue
Block a user