2018-06-06 18:30 GMT+02:00 Henri Verbeet hverbeet@gmail.com:
On 6 June 2018 at 18:25, Matteo Bruni matteo.mystral@gmail.com wrote:
Hmm, it was intentional but it looks like it doesn't matter in practice. We only execute that if (!needs_legacy_glsl_syntax()), which means GLSL 1.30+ and thus OpenGL 3.0+. That requires that GL_MAX_DRAW_BUFFERS is >= 8. OpenGL ES apparently only mandates 4 draw buffers so things would be a bit more murky there, except that there is no glBindFragDataLocation() in ES at all (you're supposed to use layout qualifiers in the fragment shader instead - I guess I'll have to rework it again to handle that).
Anyway, I can switch to gl_info->limits.buffers, it shouldn't hurt and I have to resend it anyway...
I don't think it (currently) happens in practice, but gl_info->limits.buffers can potentially be larger than MAX_RENDER_TARGET_VIEWS.
Yeah, it's currently clamped to MAX_RENDER_TARGET_VIEWS.
I can also leave this as-is :)