[PATCH 3/5] wined3d: Implement Fetch4 shader generation

Stefan Dösinger stefandoesinger at gmail.com
Thu Nov 22 04:30:03 CST 2018



> Am 22.11.2018 um 02:28 schrieb Daniel Ansorregui <mailszeros at gmail.com>:
> 
> - Vertex texldl unimplemented yet, since it is not possible to access
>  ps_compile_args. Maybe move it to another place.
For that you'd need a similar change in vs_compile_args. I am fine with the FIXME for now. Vertex sampling can only be done via texldl, so I have doubts that it will work well.

> +    if (gl_info->supported[ARB_TEXTURE_GATHER])
> +    {
> +        for (i = 0; i < MAX_FRAGMENT_SAMPLERS; ++i)
> +        {
> +            if (state->sampler_states[i][WINED3D_SAMP_MIPMAP_LOD_BIAS] == MAKEFOURCC('G','E','T','4'))
> +                args->fetch4 |= 1 << i;
> +            else
> +                args->fetch4 &= ~(1 << i);
> +        }
> +    }
You either have to set args->fetch4 to 0 if ARB_TEXTURE_GATHER is not supported, or you don't need to remove the bit if the lod bias is not set to GET4. We have the memset at the start, so from the code point of view the second case applies. Once upon a time the idea was to avoid the memset to avoid writing ps_compile_args twice in this rather time critical function, but I don't know if this is still a worthwhile goal. Henri?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20181122/66f28025/attachment.html>


More information about the wine-devel mailing list