mesa/glsl: add bitmask to track stages a program was linked against
authorTimothy Arceri <timothy.arceri@collabora.com>
Mon, 31 Oct 2016 10:16:50 +0000 (21:16 +1100)
committerTimothy Arceri <timothy.arceri@collabora.com>
Wed, 30 Nov 2016 03:13:52 +0000 (14:13 +1100)
commit34953f8907fddd0d2b27d276580a1d3223047987
tree9a16abd121bb24f86c1a02086346508e11ae0fee
parentddf0f097e74d57858238fcdb13003ab5c974abc3
mesa/glsl: add bitmask to track stages a program was linked against

This will be used to enable us to store the current gl_program
rather than gl_shader_program in the gl_pipline_object allowing
us to simplify handing of validation.

Also we should not be depending on _LinkedShader for this information
as it may contain shaders from a failed linking attempt rather than
the current program still in use.

We could also use this mask to iterate over the stages during linking
with _mesa_bit_scan() rather then the current method of NULL checking
each stage.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/compiler/glsl/linker.cpp
src/mesa/main/mtypes.h