[PATCH 1/5] quartz/vmr9: Get rid of a broken check for hardware acceleration support in VMR9DefaultAllocatorPresenterImpl_create().

Zebediah Figura zfigura at codeweavers.com
Tue Feb 1 22:37:40 CST 2022


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 at codeweavers.com>
---
 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;
 
-- 
2.34.1




More information about the wine-devel mailing list