[PATCH 5/6] d3dx9: Don't add const setting entries with zero count.
Paul Gofman
gofmanp at gmail.com
Wed May 24 04:46:55 CDT 2017
Signed-off-by: Paul Gofman <gofmanp at gmail.com>
---
dlls/d3dx9_36/preshader.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/dlls/d3dx9_36/preshader.c b/dlls/d3dx9_36/preshader.c
index 0cd6813..55063b2 100644
--- a/dlls/d3dx9_36/preshader.c
+++ b/dlls/d3dx9_36/preshader.c
@@ -1220,6 +1220,11 @@ static HRESULT init_set_constants_param(struct d3dx_const_tab *const_tab, ID3DXC
const_set.register_count = desc.RegisterCount;
table_type = table_info[const_set.table].type;
get_constant_dimensions(&const_set, &transpose, &major, &minor, &major_stride, &n, &count);
+ if (!count)
+ {
+ TRACE("\"%s\" has zero count, skipping.\n", debugstr_a(param->name));
+ return D3D_OK;
+ }
if (param_type_to_table_type(param->type) == PRES_VT_MAX)
return D3DERR_INVALIDCALL;
--
2.9.3
More information about the wine-patches
mailing list