[PATCH 6/7] wined3d: Check volume formats and sizes in device_update_volume
Stefan Dösinger
stefan at codeweavers.com
Sun Aug 25 19:01:31 CDT 2013
This is not what Windows does, but it is good enough until we find an
actual application that needs this.
---
dlls/wined3d/device.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 97d78f9..f2d43bd 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -4099,6 +4099,19 @@ static HRESULT device_update_volume(struct wined3d_device *device,
TRACE("device %p, src_volume %p, dst_volume %p.\n",
device, src_volume, dst_volume);
+ if (src_volume->resource.format != dst_volume->resource.format)
+ {
+ FIXME("Source and destination formats do not match.\n");
+ return WINED3DERR_INVALIDCALL;
+ }
+ if (src_volume->resource.width != dst_volume->resource.width
+ || src_volume->resource.height != dst_volume->resource.height
+ || src_volume->resource.depth != dst_volume->resource.depth)
+ {
+ FIXME("Source and destination sizes do not match.\n");
+ return WINED3DERR_INVALIDCALL;
+ }
+
if (FAILED(hr = wined3d_volume_map(src_volume, &src, NULL, WINED3D_MAP_READONLY)))
return hr;
--
1.8.1.5
More information about the wine-patches
mailing list