prog_to_nir: Don't allocate nir_variable with type vec4[0] for uniforms.
authorKenneth Graunke <kenneth@whitecape.org>
Mon, 24 Aug 2015 23:39:24 +0000 (16:39 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Tue, 25 Aug 2015 17:18:27 +0000 (10:18 -0700)
commita23f82053d18c2f7d78e28551368437ded4c1a03
treeb0c1c513eddfe28938a01ac5a6e3fea71f7b5c18
parent640c472fd075814972b1276c5b0ed3a769aacda5
prog_to_nir: Don't allocate nir_variable with type vec4[0] for uniforms.

If there are no parameters, we don't need to create a nir_variable to
hold them...and allocating an array of length 0 is pretty bogus.

Should avoid i965 backend assertions in future patches Jason and I are
working on.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
src/mesa/program/prog_to_nir.c