Skip to content

vrend/shader: Set all FS output locations if possible

Gert Wollny requested to merge gerddie/virglrenderer:fix-fs-output-layout into master

Sometimes we receive FS shaders where some output was optimized away. In this case we have to set the output locations explicitly, but it is no problem if we always do this. On GL this can always be done by using glBindFragDataLocationIndexed, it is supported since at least GL 3.3, and the alternative, setting the layouts in the shader, requires the same OpenGL. On GLES we have to emit explict locations if EXT_blend_func_extended is not supported. This fixes rendering of "The Long Dark".

Related: #223 (closed)

@jbates

Edited by Gert Wollny

Merge request reports