Hm, I thought reading gl_Layer in a fragment shader is well-defined
(to be 0) when there's no GS. Reading back over
ARB_fragment_layer_viewport, it doesn't seem to address this point at
all. It just says that if GS doesn't write gl_Layer, then it will be
read as 0 by the fragment shader. I'd be
Hi Ilia,
I'm not entirely sure what you're asking here.
This patch doesn't change anything related to gl_Layer reads, it just
forces the geometry shader codepath unconditionally when VS_LAYER_VIEWPORT
isn't enabled in order to successfully write the gl_Layer output. If
anything, this should be
Hey Mike,
This is in reference to your change
https://cgit.freedesktop.org/mesa/mesa/commit/?id=614c2ac2f48955537efcfefaf0609d6c03e5
.
A fragment shader should still be able to read gl_Layer even without
PIPE_CAP_TGSI_VS_LAYER_VIEWPORT. A frag shader can read gl_Layer any
time