glsl: store uniform slot id in var location field
authorTimothy Arceri <t_arceri@yahoo.com.au>
Sun, 30 Aug 2015 02:50:34 +0000 (12:50 +1000)
committerTimothy Arceri <t_arceri@yahoo.com.au>
Thu, 17 Sep 2015 01:28:14 +0000 (11:28 +1000)
commitdcd9cd03837545055ce2a315e7e8840cc3254d1a
treeeb311b2507fe2eb6428586e6701091eb887f0b66
parent9788700caf61ff8beee5fd836f5efd98a931a976
glsl: store uniform slot id in var location field

This will allow us to access the uniform later on without resorting to
building a name string and looking it up in UniformHash.

V3: remove line wrap change from this patch

V2: store slot number for all non-UBO uniforms to make code more
consitent, renamed explicit_binding to explicit_location and added
comment about what it does. Store the location at every shader stage.
Updated data.location comments in ir/nir.h.

Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
src/glsl/ir.h
src/glsl/link_uniforms.cpp
src/glsl/nir/nir.h