You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-09-12 18:50:20 -07:00
Added patch to fix check for texture levels in wined3d_device_update_texture.
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
From 9d415a0b7671c0ab067f344ab7c6cb8520b744ff Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Mon, 27 Apr 2015 01:20:38 +0200
|
||||
Subject: wined3d: Fix check for texture levels in
|
||||
wined3d_device_update_texture.
|
||||
|
||||
Based on analysis by Sergey Isakov.
|
||||
---
|
||||
dlls/wined3d/device.c | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index 4954d00..f435739 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -3561,11 +3561,11 @@ HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device,
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
- /* Check that both textures have the identical numbers of levels. */
|
||||
- level_count = wined3d_texture_get_level_count(src_texture);
|
||||
- if (wined3d_texture_get_level_count(dst_texture) != level_count)
|
||||
+ /* Check that source texture has equal or more levels than the destination texture. */
|
||||
+ level_count = wined3d_texture_get_level_count(dst_texture);
|
||||
+ if (wined3d_texture_get_level_count(src_texture) < level_count)
|
||||
{
|
||||
- WARN("Source and destination have different level counts, returning WINED3DERR_INVALIDCALL.\n");
|
||||
+ WARN("Source has fewer level counts then destination, returning WINED3DERR_INVALIDCALL.\n");
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
--
|
||||
2.3.5
|
||||
|
||||
1
patches/wined3d-Level_Count/definition
Normal file
1
patches/wined3d-Level_Count/definition
Normal file
@@ -0,0 +1 @@
|
||||
Fixes: [38048] Fix check for texture levels in wined3d_device_update_texture
|
||||
Reference in New Issue
Block a user