Skip to content

glsl: Make lower_blend_equation_advanced bail on non-FS.

Kenneth Graunke requested to merge kwg/mesa:lower-blend-fix into main

st/mesa only calls this pass for fragment shaders, but i965 calls this it unconditionally. It shouldn't do anything for non-fragment shaders, and should check (or at least assert) before reading info->fs union fields.

Fixes about 20,630 test failures on i965 since 91dc8639, which moved the advanced_blend_modes field. The prior field had been in a union with no other fields, so it never aliased anything, and this worked, even if it was wrong. Now it's in a union with other fields, and so it started interpreting those wrongly and trying to lower blending on i965.

Fixes: 91dc8639 ("mesa: Move the advanced blend bitmask to shader_info.")

Merge request reports