Skip to content

virgl: Fix missing fog output in certain cases

Isaac Bosompem requested to merge mrisaacb/virglrenderer:virgl_fog_fix into master

For fragment ARB programs, the fog co-ordinate input can be requested independently of any other part of the graphics pipeline. Through the use of an OPTION declaration.

This can lead to a case where a fragment shader expects a fog co-ordinate input, but it is not being supplied by the preceding shader stage.

This patch will fix it by forcing it to 0 when it detects the case, which should neutralize the fog color.

Signed-off By: Isaac Bosompem mrisaacb@google.com

Edited by Isaac Bosompem

Merge request reports