2017-05-24 11:46 GMT+02:00 Paul Gofman gofmanp@gmail.com:
Signed-off-by: Paul Gofman gofmanp@gmail.com
dlls/d3dx9_36/preshader.c | 43 +++++++++++++++++++++++++++---------------- 1 file changed, 27 insertions(+), 16 deletions(-)
diff --git a/dlls/d3dx9_36/preshader.c b/dlls/d3dx9_36/preshader.c index 29a2346..262b7c1 100644 --- a/dlls/d3dx9_36/preshader.c +++ b/dlls/d3dx9_36/preshader.c @@ -979,6 +979,31 @@ void d3dx_free_param_eval(struct d3dx_param_eval *peval) HeapFree(GetProcessHeap(), 0, peval); }
+static void get_constant_dimensions(struct d3dx_const_param_eval_output *const_set, BOOL *transpose,
unsigned int *major, unsigned int *minor, unsigned int *major_stride, unsigned int *n,
unsigned int *count)
It seems better to pass around a struct pointer in place of all those separate out arguments, e.g. struct const_upload_info. Then you can name the helper get_"structname"() too.
- *n = min(*major * *major_stride,
get_offset_reg(table, const_set->register_count) + *major_stride - 1) / *major_stride;
- *count = *n * *minor;
Preexisting, but "n" is a bit confusing, especially considering that there is a "count" too. Something like "available_major" / "reg_count"? count might be "component_count" or similar. Maybe you can find some better names...