[PATCH 1/5] wined3d: Declare the correct number and type of fragment shader color outputs.

Matteo Bruni matteo.mystral at gmail.com
Wed Jun 6 11:25:27 CDT 2018


2018-06-06 3:32 GMT+02:00 Alistair Leslie-Hughes <leslie_alistair at hotmail.com>:
> Hi Matteo,
>
>
> On 06/06/18 08:32, Matteo Bruni wrote:
>>          {
>> -            GL_EXTCALL(glBindFragDataLocation(program_id, 0, "ps_out"));
>> -            checkGLcall("glBindFragDataLocation");
>> +            for (i = 0; i < MAX_RENDER_TARGET_VIEWS; ++i)
> Is there a reason why MAX_RENDER_TARGET_VIEWS is used instead of
> "gl_info->limits.buffers"?

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...



More information about the wine-devel mailing list