mesa/st: Fallback to name lookup when the variable have no Parameter
authorCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Wed, 11 Sep 2019 23:55:57 +0000 (16:55 -0700)
committerEric Anholt <eric@anholt.net>
Thu, 12 Sep 2019 17:53:54 +0000 (17:53 +0000)
commitf479878ce6e6e7bc4d69e5a043d3b212716fa38f
tree5bbae5c33e3200b9845b986ee9ba0b6816432f19
parentad9c1838e0e096ab8aafadd65fa93e55259ec587
mesa/st: Fallback to name lookup when the variable have no Parameter

This brings back the fallback previously present in
st_nir_lookup_parameter_index(): if there's no parameter associated
with the variable, use a parameter from a variable with the same
prefix.

We'll have to sort out something for SPIR-V, but in the meantime let's
fix GLSL.

Fixes: b6384e57f5f ("mesa/st: Lookup parameters without using names")
Reviewed-by: Eric Anholt <eric@anholt.net>
Tested-by: Eric Anholt <eric@anholt.net>
src/mesa/state_tracker/st_glsl_to_nir.cpp