quartz/vmr9: Get rid of a broken check for hardware acceleration support in VMR9DefaultAllocatorPresenterImpl_create().

It doesn't check for hardware acceleration for the adapter that we're actually
going to use, and we don't actually care what the swapchain format is anyway. If
the device doesn't support hardware acceleration we'll fail later when trying to
actually create it.

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2022-02-01 22:37:40 -06:00 committed by Alexandre Julliard
parent ebdd0c1c70
commit 0e4620dcd4
1 changed files with 0 additions and 20 deletions

View File

@ -2987,8 +2987,6 @@ static IDirect3D9 *init_d3d9(HMODULE d3d9_handle)
static HRESULT VMR9DefaultAllocatorPresenterImpl_create(struct quartz_vmr *parent, LPVOID * ppv)
{
struct default_presenter *object;
HRESULT hr = S_OK;
int i;
if (!(object = calloc(1, sizeof(*object))))
return E_OUTOFMEMORY;
@ -3001,24 +2999,6 @@ static HRESULT VMR9DefaultAllocatorPresenterImpl_create(struct quartz_vmr *paren
return VFW_E_DDRAW_CAPS_NOT_SUITABLE;
}
i = 0;
do
{
D3DDISPLAYMODE mode;
hr = IDirect3D9_EnumAdapterModes(object->d3d9_ptr, i++, D3DFMT_X8R8G8B8, 0, &mode);
if (hr == D3DERR_INVALIDCALL) break; /* out of adapters */
} while (FAILED(hr));
if (FAILED(hr))
ERR("HR: %08x\n", hr);
if (hr == D3DERR_NOTAVAILABLE)
{
ERR("Format not supported\n");
IDirect3D9_Release(object->d3d9_ptr);
free(object);
return VFW_E_DDRAW_CAPS_NOT_SUITABLE;
}
object->IVMRImagePresenter9_iface.lpVtbl = &VMR9_ImagePresenter;
object->IVMRSurfaceAllocator9_iface.lpVtbl = &VMR9_SurfaceAllocator;