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.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100316

Piglit tests: https://patchwork.freedesktop.org/series/48564/ and https://patchwork.freedesktop.org/series/49136/

CI result: https://mesa-ci.01.org/global_logic/builds/51/group/63a9f0ea7bb98050796b649e85481845

Moved patch from mailing lists where was getting dusty.

Edited by Danylo Piliaiev

Merge request reports