[PATCH 12/12] wined3d: Use ARB_fragment_coord_conventions for vpos fixups when supported.

Matteo Bruni matteo.mystral at gmail.com
Sun May 22 12:52:23 CDT 2016


2016-05-22 18:23 GMT+02:00 Henri Verbeet <hverbeet at gmail.com>:
> On 20 May 2016 at 19:56, Matteo Bruni <mbruni at codeweavers.com> wrote:
>>      if (reg_maps->vpos)
>>      {
>> -        if (shader->device->wined3d->flags & WINED3D_PIXEL_CENTER_INTEGER)
>> +        if (gl_info->supported[ARB_FRAGMENT_COORD_CONVENTIONS])
>> +            shader_addline(buffer, "vpos = gl_FragCoord;\n");
>> +        else if (shader->device->wined3d->flags & WINED3D_PIXEL_CENTER_INTEGER)
> Isn't it harder than that? You're dropping the y-flip completely now.
> I think we can actually do that regardless of
> ARB_fragment_coord_conventions if we have always_offscreen, but not in
> general.

You're correct of course... That probably means we need onscreen /
offscreen shader variants in the AlwaysOffscreen = disabled case,
which might be okay. Although...

> It does look like the benefits of ARB_fragment_coord_conventions are
> somewhat limited. I probably mixed it up with ARB_clip_control when I
> initially suggested it. I think that would allow us to get rid of the
> position fixup, but we'd have to make it a requirement for shader
> model 4 if we wanted to avoid patch 6/12.

Right. It looks like ARB_clip_control is available in Mesa for AMD,
Nvidia and Intel since 10.6 so I think it might be reasonable to make
use of it when supported (I'd keep it optional). I'll have a look.



More information about the wine-devel mailing list