Skip to content

glsl: Cross validate variable's invariance by explicit invariance only

Danylo Piliaiev requested to merge GL/mesa:fix/invariant-propagation-v2 into master

invariant qualifier is propagated on variables which are used to calculate other invariant variables, however when we are matching variable's declarations we should take into account only explicitly declared invariance because invariance propagation is an implementation specific detail.

Thus new flag is added to ir_variable_data which indicates invariant qualifier being explicitly set in the shader.

New explicit_invariant flag is a strict subset of invariant flag.

I don't really like the addition of new flag but in the end it looks clean enough.


Piglit tests: and

CI result:

Moved patch from mailing lists where was getting dusty.

Edited by Danylo Piliaiev

Merge request reports