Commit 264732a8 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

mfplat: Implement GetContiguousLength() for d3d11 buffer.

parent dae643d2
......@@ -888,13 +888,6 @@ static HRESULT WINAPI dxgi_surface_buffer_GetScanline0AndPitch(IMF2DBuffer2 *ifa
return E_NOTIMPL;
}
static HRESULT WINAPI dxgi_surface_buffer_GetContiguousLength(IMF2DBuffer2 *iface, DWORD *length)
{
FIXME("%p, %p.\n", iface, length);
return E_NOTIMPL;
}
static HRESULT WINAPI dxgi_surface_buffer_Lock2DSize(IMF2DBuffer2 *iface, MF2DBuffer_LockFlags flags,
BYTE **scanline0, LONG *pitch, BYTE **buffer_start, DWORD *buffer_length)
{
......@@ -1001,7 +994,7 @@ static const IMF2DBuffer2Vtbl dxgi_surface_buffer_vtbl =
dxgi_surface_buffer_Unlock2D,
dxgi_surface_buffer_GetScanline0AndPitch,
memory_2d_buffer_IsContiguousFormat,
dxgi_surface_buffer_GetContiguousLength,
memory_2d_buffer_GetContiguousLength,
memory_2d_buffer_ContiguousCopyTo,
memory_2d_buffer_ContiguousCopyFrom,
dxgi_surface_buffer_Lock2DSize,
......
......@@ -6312,10 +6312,11 @@ static ID3D11Device *create_d3d11_device(void)
static void test_dxgi_surface_buffer(void)
{
DWORD max_length, cur_length, color;
DWORD max_length, cur_length, length, color;
IMFDXGIBuffer *dxgi_buffer;
D3D11_TEXTURE2D_DESC desc;
ID3D11Texture2D *texture;
IMF2DBuffer *_2d_buffer;
IMFMediaBuffer *buffer;
ID3D11Device *device;
UINT index, size;
......@@ -6366,6 +6367,16 @@ static void test_dxgi_surface_buffer(void)
ok(hr == S_OK, "Failed to get length, hr %#x.\n", hr);
ok(cur_length == 2 * max_length, "Unexpected length %u.\n", cur_length);
hr = IMFMediaBuffer_QueryInterface(buffer, &IID_IMF2DBuffer, (void **)&_2d_buffer);
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
hr = IMF2DBuffer_GetContiguousLength(_2d_buffer, NULL);
ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
hr = IMF2DBuffer_GetContiguousLength(_2d_buffer, &length);
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
ok(length == max_length, "Unexpected length %u.\n", length);
IMF2DBuffer_Release(_2d_buffer);
hr = IMFMediaBuffer_QueryInterface(buffer, &IID_IMFDXGIBuffer, (void **)&dxgi_buffer);
ok(hr == S_OK, "Failed to get interface, hr %#x.\n", hr);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment