Commit 490c6d54 authored by Józef Kucia's avatar Józef Kucia Committed by Alexandre Julliard

wined3d: Allow wined3d_device_update_sub_resource() only on GPU accessible resources.

wined3d_device_update_sub_resource() should work only on D3D11_USAGE_DEFAULT resources. Signed-off-by: 's avatarJózef Kucia <jkucia@codeweavers.com> Signed-off-by: 's avatarHenri Verbeet <hverbeet@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent ffe18200
......@@ -4229,6 +4229,12 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
if (flags)
FIXME("Ignoring flags %#x.\n", flags);
if (!(resource->access & WINED3D_RESOURCE_ACCESS_GPU))
{
WARN("Resource %p is not GPU accessible.\n", resource);
return;
}
if (resource->type == WINED3D_RTYPE_BUFFER)
{
if (sub_resource_idx > 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