Paul Gofman : d3dx9: Limit constant size by register count instead of table size.

Alexandre Julliard julliard at winehq.org
Mon Jun 5 16:56:31 CDT 2017


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

Author: Paul Gofman <gofmanp at gmail.com>
Date:   Fri Jun  2 12:58:05 2017 +0300

d3dx9: Limit constant size by register count instead of table size.

Signed-off-by: Paul Gofman <gofmanp at gmail.com>
Signed-off-by: Matteo Bruni <mbruni at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/d3dx9_36/preshader.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/dlls/d3dx9_36/preshader.c b/dlls/d3dx9_36/preshader.c
index aaf3961..cc103f5 100644
--- a/dlls/d3dx9_36/preshader.c
+++ b/dlls/d3dx9_36/preshader.c
@@ -1070,14 +1070,15 @@ static void set_constants(struct d3dx_regstore *rs, struct d3dx_const_tab *const
                     unsigned int *in;
                     unsigned int offset;
 
-                    offset = start_offset + i * info.major_stride + j;
-                    if (get_reg_offset(table, offset) >= rs->table_sizes[table])
+                    offset = i * info.major_stride + j;
+                    if (get_reg_offset(table, offset) >= const_set->register_count)
                     {
                         if (table != PRES_REGTAB_OBCONST)
-                            FIXME("Output offset exceeds table size, name %s, component %u.\n",
+                            FIXME("Output offset exceeds regiser count, name %s, component %u.\n",
                                     debugstr_a(param->name), i);
                         break;
                     }
+                    offset += start_offset;
                     if (info.transpose)
                         param_offset = i + j * info.major;
                     else




More information about the wine-cvs mailing list