st/glsl_to_nir: simplify st_nir_assign_var_locations() and fix for fs outputs
authorTimothy Arceri <tarceri@itsqueeze.com>
Thu, 1 Mar 2018 02:39:20 +0000 (13:39 +1100)
committerTimothy Arceri <tarceri@itsqueeze.com>
Thu, 1 Mar 2018 22:11:20 +0000 (09:11 +1100)
commit13cdf4e5906f2ac7ec39d0b06abc6b5671c0693d
tree03cf4329bc35a285f42575ede499f10484fe5c9e
parent89f78cf333a06384728627e9755d1a9b2e3370d7
st/glsl_to_nir: simplify st_nir_assign_var_locations() and fix for fs outputs

We only need to check for previously processed location on user
defined varyings as they are the only ones that support component
packing. Therefore a single instance of processed_locs can be
shared by regular varyings and patches.

For simplicity we make processed_locs an array in order to handle
dual source bleanding.

Fixes the follow piglit test on radeonsi:
tests/spec/arb_enhanced_layouts/execution/component-layout/fs-output.shader_test

Reviewed-by: Dave Airlie <airlied@redhat.com>
src/mesa/state_tracker/st_glsl_to_nir.cpp