glsl: Remove inverse() from GLSL 1.20 and 1.30.
authorKenneth Graunke <kenneth@whitecape.org>
Wed, 16 Dec 2015 08:56:39 +0000 (00:56 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 17 Dec 2015 03:32:21 +0000 (19:32 -0800)
I apparently regressed this when rewriting the built-ins using
ir_builder, in 76d2f73643f.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93387
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/glsl/builtin_functions.cpp

index 9973a7630870bdaea24d24c421df1e23c02fc93a..0e79a89bff84fc07b1f75e430b877b6f28019b46 100644 (file)
@@ -135,6 +135,12 @@ v140(const _mesa_glsl_parse_state *state)
    return state->is_version(140, 0);
 }
 
+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)
 {
@@ -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),