i965: Allocate vec4_visitor's uniform_size and uniform_vector_size arrays dynamically.
authorPetri Latvala <petri.latvala@intel.com>
Thu, 27 Feb 2014 14:15:04 +0000 (16:15 +0200)
committerIan Romanick <ian.d.romanick@intel.com>
Fri, 28 Feb 2014 23:05:38 +0000 (15:05 -0800)
commit7189fce237cc7f4bc76a85cca8bcf75756d9affc
tree610b1f94173f5210eab4f2eadb6b1ae73edbc16a
parent96f324e229d035e6b00e15c96b69a00999d1adcb
i965: Allocate vec4_visitor's uniform_size and uniform_vector_size arrays dynamically.

v2: Don't add function parameters, pass the required size in
prog_data->nr_params.

v3:
- Use the name uniform_array_size instead of uniform_param_count.
- Round up when dividing param_count by 4.
- Use MAX2() instead of taking the maximum by hand.
- Don't crash if prog_data passed to vec4_visitor constructor is NULL

v4: Rebase for current master

v5 (idr): Trivial whitespace change.

Signed-off-by: Petri Latvala <petri.latvala@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71254
Cc: "10.1" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/mesa/drivers/dri/i965/brw_vec4.h
src/mesa/drivers/dri/i965/brw_vec4_gs.c
src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
src/mesa/drivers/dri/i965/brw_vs.c