Commit a4f047da authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

d3d9/tests: Test the pool and usage of surfaces created through CreateOffscreenPlainSurface().

parent 9629769f
......@@ -1813,9 +1813,6 @@ static HRESULT WINAPI d3d9_device_CreateOffscreenPlainSurface(IDirect3DDevice9Ex
}
}
/* FIXME: Offscreen surfaces are supposed to be always lockable,
* regardless of the pool they're created in. Should we set dynamic usage
* here? */
return d3d9_device_create_surface(device, width, height, format,
WINED3D_TEXTURE_CREATE_MAPPABLE, surface, 0, pool, D3DMULTISAMPLE_NONE, 0, user_mem);
}
......
......@@ -8673,6 +8673,7 @@ static void test_surface_double_unlock(void)
};
IDirect3DSurface9 *surface;
IDirect3DDevice9 *device;
D3DSURFACE_DESC desc;
D3DLOCKED_RECT lr;
IDirect3D9 *d3d;
unsigned int i;
......@@ -8697,6 +8698,11 @@ static void test_surface_double_unlock(void)
D3DFMT_X8R8G8B8, pools[i], &surface, NULL);
ok(SUCCEEDED(hr), "Failed to create surface in pool %#x, hr %#x.\n", pools[i], hr);
hr = IDirect3DSurface9_GetDesc(surface, &desc);
ok(hr == D3D_OK, "Pool %#x: Got unexpected hr %#x.\n", pools[i], hr);
ok(!desc.Usage, "Pool %#x: Got unexpected usage %#x.\n", pools[i], desc.Usage);
ok(desc.Pool == pools[i], "Pool %#x: Got unexpected pool %#x.\n", pools[i], desc.Pool);
hr = IDirect3DSurface9_UnlockRect(surface);
ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x, for surface in pool %#x.\n", hr, pools[i]);
hr = IDirect3DSurface9_LockRect(surface, &lr, NULL, 0);
......
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