[PATCH 5/5] wined3d: Use GLSL 1.50 on core contexts.

Henri Verbeet hverbeet at gmail.com
Tue Jul 7 09:58:59 CDT 2015


On 6 July 2015 at 22:20, Matteo Bruni <mbruni at codeweavers.com> wrote:
>  static const char *shader_glsl_get_version(const struct wined3d_gl_info *gl_info,
>          const struct wined3d_shader_version *version)
>  {
> -    if (gl_info->glsl_version >= MAKEDWORD_VERSION(1, 30) && version->major >= 4)
> +    if (!gl_info->supported[WINED3D_GL_LEGACY_CONTEXT])
> +        return "#version 150";
> +    else if (gl_info->glsl_version >= MAKEDWORD_VERSION(1, 30) && version && version->major >= 4)
>          return "#version 130";
>      else
>          return "#version 120";
Is GLSL 1.20 unavailable in core contexts? I only glanced over the
spec, but didn't immediately see anything that explicitly makes
earlier versions unavailable. What's a bit unfortunate about this is
that drivers may decide to use different floating point rules (in
particular wrt. multiplications by zero) depending on the GLSL
version. IIRC at least r600g considered doing that at some point,
although I'd have to check if that's currently the case.



More information about the wine-devel mailing list