[Mesa-dev] [PATCH] glsl: Remove inverse() from GLSL 1.20 and 1.30.

Ilia Mirkin imirkin at alum.mit.edu
Wed Dec 16 10:15:33 PST 2015


Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu>

Commit 7ddc312c1b2c61 may be the more relevant one to mention, or
perhaps 76d2f73643f which actually switched over.

On Wed, Dec 16, 2015 at 1:07 PM, Kenneth Graunke <kenneth at whitecape.org> wrote:
> I apparently regressed this in 722eff674b832e2321f791c68358ef52d2a1ff25.
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93387
> Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
> ---
>  src/glsl/builtin_functions.cpp | 12 +++++++++---
>  1 file changed, 9 insertions(+), 3 deletions(-)
>
> diff --git a/src/glsl/builtin_functions.cpp b/src/glsl/builtin_functions.cpp
> index 9973a76..0e79a89 100644
> --- a/src/glsl/builtin_functions.cpp
> +++ b/src/glsl/builtin_functions.cpp
> @@ -136,6 +136,12 @@ v140(const _mesa_glsl_parse_state *state)
>  }
>
>  static bool
> +v140_or_es3(const _mesa_glsl_parse_state *state)
> +{
> +   return state->is_version(140, 300);
> +}
> +
> +static bool
>  v400_fs_only(const _mesa_glsl_parse_state *state)
>  {
>     return state->is_version(400, 0) &&
> @@ -1438,9 +1444,9 @@ builtin_builder::create_builtins()
>
>                  NULL);
>     add_function("inverse",
> -                _inverse_mat2(v120, glsl_type::mat2_type),
> -                _inverse_mat3(v120, glsl_type::mat3_type),
> -                _inverse_mat4(v120, glsl_type::mat4_type),
> +                _inverse_mat2(v140_or_es3, glsl_type::mat2_type),
> +                _inverse_mat3(v140_or_es3, glsl_type::mat3_type),
> +                _inverse_mat4(v140_or_es3, glsl_type::mat4_type),
>                  _inverse_mat2(fp64, glsl_type::dmat2_type),
>                  _inverse_mat3(fp64, glsl_type::dmat3_type),
>                  _inverse_mat4(fp64, glsl_type::dmat4_type),
> --
> 2.6.3
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list