Commit e69670f7 authored by Stefan Dösinger's avatar Stefan Dösinger Committed by Alexandre Julliard

wined3d: Disallow MANAGED or SCRATCH pool dynamic volumes.

parent 1bd6710b
...@@ -676,6 +676,14 @@ static HRESULT volume_init(struct wined3d_volume *volume, struct wined3d_device ...@@ -676,6 +676,14 @@ static HRESULT volume_init(struct wined3d_volume *volume, struct wined3d_device
WARN("Volume cannot be created - no volume texture support.\n"); WARN("Volume cannot be created - no volume texture support.\n");
return WINED3DERR_INVALIDCALL; return WINED3DERR_INVALIDCALL;
} }
/* TODO: Write tests for other resources and move this check
* to resource_init, if applicable. */
if (usage & WINED3DUSAGE_DYNAMIC
&& (pool == WINED3D_POOL_MANAGED || pool == WINED3D_POOL_SCRATCH))
{
WARN("Attempted to create a DYNAMIC texture in pool %u.\n", pool);
return WINED3DERR_INVALIDCALL;
}
size = wined3d_format_calculate_size(format, device->surface_alignment, width, height, depth); size = wined3d_format_calculate_size(format, device->surface_alignment, width, height, depth);
......
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