=?UTF-8?Q?J=C3=B3zef=20Kucia=20?=: wined3d: Allow wined3d_device_update_sub_resource() only on GPU accessible resources.
Alexandre Julliard
julliard at winehq.org
Fri Sep 7 16:49:26 CDT 2018
Module: wine
Branch: master
Commit: 490c6d548abab55ea0a3913d55eecd26f01d1949
URL: https://source.winehq.org/git/wine.git/?a=commit;h=490c6d548abab55ea0a3913d55eecd26f01d1949
Author: Józef Kucia <jkucia at codeweavers.com>
Date: Thu Sep 6 22:01:57 2018 +0200
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: Józef Kucia <jkucia at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/wined3d/device.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 96b8d3c..f6a0b39 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -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)
More information about the wine-cvs
mailing list