glsl/ir: add param index to variable.
authorDave Airlie <airlied@redhat.com>
Mon, 8 Feb 2016 01:09:29 +0000 (11:09 +1000)
committerDave Airlie <airlied@redhat.com>
Tue, 9 Feb 2016 00:52:08 +0000 (10:52 +1000)
commit52801766a00ba3b2a93e14d1ac80afd8980d15d8
tree29f703cd5865f6576f65e0850b0869b10b4f881a
parent53739fddc65a4cb34a2da14b873e95a451916267
glsl/ir: add param index to variable.

We have a requirement to store the index into the mesa parameterlist
for uniforms. Up until now we've overwritten var->data.location with
this info. However this then stops us accessing UniformStorage,
which is needed to do proper dereferencing.

Add a new variable to ir_variable to store this value in, and change
the two uses to use it correctly.

Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/compiler/glsl/ir.h
src/mesa/program/ir_to_mesa.cpp
src/mesa/state_tracker/st_glsl_to_tgsi.cpp