Module: wine Branch: master Commit: 0e4620dcd4339aa0fd2fb44871e10eb75d485d06 URL: https://source.winehq.org/git/wine.git/?a=commit;h=0e4620dcd4339aa0fd2fb4487...
Author: Zebediah Figura zfigura@codeweavers.com Date: Tue Feb 1 22:37:40 2022 -0600
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
---
dlls/quartz/vmr9.c | 20 -------------------- 1 file changed, 20 deletions(-)
diff --git a/dlls/quartz/vmr9.c b/dlls/quartz/vmr9.c index 4bde811c6d7..f992f1136c7 100644 --- a/dlls/quartz/vmr9.c +++ b/dlls/quartz/vmr9.c @@ -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;