d3d9: Disallow creating managed cube textures on d3d9ex devices.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
e6ec3cbd62
commit
4d6dfd5d19
|
@ -4289,8 +4289,8 @@ static void test_resource_access(void)
|
|||
case SURFACE_CUBE:
|
||||
hr = IDirect3DDevice9Ex_CreateCubeTexture(device, 16, 1,
|
||||
tests[j].usage, format, tests[j].pool, &texture_cube, 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_cube)
|
||||
? D3D_OK : D3DERR_INVALIDCALL),
|
||||
"Test %s %u: Got unexpected hr %#x.\n", surface_types[i].name, j, hr);
|
||||
|
|
|
@ -1383,6 +1383,12 @@ HRESULT cubetexture_init(struct d3d9_texture *texture, struct d3d9_device *devic
|
|||
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_cube_vtbl;
|
||||
d3d9_resource_init(&texture->resource);
|
||||
list_init(&texture->rtv_list);
|
||||
|
|
Loading…
Reference in New Issue