quartz/vmr9: Support VMR9AllocFlag_3DRenderTarget in IVMRSurfaceAllocatorNotify9::AllocateSurfaceHelper().

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2020-04-29 20:15:14 -05:00 committed by Alexandre Julliard
parent 880c732216
commit 3a3981272f
1 changed files with 14 additions and 4 deletions

View File

@ -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)