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 fises rendering of "The Long Dark". v2: - Emit EXT_blend_func_extended in FS if extension is available since this is required when not emitting the explicit locations (Robert Wenzel) - call glBindFragDataLocationIndexedEXT on GLES because that's what the extension requires v3: use sizoef(buf) instead of hard-coding size (John) Related: #223 Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: maksym.wezdecki@collabora.com (v2) Reviewed-by: John Bates <jbates@chromium.org>macos/master
parent
8678763abe
commit
fe82483966
Loading…
Reference in new issue