Skip to content

Commit

Permalink
quartz/vmr9: Get rid of a broken check for hardware acceleration supp…
Browse files Browse the repository at this point in the history
…ort 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>
  • Loading branch information
Zebediah Figura authored and julliard committed Feb 2, 2022
1 parent ebdd0c1 commit 0e4620d
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions dlls/quartz/vmr9.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;

Expand Down

0 comments on commit 0e4620d

Please sign in to comment.