Paul Gofman : d3dx9: Limit constant size by register count instead of table size.
Module: wine Branch: master Commit: ef22e6f0da81fef00a63cd80079804a51029ff99 URL: http://source.winehq.org/git/wine.git/?a=commit;h=ef22e6f0da81fef00a63cd8007... Author: Paul Gofman <gofmanp(a)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(a)gmail.com> Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)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
participants (1)
-
Alexandre Julliard