st/glsl_to_nir: Calculate num_uniforms from NumParameterValues
authorKristian H. Kristensen <hoegsberg@chromium.org>
Tue, 26 Mar 2019 16:53:38 +0000 (09:53 -0700)
committerKristian H. Kristensen <hoegsberg@chromium.org>
Wed, 27 Mar 2019 20:26:02 +0000 (13:26 -0700)
commit56b4bc292f1994619d6a9779f15e6b2c5180b1de
tree823673cf096a51304d01279ddd10af855847bfe7
parentdce13e58b0641a429890abf1335a9aedd19b96ea
st/glsl_to_nir: Calculate num_uniforms from NumParameterValues

We don't need to determine the number of uniform slots here, it's
already available as prog->Parameters->NumParameterValues.  The way we
previously determined the number of slots was also broken for
PackedDriverUniformStorage, where we would add loc (in dwords) and
type_size() (in vec4s).

Signed-off-by: Kristian H. Kristensen <hoegsberg@chromium.org>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Rob Clark <robdclark@gmail.com>
src/mesa/state_tracker/st_glsl_to_nir.cpp