[resend PATCH v3 2/4] wined3d: Support Nvidia alpha to coverage state.

Paul Gofman gofmanp at gmail.com
Thu Feb 13 09:55:55 CST 2020


On 2/13/20 18:37, Henri Verbeet wrote:
> On Thu, 13 Feb 2020 at 18:28, Paul Gofman <gofmanp at gmail.com> wrote:
>>
> I was thinking of simply taking WINED3D_RS_ADAPTIVETESS_Y into account
> when setting the blend state in wined3d_device_apply_stateblock().
> I.e., some variant of the following:
>
>     if (changed->blend_state || state_changed(changed->renderState,
> WINED3D_RS_ADAPTIVETESS_Y))
>     {
>         blend_state = state->blend_state;
>         if (state->rs[WINED3D_RS_ADAPTIVETESS_Y] == WINED3DFMT_ATOC)
>             blend_state = device->blend_state_atoc_enabled;
>         ...
>         wined3d_device_set_blend_state(..., blend_state, ...);
>     }

This will reset ATOC state whenever application sets _ADAPTIVETESS_Y,
while the application could have set ATOC state AMD way previously (not
in the current stateblock, so changed->blend_state is 0 and
state->blend_state is NULL). This can probably be worked around by
checking the device current blend_state but this way state application
will now start combining states with pre-existing on device which looks
too twisted. The other probably more straightforward way to solve it
would be not to expose both Nvidia and AMD states at the same time but
instead make it depend on reported GPU vendor.






More information about the wine-devel mailing list