Zebediah Figura : quartz/vmr9: Support VMR9AllocFlag_3DRenderTarget in IVMRSurfaceAllocatorNotify9::AllocateSurfaceHelper().
Module: wine Branch: master Commit: 3a3981272f33b83fac768c0a4d2ab11a8420e341 URL: https://source.winehq.org/git/wine.git/?a=commit;h=3a3981272f33b83fac768c0a4... Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Wed Apr 29 20:15:14 2020 -0500 quartz/vmr9: Support VMR9AllocFlag_3DRenderTarget in IVMRSurfaceAllocatorNotify9::AllocateSurfaceHelper(). Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/quartz/vmr9.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/dlls/quartz/vmr9.c b/dlls/quartz/vmr9.c index 652705e843..888f9e1751 100644 --- a/dlls/quartz/vmr9.c +++ b/dlls/quartz/vmr9.c @@ -2124,7 +2124,7 @@ static HRESULT WINAPI VMR9SurfaceAllocatorNotify_AllocateSurfaceHelper(IVMRSurfa return VFW_E_WRONG_STATE; } - if (allocinfo->dwFlags & VMR9AllocFlag_OffscreenSurface) + if (allocinfo->dwFlags == VMR9AllocFlag_OffscreenSurface) { ERR("Creating offscreen surface\n"); for (i = 0; i < *numbuffers; ++i) @@ -2135,7 +2135,7 @@ static HRESULT WINAPI VMR9SurfaceAllocatorNotify_AllocateSurfaceHelper(IVMRSurfa break; } } - else if (allocinfo->dwFlags & VMR9AllocFlag_TextureSurface) + else if (allocinfo->dwFlags == VMR9AllocFlag_TextureSurface) { TRACE("Creating texture surface\n"); for (i = 0; i < *numbuffers; ++i) @@ -2150,10 +2150,20 @@ static HRESULT WINAPI VMR9SurfaceAllocatorNotify_AllocateSurfaceHelper(IVMRSurfa IDirect3DTexture9_Release(texture); } } + else if (allocinfo->dwFlags == VMR9AllocFlag_3DRenderTarget) + { + for (i = 0; i < *numbuffers; ++i) + { + if (FAILED(hr = IDirect3DDevice9_CreateRenderTarget(This->allocator_d3d9_dev, + allocinfo->dwWidth, allocinfo->dwHeight, allocinfo->Format, + D3DMULTISAMPLE_NONE, 0, FALSE, &surface[i], NULL))) + break; + } + } else { - FIXME("Could not allocate for type %08x\n", allocinfo->dwFlags); - return E_NOTIMPL; + FIXME("Unhandled flags %#x.\n", allocinfo->dwFlags); + return E_NOTIMPL; } if (i >= allocinfo->MinBuffers)
participants (1)
-
Alexandre Julliard