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

d3d9: Disallow creating managed 2D textures on d3d9ex devices.

parent 4d6dfd5d
......@@ -4273,8 +4273,8 @@ static void test_resource_access(void)
case SURFACE_2D:
hr = IDirect3DDevice9Ex_CreateTexture(device, 16, 16, 1,
tests[j].usage, format, tests[j].pool, &texture_2d, NULL);
todo_wine_if(!tests[j].valid && !tests[j].usage && (tests[j].format == FORMAT_DEPTH
|| tests[j].pool == D3DPOOL_MANAGED))
todo_wine_if(!tests[j].valid && tests[j].format == FORMAT_DEPTH
&& !tests[j].usage && tests[j].pool != D3DPOOL_MANAGED)
ok(hr == (tests[j].valid && (tests[j].format != FORMAT_DEPTH || depth_2d)
? D3D_OK : D3DERR_INVALIDCALL),
"Test %s %u: Got unexpected hr %#x.\n", surface_types[i].name, j, hr);
......
......@@ -1301,6 +1301,12 @@ HRESULT texture_init(struct d3d9_texture *texture, struct d3d9_device *device,
DWORD flags = 0;
HRESULT hr;
if (pool == D3DPOOL_MANAGED && device->d3d_parent->extended)
{
WARN("Managed resources are not supported by d3d9ex devices.\n");
return D3DERR_INVALIDCALL;
}
texture->IDirect3DBaseTexture9_iface.lpVtbl = (const IDirect3DBaseTexture9Vtbl *)&d3d9_texture_2d_vtbl;
d3d9_resource_init(&texture->resource);
list_init(&texture->rtv_list);
......
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