[gtk+/wip/otte/shader: 231/269] gskslnative: Reorganize more



commit af680803d88cbac969a7048bff1f98c49f86d96c
Author: Benjamin Otte <otte redhat com>
Date:   Fri Oct 13 22:30:19 2017 +0200

    gskslnative: Reorganize more
    
    Instead of creating a large const array of a custom struct holding all
    the infos about native functions and iterating over that array, make the
    macros generate code that register the functions directly.
    
    So we don't need to deal with that weird struct anymore.

 gsk/gskslnativefunction.c |  899 +++++++++++++++++++++++----------------------
 gsk/gsksltype.c           |   89 -----
 gsk/gsksltypeprivate.h    |    1 -
 gsk/gsksltypesprivate.h   |   42 ---
 4 files changed, 464 insertions(+), 567 deletions(-)
---
diff --git a/gsk/gskslnativefunction.c b/gsk/gskslnativefunction.c
index 426de0e..c3d1e41 100644
--- a/gsk/gskslnativefunction.c
+++ b/gsk/gskslnativefunction.c
@@ -26,460 +26,489 @@
 #include "gskslscopeprivate.h"
 #include "gsksltypeprivate.h"
 
-struct _GskSlNativeFunction
-{
-  const char *name;
-  GskSlBuiltinType return_type;
-  gsize n_arguments;
-  const GskSlBuiltinType *argument_types;
-};
- 
-#define NATIVE1(type, name, arg1) \
-  { name, GSK_SL_BUILTIN_ ## type, 1, (GskSlBuiltinType[1]) { GSK_SL_BUILTIN_ ## arg1 } }
-#define NATIVE2(type, name, arg1, arg2) \
-  { name, GSK_SL_BUILTIN_ ## type, 2, (GskSlBuiltinType[2]) { GSK_SL_BUILTIN_ ## arg1, GSK_SL_BUILTIN_ ## 
arg2 } }
-#define NATIVE3(type, name, arg1, arg2, arg3) \
-  { name, GSK_SL_BUILTIN_ ## type, 3, (GskSlBuiltinType[3]) { GSK_SL_BUILTIN_ ## arg1, GSK_SL_BUILTIN_ ## 
arg2, GSK_SL_BUILTIN_ ## arg3, } }
-static const GskSlNativeFunction gsk_glsl_functions[] = {
-  NATIVE1 (FLOAT, "radians", FLOAT),
-  NATIVE1 (VEC2, "radians", VEC2),
-  NATIVE1 (VEC3, "radians", VEC3),
-  NATIVE1 (VEC4, "radians", VEC4),
-  NATIVE1 (FLOAT, "degrees", FLOAT),
-  NATIVE1 (VEC2, "degrees", VEC2),
-  NATIVE1 (VEC3, "degrees", VEC3),
-  NATIVE1 (VEC4, "degrees", VEC4),
-  NATIVE1 (FLOAT, "sin", FLOAT),
-  NATIVE1 (VEC2, "sin", VEC2),
-  NATIVE1 (VEC3, "sin", VEC3),
-  NATIVE1 (VEC4, "sin", VEC4),
-  NATIVE1 (FLOAT, "cos", FLOAT),
-  NATIVE1 (VEC2, "cos", VEC2),
-  NATIVE1 (VEC3, "cos", VEC3),
-  NATIVE1 (VEC4, "cos", VEC4),
-  NATIVE1 (FLOAT, "tan", FLOAT),
-  NATIVE1 (VEC2, "tan", VEC2),
-  NATIVE1 (VEC3, "tan", VEC3),
-  NATIVE1 (VEC4, "tan", VEC4),
-  NATIVE1 (FLOAT, "asin", FLOAT),
-  NATIVE1 (VEC2, "asin", VEC2),
-  NATIVE1 (VEC3, "asin", VEC3),
-  NATIVE1 (VEC4, "asin", VEC4),
-  NATIVE1 (FLOAT, "acos", FLOAT),
-  NATIVE1 (VEC2, "acos", VEC2),
-  NATIVE1 (VEC3, "acos", VEC3),
-  NATIVE1 (VEC4, "acos", VEC4),
-  NATIVE2 (FLOAT, "atan", FLOAT, FLOAT),
-  NATIVE2 (VEC2, "atan", VEC2, VEC2),
-  NATIVE2 (VEC3, "atan", VEC3, VEC3),
-  NATIVE2 (VEC4, "atan", VEC4, VEC4),
-  NATIVE1 (FLOAT, "atan", FLOAT),
-  NATIVE1 (VEC2, "atan", VEC2),
-  NATIVE1 (VEC3, "atan", VEC3),
-  NATIVE1 (VEC4, "atan", VEC4),
+#define GSK_SL_BUILTIN_TYPE_VOID (gsk_sl_type_get_void ())
+#define GSK_SL_BUILTIN_TYPE_FLOAT (gsk_sl_type_get_scalar (GSK_SL_FLOAT))
+#define GSK_SL_BUILTIN_TYPE_DOUBLE (gsk_sl_type_get_scalar (GSK_SL_DOUBLE))
+#define GSK_SL_BUILTIN_TYPE_INT (gsk_sl_type_get_scalar (GSK_SL_INT))
+#define GSK_SL_BUILTIN_TYPE_UINT (gsk_sl_type_get_scalar (GSK_SL_UINT))
+#define GSK_SL_BUILTIN_TYPE_BOOL (gsk_sl_type_get_scalar (GSK_SL_BOOL))
+#define GSK_SL_BUILTIN_TYPE_BVEC2 (gsk_sl_type_get_vector (GSK_SL_BOOL, 2))
+#define GSK_SL_BUILTIN_TYPE_BVEC3 (gsk_sl_type_get_vector (GSK_SL_BOOL, 3))
+#define GSK_SL_BUILTIN_TYPE_BVEC4 (gsk_sl_type_get_vector (GSK_SL_BOOL, 4))
+#define GSK_SL_BUILTIN_TYPE_IVEC2 (gsk_sl_type_get_vector (GSK_SL_INT, 2))
+#define GSK_SL_BUILTIN_TYPE_IVEC3 (gsk_sl_type_get_vector (GSK_SL_INT, 3))
+#define GSK_SL_BUILTIN_TYPE_IVEC4 (gsk_sl_type_get_vector (GSK_SL_INT, 4))
+#define GSK_SL_BUILTIN_TYPE_UVEC2 (gsk_sl_type_get_vector (GSK_SL_UINT, 2))
+#define GSK_SL_BUILTIN_TYPE_UVEC3 (gsk_sl_type_get_vector (GSK_SL_UINT, 3))
+#define GSK_SL_BUILTIN_TYPE_UVEC4 (gsk_sl_type_get_vector (GSK_SL_UINT, 4))
+#define GSK_SL_BUILTIN_TYPE_VEC2 (gsk_sl_type_get_vector (GSK_SL_FLOAT, 2))
+#define GSK_SL_BUILTIN_TYPE_VEC3 (gsk_sl_type_get_vector (GSK_SL_FLOAT, 3))
+#define GSK_SL_BUILTIN_TYPE_VEC4 (gsk_sl_type_get_vector (GSK_SL_FLOAT, 4))
+#define GSK_SL_BUILTIN_TYPE_DVEC2 (gsk_sl_type_get_vector (GSK_SL_DOUBLE, 2))
+#define GSK_SL_BUILTIN_TYPE_DVEC3 (gsk_sl_type_get_vector (GSK_SL_DOUBLE, 3))
+#define GSK_SL_BUILTIN_TYPE_DVEC4 (gsk_sl_type_get_vector (GSK_SL_DOUBLE, 4))
+#define GSK_SL_BUILTIN_TYPE_MAT2 (gsk_sl_type_get_matrix (GSK_SL_FLOAT, 2, 2))
+#define GSK_SL_BUILTIN_TYPE_MAT2X3 (gsk_sl_type_get_matrix (GSK_SL_FLOAT, 2, 3))
+#define GSK_SL_BUILTIN_TYPE_MAT2X4 (gsk_sl_type_get_matrix (GSK_SL_FLOAT, 2, 4))
+#define GSK_SL_BUILTIN_TYPE_MAT3X2 (gsk_sl_type_get_matrix (GSK_SL_FLOAT, 3, 2))
+#define GSK_SL_BUILTIN_TYPE_MAT3 (gsk_sl_type_get_matrix (GSK_SL_FLOAT, 3, 3))
+#define GSK_SL_BUILTIN_TYPE_MAT3X4 (gsk_sl_type_get_matrix (GSK_SL_FLOAT, 3, 4))
+#define GSK_SL_BUILTIN_TYPE_MAT4X2 (gsk_sl_type_get_matrix (GSK_SL_FLOAT, 4, 2))
+#define GSK_SL_BUILTIN_TYPE_MAT4X3 (gsk_sl_type_get_matrix (GSK_SL_FLOAT, 4, 3))
+#define GSK_SL_BUILTIN_TYPE_MAT4 (gsk_sl_type_get_matrix (GSK_SL_FLOAT, 4, 4))
+#define GSK_SL_BUILTIN_TYPE_DMAT2 (gsk_sl_type_get_matrix (GSK_SL_DOUBLE, 2, 2))
+#define GSK_SL_BUILTIN_TYPE_DMAT2X3 (gsk_sl_type_get_matrix (GSK_SL_DOUBLE, 2, 3))
+#define GSK_SL_BUILTIN_TYPE_DMAT2X4 (gsk_sl_type_get_matrix (GSK_SL_DOUBLE, 2, 4))
+#define GSK_SL_BUILTIN_TYPE_DMAT3X2 (gsk_sl_type_get_matrix (GSK_SL_DOUBLE, 3, 2))
+#define GSK_SL_BUILTIN_TYPE_DMAT3 (gsk_sl_type_get_matrix (GSK_SL_DOUBLE, 3, 3))
+#define GSK_SL_BUILTIN_TYPE_DMAT3X4 (gsk_sl_type_get_matrix (GSK_SL_DOUBLE, 3, 4))
+#define GSK_SL_BUILTIN_TYPE_DMAT4X2 (gsk_sl_type_get_matrix (GSK_SL_DOUBLE, 4, 2))
+#define GSK_SL_BUILTIN_TYPE_DMAT4X3 (gsk_sl_type_get_matrix (GSK_SL_DOUBLE, 4, 3))
+#define GSK_SL_BUILTIN_TYPE_DMAT4 (gsk_sl_type_get_matrix (GSK_SL_DOUBLE, 4, 4))
 
-  NATIVE2 (FLOAT, "pow", FLOAT, FLOAT),
-  NATIVE2 (VEC2, "pow", VEC2, VEC2),
-  NATIVE2 (VEC3, "pow", VEC3, VEC3),
-  NATIVE2 (VEC4, "pow", VEC4, VEC4),
-  NATIVE1 (FLOAT, "exp", FLOAT),
-  NATIVE1 (VEC2, "exp", VEC2),
-  NATIVE1 (VEC3, "exp", VEC3),
-  NATIVE1 (VEC4, "exp", VEC4),
-  NATIVE1 (FLOAT, "log", FLOAT),
-  NATIVE1 (VEC2, "log", VEC2),
-  NATIVE1 (VEC3, "log", VEC3),
-  NATIVE1 (VEC4, "log", VEC4),
-  NATIVE1 (FLOAT, "exp", FLOAT),
-  NATIVE1 (VEC2, "exp", VEC2),
-  NATIVE1 (VEC3, "exp", VEC3),
-  NATIVE1 (VEC4, "exp", VEC4),
-  NATIVE1 (FLOAT, "log2", FLOAT),
-  NATIVE1 (VEC2, "log2", VEC2),
-  NATIVE1 (VEC3, "log2", VEC3),
-  NATIVE1 (VEC4, "log2", VEC4),
-  NATIVE1 (FLOAT, "exp2", FLOAT),
-  NATIVE1 (VEC2, "exp2", VEC2),
-  NATIVE1 (VEC3, "exp2", VEC3),
-  NATIVE1 (VEC4, "exp2", VEC4),
-  NATIVE1 (FLOAT, "inversesqrt", FLOAT),
-  NATIVE1 (VEC2, "inversesqrt", VEC2),
-  NATIVE1 (VEC3, "inversesqrt", VEC3),
-  NATIVE1 (VEC4, "inversesqrt", VEC4),
+static guint32
+gsk_sl_native_functions_write_spv_unimplemented (GskSpvWriter *writer,
+                                                 guint32      *arguments,
+                                                 gpointer      user_data)
+{
+  g_assert_not_reached ();
 
-  NATIVE1 (FLOAT, "abs", FLOAT),
-  NATIVE1 (VEC2, "abs", VEC2),
-  NATIVE1 (VEC3, "abs", VEC3),
-  NATIVE1 (VEC4, "abs", VEC4),
-  NATIVE1 (FLOAT, "sign", FLOAT),
-  NATIVE1 (VEC2, "sign", VEC2),
-  NATIVE1 (VEC3, "sign", VEC3),
-  NATIVE1 (VEC4, "sign", VEC4),
-  NATIVE1 (FLOAT, "floor", FLOAT),
-  NATIVE1 (VEC2, "floor", VEC2),
-  NATIVE1 (VEC3, "floor", VEC3),
-  NATIVE1 (VEC4, "floor", VEC4),
-  NATIVE1 (FLOAT, "ceil", FLOAT),
-  NATIVE1 (VEC2, "ceil", VEC2),
-  NATIVE1 (VEC3, "ceil", VEC3),
-  NATIVE1 (VEC4, "ceil", VEC4),
-  NATIVE1 (FLOAT, "fract", FLOAT),
-  NATIVE1 (VEC2, "fract", VEC2),
-  NATIVE1 (VEC3, "fract", VEC3),
-  NATIVE1 (VEC4, "fract", VEC4),
-  NATIVE2 (FLOAT, "mod", FLOAT, FLOAT),
-  NATIVE2 (VEC2, "mod", VEC2, FLOAT),
-  NATIVE2 (VEC3, "mod", VEC3, FLOAT),
-  NATIVE2 (VEC4, "mod", VEC4, FLOAT),
-  NATIVE2 (VEC2, "mod", VEC2, VEC2),
-  NATIVE2 (VEC3, "mod", VEC3, VEC3),
-  NATIVE2 (VEC4, "mod", VEC4, VEC4),
-  NATIVE2 (FLOAT, "min", FLOAT, FLOAT),
-  NATIVE2 (VEC2, "min", VEC2, FLOAT),
-  NATIVE2 (VEC3, "min", VEC3, FLOAT),
-  NATIVE2 (VEC4, "min", VEC4, FLOAT),
-  NATIVE2 (VEC2, "min", VEC2, VEC2),
-  NATIVE2 (VEC3, "min", VEC3, VEC3),
-  NATIVE2 (VEC4, "min", VEC4, VEC4),
-  NATIVE2 (FLOAT, "max", FLOAT, FLOAT),
-  NATIVE2 (VEC2, "max", VEC2, FLOAT),
-  NATIVE2 (VEC3, "max", VEC3, FLOAT),
-  NATIVE2 (VEC4, "max", VEC4, FLOAT),
-  NATIVE2 (VEC2, "max", VEC2, VEC2),
-  NATIVE2 (VEC3, "max", VEC3, VEC3),
-  NATIVE2 (VEC4, "max", VEC4, VEC4),
-  NATIVE3 (FLOAT, "clamp", FLOAT, FLOAT, FLOAT),
-  NATIVE3 (VEC2, "clamp", VEC2, FLOAT, FLOAT),
-  NATIVE3 (VEC3, "clamp", VEC3, FLOAT, FLOAT),
-  NATIVE3 (VEC4, "clamp", VEC4, FLOAT, FLOAT),
-  NATIVE3 (VEC2, "clamp", VEC2, VEC2, VEC2),
-  NATIVE3 (VEC3, "clamp", VEC3, VEC3, VEC3),
-  NATIVE3 (VEC4, "clamp", VEC4, VEC4, VEC4),
-  NATIVE3 (FLOAT, "mix", FLOAT, FLOAT, FLOAT),
-  NATIVE3 (VEC2, "mix", VEC2, VEC2, FLOAT),
-  NATIVE3 (VEC3, "mix", VEC3, VEC3, FLOAT),
-  NATIVE3 (VEC4, "mix", VEC4, VEC4, FLOAT),
-  NATIVE3 (VEC2, "mix", VEC2, VEC2, VEC2),
-  NATIVE3 (VEC3, "mix", VEC3, VEC3, VEC3),
-  NATIVE3 (VEC4, "mix", VEC4, VEC4, VEC4),
-  NATIVE2 (FLOAT, "step", FLOAT, FLOAT),
-  NATIVE2 (VEC2, "step", FLOAT, VEC2),
-  NATIVE2 (VEC3, "step", FLOAT, VEC3),
-  NATIVE2 (VEC4, "step", FLOAT, VEC4),
-  NATIVE2 (VEC2, "step", VEC2, VEC2),
-  NATIVE2 (VEC3, "step", VEC3, VEC3),
-  NATIVE2 (VEC4, "step", VEC4, VEC4),
-  NATIVE3 (FLOAT, "smoothstep", FLOAT, FLOAT, FLOAT),
-  NATIVE3 (VEC2, "smoothstep", VEC2, VEC2, FLOAT),
-  NATIVE3 (VEC3, "smoothstep", VEC3, VEC3, FLOAT),
-  NATIVE3 (VEC4, "smoothstep", VEC4, VEC4, FLOAT),
-  NATIVE3 (VEC2, "smoothstep", VEC2, VEC2, VEC2),
-  NATIVE3 (VEC3, "smoothstep", VEC3, VEC3, VEC3),
-  NATIVE3 (VEC4, "smoothstep", VEC4, VEC4, VEC4),
+  return 0;
+}
 
-  NATIVE1 (FLOAT, "length", FLOAT),
-  NATIVE1 (FLOAT, "length", VEC2),
-  NATIVE1 (FLOAT, "length", VEC3),
-  NATIVE1 (FLOAT, "length", VEC4),
-  NATIVE2 (FLOAT, "distance", FLOAT, FLOAT),
-  NATIVE2 (FLOAT, "distance", VEC2, VEC2),
-  NATIVE2 (FLOAT, "distance", VEC3, VEC3),
-  NATIVE2 (FLOAT, "distance", VEC4, VEC4),
-  NATIVE2 (FLOAT, "dot", FLOAT, FLOAT),
-  NATIVE2 (FLOAT, "dot", VEC2, VEC2),
-  NATIVE2 (FLOAT, "dot", VEC3, VEC3),
-  NATIVE2 (FLOAT, "dot", VEC4, VEC4),
-  NATIVE2 (VEC3, "cross", VEC3, VEC3),
-  NATIVE1 (FLOAT, "normalize", FLOAT),
-  NATIVE1 (VEC2, "normalize", VEC2),
-  NATIVE1 (VEC3, "normalize", VEC3),
-  NATIVE1 (VEC4, "normalize", VEC4),
-  NATIVE3 (FLOAT, "faceforward", FLOAT, FLOAT, FLOAT),
-  NATIVE3 (FLOAT, "faceforward", VEC2, VEC2, VEC2),
-  NATIVE3 (FLOAT, "faceforward", VEC3, VEC3, VEC3),
-  NATIVE3 (FLOAT, "faceforward", VEC4, VEC4, VEC4),
-  NATIVE2 (FLOAT, "reflect", FLOAT, FLOAT),
-  NATIVE2 (VEC2, "reflect", VEC2, VEC2),
-  NATIVE2 (VEC3, "reflect", VEC3, VEC3),
-  NATIVE2 (VEC4, "reflect", VEC4, VEC4),
-  NATIVE3 (FLOAT, "refract", FLOAT, FLOAT, FLOAT),
-  NATIVE3 (VEC2, "refract", VEC2, VEC2, FLOAT),
-  NATIVE3 (VEC3, "refract", VEC3, VEC3, FLOAT),
-  NATIVE3 (VEC4, "refract", VEC4, VEC4, FLOAT),
+static void
+gsk_sl_native_functions_add_one (GskSlScope *scope,
+                                 GskSlType  *return_type,
+                                 const char *name,
+                                 GskSlType **arguments,
+                                 gsize       n_arguments)
+{
+  GskSlFunctionType *ftype;
+  GskSlFunction *function;
+  gsize i;
 
-  NATIVE2 (MAT2, "matrixCompMult", MAT2, MAT2),
-  NATIVE2 (MAT3, "matrixCompMult", MAT3, MAT3),
-  NATIVE2 (MAT4, "matrixCompMult", MAT4, MAT4),
+  ftype = gsk_sl_function_type_new (return_type);
+  for (i = 0; i < n_arguments; i++)
+    {
+      ftype = gsk_sl_function_type_add_argument (ftype,
+                                                 GSK_SL_STORAGE_PARAMETER_IN,
+                                                 arguments[i]);
+    }
 
-  NATIVE2 (BVEC2, "lessThan", VEC2, VEC2),
-  NATIVE2 (BVEC3, "lessThan", VEC3, VEC3),
-  NATIVE2 (BVEC4, "lessThan", VEC4, VEC4),
-  NATIVE2 (BVEC2, "lessThan", IVEC2, IVEC2),
-  NATIVE2 (BVEC3, "lessThan", IVEC3, IVEC3),
-  NATIVE2 (BVEC4, "lessThan", IVEC4, IVEC4),
-  NATIVE2 (BVEC2, "lessThanEqual", VEC2, VEC2),
-  NATIVE2 (BVEC3, "lessThanEqual", VEC3, VEC3),
-  NATIVE2 (BVEC4, "lessThanEqual", VEC4, VEC4),
-  NATIVE2 (BVEC2, "lessThanEqual", IVEC2, IVEC2),
-  NATIVE2 (BVEC3, "lessThanEqual", IVEC3, IVEC3),
-  NATIVE2 (BVEC4, "lessThanEqual", IVEC4, IVEC4),
-  NATIVE2 (BVEC2, "greaterThan", VEC2, VEC2),
-  NATIVE2 (BVEC3, "greaterThan", VEC3, VEC3),
-  NATIVE2 (BVEC4, "greaterThan", VEC4, VEC4),
-  NATIVE2 (BVEC2, "greaterThan", IVEC2, IVEC2),
-  NATIVE2 (BVEC3, "greaterThan", IVEC3, IVEC3),
-  NATIVE2 (BVEC4, "greaterThan", IVEC4, IVEC4),
-  NATIVE2 (BVEC2, "greaterThanEqual", VEC2, VEC2),
-  NATIVE2 (BVEC3, "greaterThanEqual", VEC3, VEC3),
-  NATIVE2 (BVEC4, "greaterThanEqual", VEC4, VEC4),
-  NATIVE2 (BVEC2, "greaterThanEqual", IVEC2, IVEC2),
-  NATIVE2 (BVEC3, "greaterThanEqual", IVEC3, IVEC3),
-  NATIVE2 (BVEC4, "greaterThanEqual", IVEC4, IVEC4),
-  NATIVE2 (BVEC2, "equal", VEC2, VEC2),
-  NATIVE2 (BVEC3, "equal", VEC3, VEC3),
-  NATIVE2 (BVEC4, "equal", VEC4, VEC4),
-  NATIVE2 (BVEC2, "equal", IVEC2, IVEC2),
-  NATIVE2 (BVEC3, "equal", IVEC3, IVEC3),
-  NATIVE2 (BVEC4, "equal", IVEC4, IVEC4),
-  NATIVE2 (BVEC2, "equal", BVEC2, BVEC2),
-  NATIVE2 (BVEC3, "equal", BVEC3, BVEC3),
-  NATIVE2 (BVEC4, "equal", BVEC4, BVEC4),
-  NATIVE2 (BVEC2, "notEqual", VEC2, VEC2),
-  NATIVE2 (BVEC3, "notEqual", VEC3, VEC3),
-  NATIVE2 (BVEC4, "notEqual", VEC4, VEC4),
-  NATIVE2 (BVEC2, "notEqual", IVEC2, IVEC2),
-  NATIVE2 (BVEC3, "notEqual", IVEC3, IVEC3),
-  NATIVE2 (BVEC4, "notEqual", IVEC4, IVEC4),
-  NATIVE2 (BVEC2, "notEqual", BVEC2, BVEC2),
-  NATIVE2 (BVEC3, "notEqual", BVEC3, BVEC3),
-  NATIVE2 (BVEC4, "notEqual", BVEC4, BVEC4),
-  NATIVE1 (BVEC2, "any", BVEC2),
-  NATIVE1 (BVEC3, "any", BVEC3),
-  NATIVE1 (BVEC4, "any", BVEC4),
-  NATIVE1 (BVEC2, "all", BVEC2),
-  NATIVE1 (BVEC3, "all", BVEC3),
-  NATIVE1 (BVEC4, "all", BVEC4),
-  NATIVE1 (BVEC2, "not", BVEC2),
-  NATIVE1 (BVEC3, "not", BVEC3),
-  NATIVE1 (BVEC4, "not", BVEC4),
-  { NULL }
-};
+  function = gsk_sl_function_new_native (name,
+                                         ftype,
+                                         NULL,
+                                         gsk_sl_native_functions_write_spv_unimplemented,
+                                         NULL,
+                                         NULL);
+  gsk_sl_scope_add_function (scope, function);
 
-static const GskSlNativeFunction gsk_glsl_functions_120[] = {
-  NATIVE2 (MAT2, "outerProduct", VEC2, VEC2),
-  NATIVE2 (MAT3, "outerProduct", VEC3, VEC3),
-  NATIVE2 (MAT4, "outerProduct", VEC4, VEC4),
-  NATIVE2 (MAT2X3, "outerProduct", VEC3, VEC2),
-  NATIVE2 (MAT2X4, "outerProduct", VEC4, VEC2),
-  NATIVE2 (MAT3X2, "outerProduct", VEC2, VEC3),
-  NATIVE2 (MAT3X4, "outerProduct", VEC4, VEC3),
-  NATIVE2 (MAT4X2, "outerProduct", VEC2, VEC4),
-  NATIVE2 (MAT4X3, "outerProduct", VEC3, VEC4),
-  NATIVE1 (MAT2, "transpose", MAT2),
-  NATIVE1 (MAT3, "transpose", MAT3),
-  NATIVE1 (MAT4, "transpose", MAT4),
-  NATIVE1 (MAT2X3, "transpose", MAT3X2),
-  NATIVE1 (MAT2X4, "transpose", MAT4X2),
-  NATIVE1 (MAT3X2, "transpose", MAT2X3),
-  NATIVE1 (MAT3X4, "transpose", MAT4X3),
-  NATIVE1 (MAT4X2, "transpose", MAT2X4),
-  NATIVE1 (MAT4X3, "transpose", MAT3X4),
-  NATIVE2 (MAT2X3, "matrixCompMult", MAT2X3, MAT2X3),
-  NATIVE2 (MAT2X4, "matrixCompMult", MAT2X4, MAT2X4),
-  NATIVE2 (MAT3X2, "matrixCompMult", MAT3X2, MAT3X2),
-  NATIVE2 (MAT3X4, "matrixCompMult", MAT3X4, MAT3X4),
-  NATIVE2 (MAT4X2, "matrixCompMult", MAT4X2, MAT4X2),
-  NATIVE2 (MAT4X3, "matrixCompMult", MAT4X3, MAT4X3),
-  { NULL }
-};
+  gsk_sl_function_unref (function);
+  gsk_sl_function_type_unref (ftype);
+}
 
-static const GskSlNativeFunction gsk_glsl_functions_130[] = {
-  NATIVE1 (FLOAT, "sinh", FLOAT),
-  NATIVE1 (VEC2, "sinh", VEC2),
-  NATIVE1 (VEC3, "sinh", VEC3),
-  NATIVE1 (VEC4, "sinh", VEC4),
-  NATIVE1 (FLOAT, "cosh", FLOAT),
-  NATIVE1 (VEC2, "cosh", VEC2),
-  NATIVE1 (VEC3, "cosh", VEC3),
-  NATIVE1 (VEC4, "cosh", VEC4),
-  NATIVE1 (FLOAT, "tanh", FLOAT),
-  NATIVE1 (VEC2, "tanh", VEC2),
-  NATIVE1 (VEC3, "tanh", VEC3),
-  NATIVE1 (VEC4, "tanh", VEC4),
-  NATIVE1 (FLOAT, "asinh", FLOAT),
-  NATIVE1 (VEC2, "asinh", VEC2),
-  NATIVE1 (VEC3, "asinh", VEC3),
-  NATIVE1 (VEC4, "asinh", VEC4),
-  NATIVE1 (FLOAT, "acosh", FLOAT),
-  NATIVE1 (VEC2, "acosh", VEC2),
-  NATIVE1 (VEC3, "acosh", VEC3),
-  NATIVE1 (VEC4, "acosh", VEC4),
-  NATIVE1 (FLOAT, "atanh", FLOAT),
-  NATIVE1 (VEC2, "atanh", VEC2),
-  NATIVE1 (VEC3, "atanh", VEC3),
-  NATIVE1 (VEC4, "atanh", VEC4),
+#define NATIVE1(type, name, arg1) \
+  gsk_sl_native_functions_add_one (scope, GSK_SL_BUILTIN_TYPE_ ## type, name, (GskSlType *[1]) { 
GSK_SL_BUILTIN_TYPE_ ## arg1 }, 1)
+#define NATIVE2(type, name, arg1, arg2) \
+  gsk_sl_native_functions_add_one (scope, GSK_SL_BUILTIN_TYPE_ ## type, name, (GskSlType *[2]) { 
GSK_SL_BUILTIN_TYPE_ ## arg1, GSK_SL_BUILTIN_TYPE_ ## arg2 }, 2)
+#define NATIVE3(type, name, arg1, arg2, arg3) \
+  gsk_sl_native_functions_add_one (scope, GSK_SL_BUILTIN_TYPE_ ## type, name, (GskSlType *[3]) { 
GSK_SL_BUILTIN_TYPE_ ## arg1, GSK_SL_BUILTIN_TYPE_ ## arg2, GSK_SL_BUILTIN_TYPE_ ## arg3 }, 3)
 
-  NATIVE1 (INT, "abs", INT),
-  NATIVE1 (IVEC2, "abs", IVEC2),
-  NATIVE1 (IVEC3, "abs", IVEC3),
-  NATIVE1 (IVEC4, "abs", IVEC4),
-  NATIVE1 (INT, "sign", INT),
-  NATIVE1 (IVEC2, "sign", IVEC2),
-  NATIVE1 (IVEC3, "sign", IVEC3),
-  NATIVE1 (IVEC4, "sign", IVEC4),
-  NATIVE1 (FLOAT, "trunc", FLOAT),
-  NATIVE1 (VEC2, "trunc", VEC2),
-  NATIVE1 (VEC3, "trunc", VEC3),
-  NATIVE1 (VEC4, "trunc", VEC4),
-  NATIVE1 (FLOAT, "round", FLOAT),
-  NATIVE1 (VEC2, "round", VEC2),
-  NATIVE1 (VEC3, "round", VEC3),
-  NATIVE1 (VEC4, "round", VEC4),
-  NATIVE1 (FLOAT, "roundEven", FLOAT),
-  NATIVE1 (VEC2, "roundEven", VEC2),
-  NATIVE1 (VEC3, "roundEven", VEC3),
-  NATIVE1 (VEC4, "roundEven", VEC4),
-  NATIVE2 (FLOAT, "modf", FLOAT, FLOAT), //OUT!
-  NATIVE2 (VEC2, "modf", VEC2, VEC2), //OUT!
-  NATIVE2 (VEC3, "modf", VEC3, VEC3), //OUT!
-  NATIVE2 (VEC4, "modf", VEC4, VEC4), //OUT!
-  NATIVE1 (INT, "min", INT),
-  NATIVE1 (IVEC2, "min", INT),
-  NATIVE1 (IVEC3, "min", INT),
-  NATIVE1 (IVEC4, "min", INT),
-  NATIVE1 (IVEC2, "min", IVEC2),
-  NATIVE1 (IVEC3, "min", IVEC3),
-  NATIVE1 (IVEC4, "min", IVEC4),
-  NATIVE1 (UINT, "min", UINT),
-  NATIVE1 (UVEC2, "min", UINT),
-  NATIVE1 (UVEC3, "min", UINT),
-  NATIVE1 (UVEC4, "min", UINT),
-  NATIVE1 (UVEC2, "min", UVEC2),
-  NATIVE1 (UVEC3, "min", UVEC3),
-  NATIVE1 (UVEC4, "min", UVEC4),
-  NATIVE1 (INT, "max", INT),
-  NATIVE1 (IVEC2, "max", INT),
-  NATIVE1 (IVEC3, "max", INT),
-  NATIVE1 (IVEC4, "max", INT),
-  NATIVE1 (IVEC2, "max", IVEC2),
-  NATIVE1 (IVEC3, "max", IVEC3),
-  NATIVE1 (IVEC4, "max", IVEC4),
-  NATIVE1 (UINT, "max", UINT),
-  NATIVE1 (UVEC2, "max", UINT),
-  NATIVE1 (UVEC3, "max", UINT),
-  NATIVE1 (UVEC4, "max", UINT),
-  NATIVE1 (UVEC2, "max", UVEC2),
-  NATIVE1 (UVEC3, "max", UVEC3),
-  NATIVE1 (UVEC4, "max", UVEC4),
-  NATIVE2 (INT, "clamp", INT, INT),
-  NATIVE2 (IVEC2, "clamp", INT, INT),
-  NATIVE2 (IVEC3, "clamp", INT, INT),
-  NATIVE2 (IVEC4, "clamp", INT, INT),
-  NATIVE2 (IVEC2, "clamp", IVEC2, IVEC2),
-  NATIVE2 (IVEC3, "clamp", IVEC3, IVEC3),
-  NATIVE2 (IVEC4, "clamp", IVEC4, IVEC4),
-  NATIVE2 (UINT, "clamp", UINT, UINT),
-  NATIVE2 (UVEC2, "clamp", UINT, UINT),
-  NATIVE2 (UVEC3, "clamp", UINT, UINT),
-  NATIVE2 (UVEC4, "clamp", UINT, UINT),
-  NATIVE2 (UVEC2, "clamp", UVEC2, UVEC2),
-  NATIVE2 (UVEC3, "clamp", UVEC3, UVEC3),
-  NATIVE2 (UVEC4, "clamp", UVEC4, UVEC4),
-  NATIVE2 (FLOAT, "mix", FLOAT, FLOAT),
-  NATIVE2 (VEC2, "mix", VEC2, VEC2),
-  NATIVE2 (VEC3, "mix", VEC3, VEC3),
-  NATIVE2 (VEC4, "mix", VEC4, VEC4),
-  NATIVE1 (BOOL, "isnan", FLOAT),
-  NATIVE1 (BVEC2, "isnan", VEC2),
-  NATIVE1 (BVEC3, "isnan", VEC3),
-  NATIVE1 (BVEC4, "isnan", VEC4),
-  NATIVE1 (BOOL, "isinf", FLOAT),
-  NATIVE1 (BVEC2, "isinf", VEC2),
-  NATIVE1 (BVEC3, "isinf", VEC3),
-  NATIVE1 (BVEC4, "isinf", VEC4),
+static void
+gsk_sl_native_functions_add_100 (GskSlScope       *scope,
+                                 GskSlEnvironment *environment)
+{
+  NATIVE1 (FLOAT, "radians", FLOAT);
+  NATIVE1 (VEC2, "radians", VEC2);
+  NATIVE1 (VEC3, "radians", VEC3);
+  NATIVE1 (VEC4, "radians", VEC4);
+  NATIVE1 (FLOAT, "degrees", FLOAT);
+  NATIVE1 (VEC2, "degrees", VEC2);
+  NATIVE1 (VEC3, "degrees", VEC3);
+  NATIVE1 (VEC4, "degrees", VEC4);
+  NATIVE1 (FLOAT, "sin", FLOAT);
+  NATIVE1 (VEC2, "sin", VEC2);
+  NATIVE1 (VEC3, "sin", VEC3);
+  NATIVE1 (VEC4, "sin", VEC4);
+  NATIVE1 (FLOAT, "cos", FLOAT);
+  NATIVE1 (VEC2, "cos", VEC2);
+  NATIVE1 (VEC3, "cos", VEC3);
+  NATIVE1 (VEC4, "cos", VEC4);
+  NATIVE1 (FLOAT, "tan", FLOAT);
+  NATIVE1 (VEC2, "tan", VEC2);
+  NATIVE1 (VEC3, "tan", VEC3);
+  NATIVE1 (VEC4, "tan", VEC4);
+  NATIVE1 (FLOAT, "asin", FLOAT);
+  NATIVE1 (VEC2, "asin", VEC2);
+  NATIVE1 (VEC3, "asin", VEC3);
+  NATIVE1 (VEC4, "asin", VEC4);
+  NATIVE1 (FLOAT, "acos", FLOAT);
+  NATIVE1 (VEC2, "acos", VEC2);
+  NATIVE1 (VEC3, "acos", VEC3);
+  NATIVE1 (VEC4, "acos", VEC4);
+  NATIVE2 (FLOAT, "atan", FLOAT, FLOAT);
+  NATIVE2 (VEC2, "atan", VEC2, VEC2);
+  NATIVE2 (VEC3, "atan", VEC3, VEC3);
+  NATIVE2 (VEC4, "atan", VEC4, VEC4);
+  NATIVE1 (FLOAT, "atan", FLOAT);
+  NATIVE1 (VEC2, "atan", VEC2);
+  NATIVE1 (VEC3, "atan", VEC3);
+  NATIVE1 (VEC4, "atan", VEC4);
 
-  NATIVE2 (BVEC2, "lessThan", UVEC2, UVEC2),
-  NATIVE2 (BVEC3, "lessThan", UVEC3, UVEC3),
-  NATIVE2 (BVEC4, "lessThan", UVEC4, UVEC4),
-  NATIVE2 (BVEC2, "lessThanEqual", UVEC2, UVEC2),
-  NATIVE2 (BVEC3, "lessThanEqual", UVEC3, UVEC3),
-  NATIVE2 (BVEC4, "lessThanEqual", UVEC4, UVEC4),
-  NATIVE2 (BVEC2, "greaterThan", UVEC2, UVEC2),
-  NATIVE2 (BVEC3, "greaterThan", UVEC3, UVEC3),
-  NATIVE2 (BVEC4, "greaterThan", UVEC4, UVEC4),
-  NATIVE2 (BVEC2, "greaterThanEqual", UVEC2, UVEC2),
-  NATIVE2 (BVEC3, "greaterThanEqual", UVEC3, UVEC3),
-  NATIVE2 (BVEC4, "greaterThanEqual", UVEC4, UVEC4),
-  NATIVE2 (BVEC2, "equal", UVEC2, UVEC2),
-  NATIVE2 (BVEC3, "equal", UVEC3, UVEC3),
-  NATIVE2 (BVEC4, "equal", UVEC4, UVEC4),
-  NATIVE2 (BVEC2, "notEqual", UVEC2, UVEC2),
-  NATIVE2 (BVEC3, "notEqual", UVEC3, UVEC3),
-  NATIVE2 (BVEC4, "notEqual", UVEC4, UVEC4),
-  { NULL }
-};
+  NATIVE2 (FLOAT, "pow", FLOAT, FLOAT);
+  NATIVE2 (VEC2, "pow", VEC2, VEC2);
+  NATIVE2 (VEC3, "pow", VEC3, VEC3);
+  NATIVE2 (VEC4, "pow", VEC4, VEC4);
+  NATIVE1 (FLOAT, "exp", FLOAT);
+  NATIVE1 (VEC2, "exp", VEC2);
+  NATIVE1 (VEC3, "exp", VEC3);
+  NATIVE1 (VEC4, "exp", VEC4);
+  NATIVE1 (FLOAT, "log", FLOAT);
+  NATIVE1 (VEC2, "log", VEC2);
+  NATIVE1 (VEC3, "log", VEC3);
+  NATIVE1 (VEC4, "log", VEC4);
+  NATIVE1 (FLOAT, "exp", FLOAT);
+  NATIVE1 (VEC2, "exp", VEC2);
+  NATIVE1 (VEC3, "exp", VEC3);
+  NATIVE1 (VEC4, "exp", VEC4);
+  NATIVE1 (FLOAT, "log2", FLOAT);
+  NATIVE1 (VEC2, "log2", VEC2);
+  NATIVE1 (VEC3, "log2", VEC3);
+  NATIVE1 (VEC4, "log2", VEC4);
+  NATIVE1 (FLOAT, "exp2", FLOAT);
+  NATIVE1 (VEC2, "exp2", VEC2);
+  NATIVE1 (VEC3, "exp2", VEC3);
+  NATIVE1 (VEC4, "exp2", VEC4);
+  NATIVE1 (FLOAT, "inversesqrt", FLOAT);
+  NATIVE1 (VEC2, "inversesqrt", VEC2);
+  NATIVE1 (VEC3, "inversesqrt", VEC3);
+  NATIVE1 (VEC4, "inversesqrt", VEC4);
 
-static const GskSlNativeFunction gsk_glsl_functions_150[] = {
-  NATIVE1 (FLOAT, "determinant", MAT2),
-  NATIVE1 (FLOAT, "determinant", MAT3),
-  NATIVE1 (FLOAT, "determinant", MAT4),
-  NATIVE1 (MAT2, "inverse", MAT2),
-  NATIVE1 (MAT3, "inverse", MAT3),
-  NATIVE1 (MAT4, "inverse", MAT4),
-  { NULL }
-};
+  NATIVE1 (FLOAT, "abs", FLOAT);
+  NATIVE1 (VEC2, "abs", VEC2);
+  NATIVE1 (VEC3, "abs", VEC3);
+  NATIVE1 (VEC4, "abs", VEC4);
+  NATIVE1 (FLOAT, "sign", FLOAT);
+  NATIVE1 (VEC2, "sign", VEC2);
+  NATIVE1 (VEC3, "sign", VEC3);
+  NATIVE1 (VEC4, "sign", VEC4);
+  NATIVE1 (FLOAT, "floor", FLOAT);
+  NATIVE1 (VEC2, "floor", VEC2);
+  NATIVE1 (VEC3, "floor", VEC3);
+  NATIVE1 (VEC4, "floor", VEC4);
+  NATIVE1 (FLOAT, "ceil", FLOAT);
+  NATIVE1 (VEC2, "ceil", VEC2);
+  NATIVE1 (VEC3, "ceil", VEC3);
+  NATIVE1 (VEC4, "ceil", VEC4);
+  NATIVE1 (FLOAT, "fract", FLOAT);
+  NATIVE1 (VEC2, "fract", VEC2);
+  NATIVE1 (VEC3, "fract", VEC3);
+  NATIVE1 (VEC4, "fract", VEC4);
+  NATIVE2 (FLOAT, "mod", FLOAT, FLOAT);
+  NATIVE2 (VEC2, "mod", VEC2, FLOAT);
+  NATIVE2 (VEC3, "mod", VEC3, FLOAT);
+  NATIVE2 (VEC4, "mod", VEC4, FLOAT);
+  NATIVE2 (VEC2, "mod", VEC2, VEC2);
+  NATIVE2 (VEC3, "mod", VEC3, VEC3);
+  NATIVE2 (VEC4, "mod", VEC4, VEC4);
+  NATIVE2 (FLOAT, "min", FLOAT, FLOAT);
+  NATIVE2 (VEC2, "min", VEC2, FLOAT);
+  NATIVE2 (VEC3, "min", VEC3, FLOAT);
+  NATIVE2 (VEC4, "min", VEC4, FLOAT);
+  NATIVE2 (VEC2, "min", VEC2, VEC2);
+  NATIVE2 (VEC3, "min", VEC3, VEC3);
+  NATIVE2 (VEC4, "min", VEC4, VEC4);
+  NATIVE2 (FLOAT, "max", FLOAT, FLOAT);
+  NATIVE2 (VEC2, "max", VEC2, FLOAT);
+  NATIVE2 (VEC3, "max", VEC3, FLOAT);
+  NATIVE2 (VEC4, "max", VEC4, FLOAT);
+  NATIVE2 (VEC2, "max", VEC2, VEC2);
+  NATIVE2 (VEC3, "max", VEC3, VEC3);
+  NATIVE2 (VEC4, "max", VEC4, VEC4);
+  NATIVE3 (FLOAT, "clamp", FLOAT, FLOAT, FLOAT);
+  NATIVE3 (VEC2, "clamp", VEC2, FLOAT, FLOAT);
+  NATIVE3 (VEC3, "clamp", VEC3, FLOAT, FLOAT);
+  NATIVE3 (VEC4, "clamp", VEC4, FLOAT, FLOAT);
+  NATIVE3 (VEC2, "clamp", VEC2, VEC2, VEC2);
+  NATIVE3 (VEC3, "clamp", VEC3, VEC3, VEC3);
+  NATIVE3 (VEC4, "clamp", VEC4, VEC4, VEC4);
+  NATIVE3 (FLOAT, "mix", FLOAT, FLOAT, FLOAT);
+  NATIVE3 (VEC2, "mix", VEC2, VEC2, FLOAT);
+  NATIVE3 (VEC3, "mix", VEC3, VEC3, FLOAT);
+  NATIVE3 (VEC4, "mix", VEC4, VEC4, FLOAT);
+  NATIVE3 (VEC2, "mix", VEC2, VEC2, VEC2);
+  NATIVE3 (VEC3, "mix", VEC3, VEC3, VEC3);
+  NATIVE3 (VEC4, "mix", VEC4, VEC4, VEC4);
+  NATIVE2 (FLOAT, "step", FLOAT, FLOAT);
+  NATIVE2 (VEC2, "step", FLOAT, VEC2);
+  NATIVE2 (VEC3, "step", FLOAT, VEC3);
+  NATIVE2 (VEC4, "step", FLOAT, VEC4);
+  NATIVE2 (VEC2, "step", VEC2, VEC2);
+  NATIVE2 (VEC3, "step", VEC3, VEC3);
+  NATIVE2 (VEC4, "step", VEC4, VEC4);
+  NATIVE3 (FLOAT, "smoothstep", FLOAT, FLOAT, FLOAT);
+  NATIVE3 (VEC2, "smoothstep", VEC2, VEC2, FLOAT);
+  NATIVE3 (VEC3, "smoothstep", VEC3, VEC3, FLOAT);
+  NATIVE3 (VEC4, "smoothstep", VEC4, VEC4, FLOAT);
+  NATIVE3 (VEC2, "smoothstep", VEC2, VEC2, VEC2);
+  NATIVE3 (VEC3, "smoothstep", VEC3, VEC3, VEC3);
+  NATIVE3 (VEC4, "smoothstep", VEC4, VEC4, VEC4);
 
-static GskSlFunctionType *
-gsk_sl_native_functions_construct_type (const GskSlNativeFunction *native)
-{
-  GskSlFunctionType *type;
-  gsize i;
+  NATIVE1 (FLOAT, "length", FLOAT);
+  NATIVE1 (FLOAT, "length", VEC2);
+  NATIVE1 (FLOAT, "length", VEC3);
+  NATIVE1 (FLOAT, "length", VEC4);
+  NATIVE2 (FLOAT, "distance", FLOAT, FLOAT);
+  NATIVE2 (FLOAT, "distance", VEC2, VEC2);
+  NATIVE2 (FLOAT, "distance", VEC3, VEC3);
+  NATIVE2 (FLOAT, "distance", VEC4, VEC4);
+  NATIVE2 (FLOAT, "dot", FLOAT, FLOAT);
+  NATIVE2 (FLOAT, "dot", VEC2, VEC2);
+  NATIVE2 (FLOAT, "dot", VEC3, VEC3);
+  NATIVE2 (FLOAT, "dot", VEC4, VEC4);
+  NATIVE2 (VEC3, "cross", VEC3, VEC3);
+  NATIVE1 (FLOAT, "normalize", FLOAT);
+  NATIVE1 (VEC2, "normalize", VEC2);
+  NATIVE1 (VEC3, "normalize", VEC3);
+  NATIVE1 (VEC4, "normalize", VEC4);
+  NATIVE3 (FLOAT, "faceforward", FLOAT, FLOAT, FLOAT);
+  NATIVE3 (FLOAT, "faceforward", VEC2, VEC2, VEC2);
+  NATIVE3 (FLOAT, "faceforward", VEC3, VEC3, VEC3);
+  NATIVE3 (FLOAT, "faceforward", VEC4, VEC4, VEC4);
+  NATIVE2 (FLOAT, "reflect", FLOAT, FLOAT);
+  NATIVE2 (VEC2, "reflect", VEC2, VEC2);
+  NATIVE2 (VEC3, "reflect", VEC3, VEC3);
+  NATIVE2 (VEC4, "reflect", VEC4, VEC4);
+  NATIVE3 (FLOAT, "refract", FLOAT, FLOAT, FLOAT);
+  NATIVE3 (VEC2, "refract", VEC2, VEC2, FLOAT);
+  NATIVE3 (VEC3, "refract", VEC3, VEC3, FLOAT);
+  NATIVE3 (VEC4, "refract", VEC4, VEC4, FLOAT);
 
-  type = gsk_sl_function_type_new (gsk_sl_type_get_builtin (native->return_type));
-  for (i = 0; i < native->n_arguments; i++)
-    {
-      type = gsk_sl_function_type_add_argument (type,
-                                                GSK_SL_STORAGE_PARAMETER_IN,
-                                                gsk_sl_type_get_builtin (native->argument_types[i]));
-    }
+  NATIVE2 (MAT2, "matrixCompMult", MAT2, MAT2);
+  NATIVE2 (MAT3, "matrixCompMult", MAT3, MAT3);
+  NATIVE2 (MAT4, "matrixCompMult", MAT4, MAT4);
 
-  return type;
+  NATIVE2 (BVEC2, "lessThan", VEC2, VEC2);
+  NATIVE2 (BVEC3, "lessThan", VEC3, VEC3);
+  NATIVE2 (BVEC4, "lessThan", VEC4, VEC4);
+  NATIVE2 (BVEC2, "lessThan", IVEC2, IVEC2);
+  NATIVE2 (BVEC3, "lessThan", IVEC3, IVEC3);
+  NATIVE2 (BVEC4, "lessThan", IVEC4, IVEC4);
+  NATIVE2 (BVEC2, "lessThanEqual", VEC2, VEC2);
+  NATIVE2 (BVEC3, "lessThanEqual", VEC3, VEC3);
+  NATIVE2 (BVEC4, "lessThanEqual", VEC4, VEC4);
+  NATIVE2 (BVEC2, "lessThanEqual", IVEC2, IVEC2);
+  NATIVE2 (BVEC3, "lessThanEqual", IVEC3, IVEC3);
+  NATIVE2 (BVEC4, "lessThanEqual", IVEC4, IVEC4);
+  NATIVE2 (BVEC2, "greaterThan", VEC2, VEC2);
+  NATIVE2 (BVEC3, "greaterThan", VEC3, VEC3);
+  NATIVE2 (BVEC4, "greaterThan", VEC4, VEC4);
+  NATIVE2 (BVEC2, "greaterThan", IVEC2, IVEC2);
+  NATIVE2 (BVEC3, "greaterThan", IVEC3, IVEC3);
+  NATIVE2 (BVEC4, "greaterThan", IVEC4, IVEC4);
+  NATIVE2 (BVEC2, "greaterThanEqual", VEC2, VEC2);
+  NATIVE2 (BVEC3, "greaterThanEqual", VEC3, VEC3);
+  NATIVE2 (BVEC4, "greaterThanEqual", VEC4, VEC4);
+  NATIVE2 (BVEC2, "greaterThanEqual", IVEC2, IVEC2);
+  NATIVE2 (BVEC3, "greaterThanEqual", IVEC3, IVEC3);
+  NATIVE2 (BVEC4, "greaterThanEqual", IVEC4, IVEC4);
+  NATIVE2 (BVEC2, "equal", VEC2, VEC2);
+  NATIVE2 (BVEC3, "equal", VEC3, VEC3);
+  NATIVE2 (BVEC4, "equal", VEC4, VEC4);
+  NATIVE2 (BVEC2, "equal", IVEC2, IVEC2);
+  NATIVE2 (BVEC3, "equal", IVEC3, IVEC3);
+  NATIVE2 (BVEC4, "equal", IVEC4, IVEC4);
+  NATIVE2 (BVEC2, "equal", BVEC2, BVEC2);
+  NATIVE2 (BVEC3, "equal", BVEC3, BVEC3);
+  NATIVE2 (BVEC4, "equal", BVEC4, BVEC4);
+  NATIVE2 (BVEC2, "notEqual", VEC2, VEC2);
+  NATIVE2 (BVEC3, "notEqual", VEC3, VEC3);
+  NATIVE2 (BVEC4, "notEqual", VEC4, VEC4);
+  NATIVE2 (BVEC2, "notEqual", IVEC2, IVEC2);
+  NATIVE2 (BVEC3, "notEqual", IVEC3, IVEC3);
+  NATIVE2 (BVEC4, "notEqual", IVEC4, IVEC4);
+  NATIVE2 (BVEC2, "notEqual", BVEC2, BVEC2);
+  NATIVE2 (BVEC3, "notEqual", BVEC3, BVEC3);
+  NATIVE2 (BVEC4, "notEqual", BVEC4, BVEC4);
+  NATIVE1 (BVEC2, "any", BVEC2);
+  NATIVE1 (BVEC3, "any", BVEC3);
+  NATIVE1 (BVEC4, "any", BVEC4);
+  NATIVE1 (BVEC2, "all", BVEC2);
+  NATIVE1 (BVEC3, "all", BVEC3);
+  NATIVE1 (BVEC4, "all", BVEC4);
+  NATIVE1 (BVEC2, "not", BVEC2);
+  NATIVE1 (BVEC3, "not", BVEC3);
+  NATIVE1 (BVEC4, "not", BVEC4);
 }
 
-static guint32
-gsk_sl_native_functions_write_spv_unimplemented (GskSpvWriter *writer,
-                                                 guint32      *arguments,
-                                                 gpointer      user_data)
+static void
+gsk_sl_native_functions_add_120 (GskSlScope       *scope,
+                                 GskSlEnvironment *environment)
 {
-  g_assert_not_reached ();
-
-  return 0;
+  NATIVE2 (MAT2, "outerProduct", VEC2, VEC2);
+  NATIVE2 (MAT3, "outerProduct", VEC3, VEC3);
+  NATIVE2 (MAT4, "outerProduct", VEC4, VEC4);
+  NATIVE2 (MAT2X3, "outerProduct", VEC3, VEC2);
+  NATIVE2 (MAT2X4, "outerProduct", VEC4, VEC2);
+  NATIVE2 (MAT3X2, "outerProduct", VEC2, VEC3);
+  NATIVE2 (MAT3X4, "outerProduct", VEC4, VEC3);
+  NATIVE2 (MAT4X2, "outerProduct", VEC2, VEC4);
+  NATIVE2 (MAT4X3, "outerProduct", VEC3, VEC4);
+  NATIVE1 (MAT2, "transpose", MAT2);
+  NATIVE1 (MAT3, "transpose", MAT3);
+  NATIVE1 (MAT4, "transpose", MAT4);
+  NATIVE1 (MAT2X3, "transpose", MAT3X2);
+  NATIVE1 (MAT2X4, "transpose", MAT4X2);
+  NATIVE1 (MAT3X2, "transpose", MAT2X3);
+  NATIVE1 (MAT3X4, "transpose", MAT4X3);
+  NATIVE1 (MAT4X2, "transpose", MAT2X4);
+  NATIVE1 (MAT4X3, "transpose", MAT3X4);
+  NATIVE2 (MAT2X3, "matrixCompMult", MAT2X3, MAT2X3);
+  NATIVE2 (MAT2X4, "matrixCompMult", MAT2X4, MAT2X4);
+  NATIVE2 (MAT3X2, "matrixCompMult", MAT3X2, MAT3X2);
+  NATIVE2 (MAT3X4, "matrixCompMult", MAT3X4, MAT3X4);
+  NATIVE2 (MAT4X2, "matrixCompMult", MAT4X2, MAT4X2);
+  NATIVE2 (MAT4X3, "matrixCompMult", MAT4X3, MAT4X3);
 }
 
 static void
-gsk_sl_native_functions_add_list (GskSlScope                *scope,
-                                  const GskSlNativeFunction *functions)
+gsk_sl_native_functions_add_130 (GskSlScope       *scope,
+                                 GskSlEnvironment *environment)
 {
-  guint i;
-
-  for (i = 0; functions[i].name; i++)
-    {
-      GskSlFunctionType *type;
-      GskSlFunction *function;
+  NATIVE1 (FLOAT, "sinh", FLOAT);
+  NATIVE1 (VEC2, "sinh", VEC2);
+  NATIVE1 (VEC3, "sinh", VEC3);
+  NATIVE1 (VEC4, "sinh", VEC4);
+  NATIVE1 (FLOAT, "cosh", FLOAT);
+  NATIVE1 (VEC2, "cosh", VEC2);
+  NATIVE1 (VEC3, "cosh", VEC3);
+  NATIVE1 (VEC4, "cosh", VEC4);
+  NATIVE1 (FLOAT, "tanh", FLOAT);
+  NATIVE1 (VEC2, "tanh", VEC2);
+  NATIVE1 (VEC3, "tanh", VEC3);
+  NATIVE1 (VEC4, "tanh", VEC4);
+  NATIVE1 (FLOAT, "asinh", FLOAT);
+  NATIVE1 (VEC2, "asinh", VEC2);
+  NATIVE1 (VEC3, "asinh", VEC3);
+  NATIVE1 (VEC4, "asinh", VEC4);
+  NATIVE1 (FLOAT, "acosh", FLOAT);
+  NATIVE1 (VEC2, "acosh", VEC2);
+  NATIVE1 (VEC3, "acosh", VEC3);
+  NATIVE1 (VEC4, "acosh", VEC4);
+  NATIVE1 (FLOAT, "atanh", FLOAT);
+  NATIVE1 (VEC2, "atanh", VEC2);
+  NATIVE1 (VEC3, "atanh", VEC3);
+  NATIVE1 (VEC4, "atanh", VEC4);
 
-      type = gsk_sl_native_functions_construct_type (&functions[i]);
+  NATIVE1 (INT, "abs", INT);
+  NATIVE1 (IVEC2, "abs", IVEC2);
+  NATIVE1 (IVEC3, "abs", IVEC3);
+  NATIVE1 (IVEC4, "abs", IVEC4);
+  NATIVE1 (INT, "sign", INT);
+  NATIVE1 (IVEC2, "sign", IVEC2);
+  NATIVE1 (IVEC3, "sign", IVEC3);
+  NATIVE1 (IVEC4, "sign", IVEC4);
+  NATIVE1 (FLOAT, "trunc", FLOAT);
+  NATIVE1 (VEC2, "trunc", VEC2);
+  NATIVE1 (VEC3, "trunc", VEC3);
+  NATIVE1 (VEC4, "trunc", VEC4);
+  NATIVE1 (FLOAT, "round", FLOAT);
+  NATIVE1 (VEC2, "round", VEC2);
+  NATIVE1 (VEC3, "round", VEC3);
+  NATIVE1 (VEC4, "round", VEC4);
+  NATIVE1 (FLOAT, "roundEven", FLOAT);
+  NATIVE1 (VEC2, "roundEven", VEC2);
+  NATIVE1 (VEC3, "roundEven", VEC3);
+  NATIVE1 (VEC4, "roundEven", VEC4);
+  NATIVE2 (FLOAT, "modf", FLOAT, FLOAT); //OUT!
+  NATIVE2 (VEC2, "modf", VEC2, VEC2); //OUT!
+  NATIVE2 (VEC3, "modf", VEC3, VEC3); //OUT!
+  NATIVE2 (VEC4, "modf", VEC4, VEC4); //OUT!
+  NATIVE1 (INT, "min", INT);
+  NATIVE1 (IVEC2, "min", INT);
+  NATIVE1 (IVEC3, "min", INT);
+  NATIVE1 (IVEC4, "min", INT);
+  NATIVE1 (IVEC2, "min", IVEC2);
+  NATIVE1 (IVEC3, "min", IVEC3);
+  NATIVE1 (IVEC4, "min", IVEC4);
+  NATIVE1 (UINT, "min", UINT);
+  NATIVE1 (UVEC2, "min", UINT);
+  NATIVE1 (UVEC3, "min", UINT);
+  NATIVE1 (UVEC4, "min", UINT);
+  NATIVE1 (UVEC2, "min", UVEC2);
+  NATIVE1 (UVEC3, "min", UVEC3);
+  NATIVE1 (UVEC4, "min", UVEC4);
+  NATIVE1 (INT, "max", INT);
+  NATIVE1 (IVEC2, "max", INT);
+  NATIVE1 (IVEC3, "max", INT);
+  NATIVE1 (IVEC4, "max", INT);
+  NATIVE1 (IVEC2, "max", IVEC2);
+  NATIVE1 (IVEC3, "max", IVEC3);
+  NATIVE1 (IVEC4, "max", IVEC4);
+  NATIVE1 (UINT, "max", UINT);
+  NATIVE1 (UVEC2, "max", UINT);
+  NATIVE1 (UVEC3, "max", UINT);
+  NATIVE1 (UVEC4, "max", UINT);
+  NATIVE1 (UVEC2, "max", UVEC2);
+  NATIVE1 (UVEC3, "max", UVEC3);
+  NATIVE1 (UVEC4, "max", UVEC4);
+  NATIVE2 (INT, "clamp", INT, INT);
+  NATIVE2 (IVEC2, "clamp", INT, INT);
+  NATIVE2 (IVEC3, "clamp", INT, INT);
+  NATIVE2 (IVEC4, "clamp", INT, INT);
+  NATIVE2 (IVEC2, "clamp", IVEC2, IVEC2);
+  NATIVE2 (IVEC3, "clamp", IVEC3, IVEC3);
+  NATIVE2 (IVEC4, "clamp", IVEC4, IVEC4);
+  NATIVE2 (UINT, "clamp", UINT, UINT);
+  NATIVE2 (UVEC2, "clamp", UINT, UINT);
+  NATIVE2 (UVEC3, "clamp", UINT, UINT);
+  NATIVE2 (UVEC4, "clamp", UINT, UINT);
+  NATIVE2 (UVEC2, "clamp", UVEC2, UVEC2);
+  NATIVE2 (UVEC3, "clamp", UVEC3, UVEC3);
+  NATIVE2 (UVEC4, "clamp", UVEC4, UVEC4);
+  NATIVE2 (FLOAT, "mix", FLOAT, FLOAT);
+  NATIVE2 (VEC2, "mix", VEC2, VEC2);
+  NATIVE2 (VEC3, "mix", VEC3, VEC3);
+  NATIVE2 (VEC4, "mix", VEC4, VEC4);
+  NATIVE1 (BOOL, "isnan", FLOAT);
+  NATIVE1 (BVEC2, "isnan", VEC2);
+  NATIVE1 (BVEC3, "isnan", VEC3);
+  NATIVE1 (BVEC4, "isnan", VEC4);
+  NATIVE1 (BOOL, "isinf", FLOAT);
+  NATIVE1 (BVEC2, "isinf", VEC2);
+  NATIVE1 (BVEC3, "isinf", VEC3);
+  NATIVE1 (BVEC4, "isinf", VEC4);
 
-      function = gsk_sl_function_new_native (functions[i].name,
-                                             type,
-                                             NULL,
-                                             gsk_sl_native_functions_write_spv_unimplemented,
-                                             (gpointer) &functions[i],
-                                             NULL);
-      gsk_sl_scope_add_function (scope, function);
+  NATIVE2 (BVEC2, "lessThan", UVEC2, UVEC2);
+  NATIVE2 (BVEC3, "lessThan", UVEC3, UVEC3);
+  NATIVE2 (BVEC4, "lessThan", UVEC4, UVEC4);
+  NATIVE2 (BVEC2, "lessThanEqual", UVEC2, UVEC2);
+  NATIVE2 (BVEC3, "lessThanEqual", UVEC3, UVEC3);
+  NATIVE2 (BVEC4, "lessThanEqual", UVEC4, UVEC4);
+  NATIVE2 (BVEC2, "greaterThan", UVEC2, UVEC2);
+  NATIVE2 (BVEC3, "greaterThan", UVEC3, UVEC3);
+  NATIVE2 (BVEC4, "greaterThan", UVEC4, UVEC4);
+  NATIVE2 (BVEC2, "greaterThanEqual", UVEC2, UVEC2);
+  NATIVE2 (BVEC3, "greaterThanEqual", UVEC3, UVEC3);
+  NATIVE2 (BVEC4, "greaterThanEqual", UVEC4, UVEC4);
+  NATIVE2 (BVEC2, "equal", UVEC2, UVEC2);
+  NATIVE2 (BVEC3, "equal", UVEC3, UVEC3);
+  NATIVE2 (BVEC4, "equal", UVEC4, UVEC4);
+  NATIVE2 (BVEC2, "notEqual", UVEC2, UVEC2);
+  NATIVE2 (BVEC3, "notEqual", UVEC3, UVEC3);
+  NATIVE2 (BVEC4, "notEqual", UVEC4, UVEC4);
+}
 
-      gsk_sl_function_unref (function);
-      gsk_sl_function_type_unref (type);
-    }
+static void
+gsk_sl_native_functions_add_150 (GskSlScope       *scope,
+                                 GskSlEnvironment *environment)
+{
+  NATIVE1 (FLOAT, "determinant", MAT2);
+  NATIVE1 (FLOAT, "determinant", MAT3);
+  NATIVE1 (FLOAT, "determinant", MAT4);
+  NATIVE1 (MAT2, "inverse", MAT2);
+  NATIVE1 (MAT3, "inverse", MAT3);
+  NATIVE1 (MAT4, "inverse", MAT4);
 }
 
 void
@@ -488,18 +517,18 @@ gsk_sl_native_functions_add (GskSlScope       *scope,
 {
   guint version = gsk_sl_environment_get_version (environment);
 
-  gsk_sl_native_functions_add_list (scope, gsk_glsl_functions);
+  gsk_sl_native_functions_add_100 (scope, environment);
 
   if (version < 120)
     return;
-  gsk_sl_native_functions_add_list (scope, gsk_glsl_functions_120);
+  gsk_sl_native_functions_add_120 (scope, environment);
 
   if (version < 130)
     return;
-  gsk_sl_native_functions_add_list (scope, gsk_glsl_functions_130);
+  gsk_sl_native_functions_add_130 (scope, environment);
 
   if (version < 150)
     return;
-  gsk_sl_native_functions_add_list (scope, gsk_glsl_functions_150);
+  gsk_sl_native_functions_add_150 (scope, environment);
 }
 
diff --git a/gsk/gsksltype.c b/gsk/gsksltype.c
index 2023877..2ffba83 100644
--- a/gsk/gsksltype.c
+++ b/gsk/gsksltype.c
@@ -1676,95 +1676,6 @@ out:
 }
 
 GskSlType *
-gsk_sl_type_get_builtin (GskSlBuiltinType builtin)
-{
-  switch (builtin)
-    {
-    case GSK_SL_BUILTIN_VOID:
-      return gsk_sl_type_ref (gsk_sl_type_get_void ());
-    case GSK_SL_BUILTIN_FLOAT:
-      return gsk_sl_type_ref (gsk_sl_type_get_scalar (GSK_SL_FLOAT));
-    case GSK_SL_BUILTIN_DOUBLE:
-      return gsk_sl_type_ref (gsk_sl_type_get_scalar (GSK_SL_DOUBLE));
-    case GSK_SL_BUILTIN_INT:
-      return gsk_sl_type_ref (gsk_sl_type_get_scalar (GSK_SL_INT));
-    case GSK_SL_BUILTIN_UINT:
-      return gsk_sl_type_ref (gsk_sl_type_get_scalar (GSK_SL_UINT));
-    case GSK_SL_BUILTIN_BOOL:
-      return gsk_sl_type_ref (gsk_sl_type_get_scalar (GSK_SL_BOOL));
-    case GSK_SL_BUILTIN_BVEC2:
-      return gsk_sl_type_ref (gsk_sl_type_get_vector (GSK_SL_BOOL, 2));
-    case GSK_SL_BUILTIN_BVEC3:
-      return gsk_sl_type_ref (gsk_sl_type_get_vector (GSK_SL_BOOL, 3));
-    case GSK_SL_BUILTIN_BVEC4:
-      return gsk_sl_type_ref (gsk_sl_type_get_vector (GSK_SL_BOOL, 4));
-    case GSK_SL_BUILTIN_IVEC2:
-      return gsk_sl_type_ref (gsk_sl_type_get_vector (GSK_SL_INT, 2));
-    case GSK_SL_BUILTIN_IVEC3:
-      return gsk_sl_type_ref (gsk_sl_type_get_vector (GSK_SL_INT, 3));
-    case GSK_SL_BUILTIN_IVEC4:
-      return gsk_sl_type_ref (gsk_sl_type_get_vector (GSK_SL_INT, 4));
-    case GSK_SL_BUILTIN_UVEC2:
-      return gsk_sl_type_ref (gsk_sl_type_get_vector (GSK_SL_UINT, 2));
-    case GSK_SL_BUILTIN_UVEC3:
-      return gsk_sl_type_ref (gsk_sl_type_get_vector (GSK_SL_UINT, 3));
-    case GSK_SL_BUILTIN_UVEC4:
-      return gsk_sl_type_ref (gsk_sl_type_get_vector (GSK_SL_UINT, 4));
-    case GSK_SL_BUILTIN_VEC2:
-      return gsk_sl_type_ref (gsk_sl_type_get_vector (GSK_SL_FLOAT, 2));
-    case GSK_SL_BUILTIN_VEC3:
-      return gsk_sl_type_ref (gsk_sl_type_get_vector (GSK_SL_FLOAT, 3));
-    case GSK_SL_BUILTIN_VEC4:
-      return gsk_sl_type_ref (gsk_sl_type_get_vector (GSK_SL_FLOAT, 4));
-    case GSK_SL_BUILTIN_DVEC2:
-      return gsk_sl_type_ref (gsk_sl_type_get_vector (GSK_SL_DOUBLE, 2));
-    case GSK_SL_BUILTIN_DVEC3:
-      return gsk_sl_type_ref (gsk_sl_type_get_vector (GSK_SL_DOUBLE, 3));
-    case GSK_SL_BUILTIN_DVEC4:
-      return gsk_sl_type_ref (gsk_sl_type_get_vector (GSK_SL_DOUBLE, 4));
-    case GSK_SL_BUILTIN_MAT2:
-      return gsk_sl_type_ref (gsk_sl_type_get_matrix (GSK_SL_FLOAT, 2, 2));
-    case GSK_SL_BUILTIN_MAT2X3:
-      return gsk_sl_type_ref (gsk_sl_type_get_matrix (GSK_SL_FLOAT, 2, 3));
-    case GSK_SL_BUILTIN_MAT2X4:
-      return gsk_sl_type_ref (gsk_sl_type_get_matrix (GSK_SL_FLOAT, 2, 4));
-    case GSK_SL_BUILTIN_MAT3X2:
-      return gsk_sl_type_ref (gsk_sl_type_get_matrix (GSK_SL_FLOAT, 3, 2));
-    case GSK_SL_BUILTIN_MAT3:
-      return gsk_sl_type_ref (gsk_sl_type_get_matrix (GSK_SL_FLOAT, 3, 3));
-    case GSK_SL_BUILTIN_MAT3X4:
-      return gsk_sl_type_ref (gsk_sl_type_get_matrix (GSK_SL_FLOAT, 3, 4));
-    case GSK_SL_BUILTIN_MAT4X2:
-      return gsk_sl_type_ref (gsk_sl_type_get_matrix (GSK_SL_FLOAT, 4, 2));
-    case GSK_SL_BUILTIN_MAT4X3:
-      return gsk_sl_type_ref (gsk_sl_type_get_matrix (GSK_SL_FLOAT, 4, 3));
-    case GSK_SL_BUILTIN_MAT4:
-      return gsk_sl_type_ref (gsk_sl_type_get_matrix (GSK_SL_FLOAT, 4, 4));
-    case GSK_SL_BUILTIN_DMAT2:
-      return gsk_sl_type_ref (gsk_sl_type_get_matrix (GSK_SL_DOUBLE, 2, 2));
-    case GSK_SL_BUILTIN_DMAT2X3:
-      return gsk_sl_type_ref (gsk_sl_type_get_matrix (GSK_SL_DOUBLE, 2, 3));
-    case GSK_SL_BUILTIN_DMAT2X4:
-      return gsk_sl_type_ref (gsk_sl_type_get_matrix (GSK_SL_DOUBLE, 2, 4));
-    case GSK_SL_BUILTIN_DMAT3X2:
-      return gsk_sl_type_ref (gsk_sl_type_get_matrix (GSK_SL_DOUBLE, 3, 2));
-    case GSK_SL_BUILTIN_DMAT3:
-      return gsk_sl_type_ref (gsk_sl_type_get_matrix (GSK_SL_DOUBLE, 3, 3));
-    case GSK_SL_BUILTIN_DMAT3X4:
-      return gsk_sl_type_ref (gsk_sl_type_get_matrix (GSK_SL_DOUBLE, 3, 4));
-    case GSK_SL_BUILTIN_DMAT4X2:
-      return gsk_sl_type_ref (gsk_sl_type_get_matrix (GSK_SL_DOUBLE, 4, 2));
-    case GSK_SL_BUILTIN_DMAT4X3:
-      return gsk_sl_type_ref (gsk_sl_type_get_matrix (GSK_SL_DOUBLE, 4, 3));
-    case GSK_SL_BUILTIN_DMAT4:
-      return gsk_sl_type_ref (gsk_sl_type_get_matrix (GSK_SL_DOUBLE, 4, 4));
-    default:
-      g_assert_not_reached ();
-      return gsk_sl_type_get_void ();
-    }
-}
-
-GskSlType *
 gsk_sl_type_get_matching (GskSlType       *type,
                           GskSlScalarType  scalar)
 {
diff --git a/gsk/gsksltypeprivate.h b/gsk/gsksltypeprivate.h
index dae1059..5c5d765 100644
--- a/gsk/gsksltypeprivate.h
+++ b/gsk/gsksltypeprivate.h
@@ -38,7 +38,6 @@ GskSlType *             gsk_sl_type_get_vector                  (GskSlScalarType
 GskSlType *             gsk_sl_type_get_matrix                  (GskSlScalarType      scalar,
                                                                  guint                columns,
                                                                  guint                rows);
-GskSlType *             gsk_sl_type_get_builtin                 (GskSlBuiltinType     builtin);
 GskSlType *             gsk_sl_type_get_matching                (GskSlType           *type,
                                                                  GskSlScalarType      scalar);
 
diff --git a/gsk/gsksltypesprivate.h b/gsk/gsksltypesprivate.h
index baadc3b..b8e84cf 100644
--- a/gsk/gsksltypesprivate.h
+++ b/gsk/gsksltypesprivate.h
@@ -53,48 +53,6 @@ typedef enum {
 } GskSlScalarType;
 
 typedef enum {
-  GSK_SL_BUILTIN_VOID,
-  GSK_SL_BUILTIN_FLOAT,
-  GSK_SL_BUILTIN_DOUBLE,
-  GSK_SL_BUILTIN_INT,
-  GSK_SL_BUILTIN_UINT,
-  GSK_SL_BUILTIN_BOOL,
-  GSK_SL_BUILTIN_BVEC2,
-  GSK_SL_BUILTIN_BVEC3,
-  GSK_SL_BUILTIN_BVEC4,
-  GSK_SL_BUILTIN_IVEC2,
-  GSK_SL_BUILTIN_IVEC3,
-  GSK_SL_BUILTIN_IVEC4,
-  GSK_SL_BUILTIN_UVEC2,
-  GSK_SL_BUILTIN_UVEC3,
-  GSK_SL_BUILTIN_UVEC4,
-  GSK_SL_BUILTIN_VEC2,
-  GSK_SL_BUILTIN_VEC3,
-  GSK_SL_BUILTIN_VEC4,
-  GSK_SL_BUILTIN_DVEC2,
-  GSK_SL_BUILTIN_DVEC3,
-  GSK_SL_BUILTIN_DVEC4,
-  GSK_SL_BUILTIN_MAT2,
-  GSK_SL_BUILTIN_MAT2X3,
-  GSK_SL_BUILTIN_MAT2X4,
-  GSK_SL_BUILTIN_MAT3X2,
-  GSK_SL_BUILTIN_MAT3,
-  GSK_SL_BUILTIN_MAT3X4,
-  GSK_SL_BUILTIN_MAT4X2,
-  GSK_SL_BUILTIN_MAT4X3,
-  GSK_SL_BUILTIN_MAT4,
-  GSK_SL_BUILTIN_DMAT2,
-  GSK_SL_BUILTIN_DMAT2X3,
-  GSK_SL_BUILTIN_DMAT2X4,
-  GSK_SL_BUILTIN_DMAT3X2,
-  GSK_SL_BUILTIN_DMAT3,
-  GSK_SL_BUILTIN_DMAT3X4,
-  GSK_SL_BUILTIN_DMAT4X2,
-  GSK_SL_BUILTIN_DMAT4X3,
-  GSK_SL_BUILTIN_DMAT4
-} GskSlBuiltinType;
-
-typedef enum {
   GSK_SL_STORAGE_DEFAULT,
 
   GSK_SL_STORAGE_GLOBAL,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]