dxva2: Return some static render target formats.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
e6a42874a2
commit
97136a8707
|
@ -195,7 +195,23 @@ static HRESULT WINAPI device_manager_processor_service_GetVideoProcessorRenderTa
|
|||
IDirectXVideoProcessorService *iface, REFGUID deviceguid, const DXVA2_VideoDesc *video_desc, UINT *count,
|
||||
D3DFORMAT **formats)
|
||||
{
|
||||
FIXME("%p, %s, %p, %p, %p.\n", iface, debugstr_guid(deviceguid), video_desc, count, formats);
|
||||
TRACE("%p, %s, %p, %p, %p.\n", iface, debugstr_guid(deviceguid), video_desc, count, formats);
|
||||
|
||||
if (IsEqualGUID(deviceguid, &DXVA2_VideoProcSoftwareDevice))
|
||||
{
|
||||
/* FIXME: filter some input formats */
|
||||
|
||||
if (!(*formats = CoTaskMemAlloc(2 * sizeof(**formats))))
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
*count = 2;
|
||||
(*formats)[0] = D3DFMT_X8R8G8B8;
|
||||
(*formats)[1] = D3DFMT_A8R8G8B8;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
else
|
||||
FIXME("Unsupported device %s.\n", debugstr_guid(deviceguid));
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
TESTDLL = dxva2.dll
|
||||
IMPORTS = dxva2 user32 d3d9
|
||||
IMPORTS = dxva2 user32 d3d9 ole32
|
||||
|
||||
C_SRCS = \
|
||||
dxva2.c
|
||||
|
|
|
@ -82,13 +82,16 @@ static void test_device_manager(void)
|
|||
IDirectXVideoProcessorService *processor_service;
|
||||
IDirectXVideoAccelerationService *accel_service;
|
||||
IDirect3DDevice9 *device, *device2, *device3;
|
||||
IDirectXVideoProcessorService *proc_service;
|
||||
IDirect3DDeviceManager9 *manager;
|
||||
IDirect3DSurface9 *surfaces[2];
|
||||
DXVA2_VideoDesc video_desc;
|
||||
int refcount, refcount2;
|
||||
HANDLE handle, handle1;
|
||||
D3DFORMAT *formats;
|
||||
UINT token, count;
|
||||
IDirect3D9 *d3d;
|
||||
HWND window;
|
||||
UINT token;
|
||||
HRESULT hr;
|
||||
RECT rect;
|
||||
|
||||
|
@ -297,6 +300,24 @@ static void test_device_manager(void)
|
|||
|
||||
IDirectXVideoAccelerationService_Release(accel_service);
|
||||
|
||||
/* RT formats. */
|
||||
hr = DXVA2CreateVideoService(device, &IID_IDirectXVideoProcessorService, (void **)&proc_service);
|
||||
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
|
||||
|
||||
memset(&video_desc, 0, sizeof(video_desc));
|
||||
video_desc.SampleWidth = 64;
|
||||
video_desc.SampleHeight = 64;
|
||||
video_desc.Format = D3DFMT_A8R8G8B8;
|
||||
|
||||
count = 0;
|
||||
hr = IDirectXVideoProcessorService_GetVideoProcessorRenderTargets(proc_service, &DXVA2_VideoProcSoftwareDevice,
|
||||
&video_desc, &count, &formats);
|
||||
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
|
||||
ok(count, "Unexpected format count %u.\n", count);
|
||||
CoTaskMemFree(formats);
|
||||
|
||||
IDirectXVideoProcessorService_Release(proc_service);
|
||||
|
||||
hr = IDirect3DDeviceManager9_OpenDeviceHandle(manager, &handle);
|
||||
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
|
||||
|
||||
|
|
Loading…
Reference in New Issue