=?UTF-8?Q?J=C3=B3zef=20Kucia=20?=: wined3d: Make sure that "tgsm_count" is not decreased while adding TGSM declarations.

Alexandre Julliard julliard at winehq.org
Tue Mar 7 15:44:00 CST 2017


Module: wine
Branch: master
Commit: d4443bdc2974d9933daf2a94a99231d14d8269e3
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=d4443bdc2974d9933daf2a94a99231d14d8269e3

Author: Józef Kucia <jkucia at codeweavers.com>
Date:   Tue Mar  7 09:50:23 2017 +0100

wined3d: Make sure that "tgsm_count" is not decreased while adding TGSM declarations.

Suggested by Sebastian Lackner.

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/shader.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c
index f867766..7186fdf 100644
--- a/dlls/wined3d/shader.c
+++ b/dlls/wined3d/shader.c
@@ -884,7 +884,7 @@ static HRESULT shader_reg_maps_add_tgsm(struct wined3d_shader_reg_maps *reg_maps
             register_idx + 1, sizeof(*reg_maps->tgsm)))
         return E_OUTOFMEMORY;
 
-    reg_maps->tgsm_count = register_idx + 1;
+    reg_maps->tgsm_count = max(register_idx + 1, reg_maps->tgsm_count);
     tgsm = &reg_maps->tgsm[register_idx];
     tgsm->size = size;
     tgsm->stride = stride;




More information about the wine-cvs mailing list