nir/intrinsics: Add a second const index to load_uniform
authorJason Ekstrand <jason.ekstrand@intel.com>
Tue, 18 Aug 2015 18:18:55 +0000 (11:18 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Tue, 25 Aug 2015 17:18:27 +0000 (10:18 -0700)
commit0db8e87b4a16b123f7c0b44d54f23b535a136ee6
tree549ef9e86b96aa7e2b66888d25d10f599487e9cd
parent6c33d6bbf9b54784e4498a81c73b712dca5dd737
nir/intrinsics: Add a second const index to load_uniform

In the i965 backend, we want to be able to "pull apart" the uniforms and
push some of them into the shader through a different path.  In order to do
this effectively, we need to know which variable is actually being referred
to by a given uniform load.  Previously, it was completely flattened by
nir_lower_io which made things difficult.  This adds more information to
the intrinsic to make this easier for us.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/glsl/nir/nir_intrinsics.h
src/mesa/drivers/dri/i965/brw_fs_nir.cpp
src/mesa/drivers/dri/i965/brw_vec4_nir.cpp