[gtk+/wip/otte/shader: 190/203] gsksl: Get rid of pointer types



commit 7dbc902a548d3c45a8ad4e85b02d9c700df0cadb
Author: Benjamin Otte <otte redhat com>
Date:   Mon Oct 9 00:35:46 2017 +0200

    gsksl: Get rid of pointer types
    
    Store quantifier and real type in GskSlVariable instead.
    Make gsk_spv_writer_get_id_for_pointer_type() take type and storage
    class.
    And generate writer opcodes using 2 arguments: Type and storage class.

 gsk/gskslexpression.c              |    3 +-
 gsk/gskslfunction.c                |    6 +-
 gsk/gskslpointertype.c             |  121 ---------
 gsk/gskslpointertypeprivate.h      |   47 ----
 gsk/gskslprogram.c                 |   10 +-
 gsk/gskslstatement.c               |    7 +-
 gsk/gskslvariable.c                |   50 ++--
 gsk/gskslvariableprivate.h         |    6 +-
 gsk/gskspvwriter.c                 |   58 ++++-
 gsk/gskspvwritergeneratedprivate.h |  506 ++++++++++++++++++------------------
 gsk/gskspvwriterprivate.h          |    3 +-
 gsk/meson.build                    |    1 -
 gsk/spirv.js                       |   37 ++--
 13 files changed, 355 insertions(+), 500 deletions(-)
---
diff --git a/gsk/gskslexpression.c b/gsk/gskslexpression.c
index 6609283..790c67c 100644
--- a/gsk/gskslexpression.c
+++ b/gsk/gskslexpression.c
@@ -21,9 +21,8 @@
 #include "gskslexpressionprivate.h"
 
 #include "gskslbinaryprivate.h"
-#include "gskslpreprocessorprivate.h"
 #include "gskslfunctionprivate.h"
-#include "gskslpointertypeprivate.h"
+#include "gskslpreprocessorprivate.h"
 #include "gskslprinterprivate.h"
 #include "gskslscopeprivate.h"
 #include "gsksltokenizerprivate.h"
diff --git a/gsk/gskslfunction.c b/gsk/gskslfunction.c
index c1c0d2b..249ba1d 100644
--- a/gsk/gskslfunction.c
+++ b/gsk/gskslfunction.c
@@ -22,7 +22,6 @@
 
 #include "gskslnativefunctionprivate.h"
 #include "gskslstatementprivate.h"
-#include "gskslpointertypeprivate.h"
 #include "gskslpreprocessorprivate.h"
 #include "gskslprinterprivate.h"
 #include "gskslqualifierprivate.h"
@@ -541,7 +540,6 @@ gsk_sl_function_new_parse (GskSlScope        *scope,
           token = gsk_sl_preprocessor_get (preproc);
           if (gsk_sl_token_is (token, GSK_SL_TOKEN_IDENTIFIER))
             {
-              GskSlPointerType *pointer_type;
               guint i;
 
               if (gsk_sl_scope_lookup_variable (function->scope, token->str))
@@ -558,9 +556,7 @@ gsk_sl_function_new_parse (GskSlScope        *scope,
                     gsk_sl_preprocessor_warn (preproc, SHADOW, "Function argument \"%s\" shadows global 
variable of same name.", token->str);
                 }
 
-              pointer_type = gsk_sl_pointer_type_new (type, &qualifier);
-              variable = gsk_sl_variable_new (pointer_type, g_strdup (token->str), NULL);
-              gsk_sl_pointer_type_unref (pointer_type);
+              variable = gsk_sl_variable_new (token->str, type, &qualifier, NULL);
               g_ptr_array_add (arguments, variable);
               
               gsk_sl_scope_add_variable (function->scope, variable);
diff --git a/gsk/gskslprogram.c b/gsk/gskslprogram.c
index 6027d84..4d4eb2b 100644
--- a/gsk/gskslprogram.c
+++ b/gsk/gskslprogram.c
@@ -22,7 +22,6 @@
 
 #include "gskslexpressionprivate.h"
 #include "gskslfunctionprivate.h"
-#include "gskslpointertypeprivate.h"
 #include "gskslpreprocessorprivate.h"
 #include "gskslprinterprivate.h"
 #include "gskslscopeprivate.h"
@@ -80,7 +79,6 @@ gsk_sl_program_parse_variable (GskSlProgram         *program,
   GskSlVariable *variable;
   const GskSlToken *token;
   GskSlValue *value = NULL;
-  GskSlPointerType *pointer_type;
 
   token = gsk_sl_preprocessor_get (preproc);
   if (gsk_sl_token_is (token, GSK_SL_TOKEN_EQUAL))
@@ -126,9 +124,7 @@ gsk_sl_program_parse_variable (GskSlProgram         *program,
     }
   gsk_sl_preprocessor_consume (preproc, NULL);
 
-  pointer_type = gsk_sl_pointer_type_new (type, qualifier);
-  variable = gsk_sl_variable_new (pointer_type, g_strdup (name), value);
-  gsk_sl_pointer_type_unref (pointer_type);
+  variable = gsk_sl_variable_new (name, type, qualifier, value);
       
   program->variables = g_slist_append (program->variables, variable);
   gsk_sl_scope_add_variable (scope, variable);
@@ -151,9 +147,7 @@ gsk_sl_program_parse_declaration (GskSlProgram      *program,
   token = gsk_sl_preprocessor_get (preproc);
   if (gsk_sl_token_is (token, GSK_SL_TOKEN_SEMICOLON))
     {
-      GskSlPointerType *ptype = gsk_sl_pointer_type_new (type, &qualifier);
-      GskSlVariable *variable = gsk_sl_variable_new (ptype, NULL, NULL);
-      gsk_sl_pointer_type_unref (ptype);
+      GskSlVariable *variable = gsk_sl_variable_new (NULL, type, &qualifier, NULL);
       program->variables = g_slist_append (program->variables, variable);
       gsk_sl_preprocessor_consume (preproc, program);
       gsk_sl_type_unref (type);
diff --git a/gsk/gskslstatement.c b/gsk/gskslstatement.c
index 1114beb..9119592 100644
--- a/gsk/gskslstatement.c
+++ b/gsk/gskslstatement.c
@@ -22,7 +22,6 @@
 
 #include "gskslexpressionprivate.h"
 #include "gskslfunctionprivate.h"
-#include "gskslpointertypeprivate.h"
 #include "gskslpreprocessorprivate.h"
 #include "gskslprinterprivate.h"
 #include "gskslscopeprivate.h"
@@ -510,7 +509,6 @@ gsk_sl_statement_parse_declaration (GskSlScope           *scope,
                                     GskSlType            *type)
 {
   GskSlStatementDeclaration *declaration;
-  GskSlPointerType *pointer_type;
   GskSlValue *value = NULL;
   const GskSlToken *token;
   char *name;
@@ -556,9 +554,8 @@ gsk_sl_statement_parse_declaration (GskSlScope           *scope,
       value = NULL;
     }
 
-  pointer_type = gsk_sl_pointer_type_new (type, qualifier);
-  declaration->variable = gsk_sl_variable_new (pointer_type, name, value);
-  gsk_sl_pointer_type_unref (pointer_type);
+  declaration->variable = gsk_sl_variable_new (name, type, qualifier, value);
+  g_free (name);
   gsk_sl_scope_add_variable (scope, declaration->variable);
 
   return (GskSlStatement *) declaration;
diff --git a/gsk/gskslvariable.c b/gsk/gskslvariable.c
index bf5bd52..aed2d21 100644
--- a/gsk/gskslvariable.c
+++ b/gsk/gskslvariable.c
@@ -20,7 +20,6 @@
 
 #include "gskslvariableprivate.h"
 
-#include "gskslpointertypeprivate.h"
 #include "gskslprinterprivate.h"
 #include "gskslqualifierprivate.h"
 #include "gsksltypeprivate.h"
@@ -30,24 +29,27 @@
 struct _GskSlVariable {
   guint ref_count;
 
-  GskSlPointerType *type;
   char *name;
+  GskSlType *type;
+  GskSlQualifier qualifier;
   GskSlValue *initial_value;
 };
 
 GskSlVariable *
-gsk_sl_variable_new (GskSlPointerType *type,
-                     char             *name,
-                     GskSlValue       *initial_value)
+gsk_sl_variable_new (const char           *name,
+                     GskSlType            *type,
+                     const GskSlQualifier *qualifier,
+                     GskSlValue           *initial_value)
 {
   GskSlVariable *variable;
 
-  g_return_val_if_fail (initial_value == NULL || gsk_sl_type_equal (gsk_sl_pointer_type_get_type (type), 
gsk_sl_value_get_type (initial_value)), NULL);
+  g_return_val_if_fail (initial_value == NULL || gsk_sl_type_equal (type, gsk_sl_value_get_type 
(initial_value)), NULL);
   variable = g_slice_new0 (GskSlVariable);
 
   variable->ref_count = 1;
-  variable->type = gsk_sl_pointer_type_ref (type);
-  variable->name = name;
+  variable->type = gsk_sl_type_ref (type);
+  variable->qualifier = *qualifier;
+  variable->name = g_strdup (name);
   variable->initial_value = initial_value;
 
   return variable;
@@ -75,7 +77,7 @@ gsk_sl_variable_unref (GskSlVariable *variable)
 
   if (variable->initial_value)
     gsk_sl_value_free (variable->initial_value);
-  gsk_sl_pointer_type_unref (variable->type);
+  gsk_sl_type_unref (variable->type);
   g_free (variable->name);
 
   g_slice_free (GskSlVariable, variable);
@@ -85,25 +87,22 @@ void
 gsk_sl_variable_print (const GskSlVariable *variable,
                        GskSlPrinter        *printer)
 {
-  GskSlType *type;
-
-  if (gsk_sl_qualifier_print (gsk_sl_pointer_type_get_qualifier (variable->type), printer))
+  if (gsk_sl_qualifier_print (&variable->qualifier, printer))
     gsk_sl_printer_append (printer, " ");
-  type = gsk_sl_pointer_type_get_type (variable->type);
-  gsk_sl_printer_append (printer, gsk_sl_type_get_name (type));
-  if (gsk_sl_type_is_block (type))
+  gsk_sl_printer_append (printer, gsk_sl_type_get_name (variable->type));
+  if (gsk_sl_type_is_block (variable->type))
     {
       guint i, n;
 
       gsk_sl_printer_append (printer, " {");
       gsk_sl_printer_push_indentation (printer);
-      n = gsk_sl_type_get_n_members (type);
+      n = gsk_sl_type_get_n_members (variable->type);
       for (i = 0; i < n; i++)
         {
           gsk_sl_printer_newline (printer);
-          gsk_sl_printer_append (printer, gsk_sl_type_get_name (gsk_sl_type_get_member_type (type, i)));
+          gsk_sl_printer_append (printer, gsk_sl_type_get_name (gsk_sl_type_get_member_type (variable->type, 
i)));
           gsk_sl_printer_append (printer, " ");
-          gsk_sl_printer_append (printer, gsk_sl_type_get_member_name (type, i));
+          gsk_sl_printer_append (printer, gsk_sl_type_get_member_name (variable->type, i));
           gsk_sl_printer_append (printer, ";");
         }
       gsk_sl_printer_pop_indentation (printer);
@@ -120,12 +119,6 @@ gsk_sl_variable_print (const GskSlVariable *variable,
 GskSlType *
 gsk_sl_variable_get_type (const GskSlVariable *variable)
 {
-  return gsk_sl_pointer_type_get_type (variable->type);
-}
-
-GskSlPointerType *
-gsk_sl_variable_get_pointer_type (const GskSlVariable *variable)
-{
   return variable->type;
 }
 
@@ -144,7 +137,7 @@ gsk_sl_variable_get_initial_value (const GskSlVariable *variable)
 gboolean
 gsk_sl_variable_is_constant (const GskSlVariable *variable)
 {
-  return gsk_sl_qualifier_is_constant (gsk_sl_pointer_type_get_qualifier (variable->type));
+  return gsk_sl_qualifier_is_constant (&variable->qualifier);
 }
 
 guint32
@@ -154,12 +147,12 @@ gsk_sl_variable_write_spv (const GskSlVariable *variable,
   guint32 result_id;
   GskSlQualifierLocation location;
   
-  location = gsk_sl_qualifier_get_location (gsk_sl_pointer_type_get_qualifier (variable->type));
+  location = gsk_sl_qualifier_get_location (&variable->qualifier);
 
   if (location == GSK_SL_QUALIFIER_PARAMETER)
     {
       result_id = gsk_spv_writer_function_parameter (writer,
-                                                     gsk_sl_pointer_type_get_type (variable->type));
+                                                     variable->type);
     }
   else
     {
@@ -173,7 +166,8 @@ gsk_sl_variable_write_spv (const GskSlVariable *variable,
       result_id = gsk_spv_writer_variable (writer,
                                            location == GSK_SL_QUALIFIER_GLOBAL ? 
GSK_SPV_WRITER_SECTION_DEFINE : GSK_SPV_WRITER_SECTION_DECLARE,
                                            variable->type,
-                                           gsk_sl_qualifier_get_storage_class 
(gsk_sl_pointer_type_get_qualifier (variable->type)),
+                                           gsk_sl_qualifier_get_storage_class (&variable->qualifier),
+                                           gsk_sl_qualifier_get_storage_class (&variable->qualifier),
                                            value_id);
     }
 
diff --git a/gsk/gskslvariableprivate.h b/gsk/gskslvariableprivate.h
index 917f47b..0c55aaa 100644
--- a/gsk/gskslvariableprivate.h
+++ b/gsk/gskslvariableprivate.h
@@ -25,8 +25,9 @@
 
 G_BEGIN_DECLS
 
-GskSlVariable *         gsk_sl_variable_new                     (GskSlPointerType       *type,
-                                                                 char                   *name,
+GskSlVariable *         gsk_sl_variable_new                     (const char             *name,
+                                                                 GskSlType              *type,
+                                                                 const GskSlQualifier   *qualifier,
                                                                  GskSlValue             *initial_value);
 
 GskSlVariable *         gsk_sl_variable_ref                     (GskSlVariable          *variable);
@@ -36,7 +37,6 @@ void                    gsk_sl_variable_print                   (const GskSlVari
                                                                  GskSlPrinter           *printer);
 
 GskSlType *             gsk_sl_variable_get_type                (const GskSlVariable    *variable);
-GskSlPointerType *      gsk_sl_variable_get_pointer_type        (const GskSlVariable    *variable);
 const char *            gsk_sl_variable_get_name                (const GskSlVariable    *variable);
 const GskSlValue *      gsk_sl_variable_get_initial_value       (const GskSlVariable    *variable);
 gboolean                gsk_sl_variable_is_constant             (const GskSlVariable    *variable);
diff --git a/gsk/gskspvwriter.c b/gsk/gskspvwriter.c
index c1cb7ac..37b7f86 100644
--- a/gsk/gskspvwriter.c
+++ b/gsk/gskspvwriter.c
@@ -21,11 +21,18 @@
 #include "gskspvwriterprivate.h"
 
 #include "gskslfunctionprivate.h"
-#include "gskslpointertypeprivate.h"
 #include "gsksltypeprivate.h"
 #include "gskslvalueprivate.h"
 #include "gskslvariableprivate.h"
 
+typedef struct _GskSpvPointerType GskSpvPointerType;
+
+struct _GskSpvPointerType
+{
+  GskSlType *type;
+  GskSpvStorageClass storage;
+};
+
 struct _GskSpvCodeBlock
 {
   GArray *code[GSK_SPV_WRITER_N_BLOCK_SECTIONS];
@@ -75,6 +82,38 @@ gsk_spv_code_block_free (GskSpvCodeBlock *block)
   g_slice_free (GskSpvCodeBlock, block);
 }
 
+static gboolean
+pointer_type_equal (gconstpointer a,
+                    gconstpointer b)
+{
+  const GskSpvPointerType *typea = a;
+  const GskSpvPointerType *typeb = b;
+
+  if (!gsk_sl_type_equal (typea->type, typeb->type))
+    return FALSE;
+
+  return typea->storage == typeb->storage;
+}
+
+static guint
+pointer_type_hash (gconstpointer t)
+{
+  const GskSpvPointerType *type = t;
+
+  return gsk_sl_type_hash (type->type)
+       ^ type->storage;
+}
+
+static void
+pointer_type_free (gpointer data)
+{
+  GskSpvPointerType *pointer_type = data;
+
+  gsk_sl_type_unref (pointer_type->type);
+
+  g_free (pointer_type);
+}
+
 GskSpvWriter *
 gsk_spv_writer_new (void)
 {
@@ -91,8 +130,8 @@ gsk_spv_writer_new (void)
 
   writer->types = g_hash_table_new_full (gsk_sl_type_hash, gsk_sl_type_equal,
                                          (GDestroyNotify) gsk_sl_type_unref, NULL);
-  writer->pointer_types = g_hash_table_new_full (gsk_sl_pointer_type_hash, gsk_sl_pointer_type_equal,
-                                                 (GDestroyNotify) gsk_sl_pointer_type_unref, NULL);
+  writer->pointer_types = g_hash_table_new_full (pointer_type_hash, pointer_type_equal,
+                                                 pointer_type_free, NULL);
   writer->values = g_hash_table_new_full (gsk_sl_value_hash, gsk_sl_value_equal,
                                           (GDestroyNotify) gsk_sl_value_free, NULL);
   writer->variables = g_hash_table_new_full (g_direct_hash, g_direct_equal,
@@ -280,16 +319,21 @@ gsk_spv_writer_get_id_for_type (GskSpvWriter *writer,
 
 guint32
 gsk_spv_writer_get_id_for_pointer_type (GskSpvWriter       *writer,
-                                        GskSlPointerType   *type)
+                                        GskSlType          *type,
+                                        GskSpvStorageClass  storage)
 {
+  GskSpvPointerType pointer_type = { type, storage };
   guint32 result;
 
-  result = GPOINTER_TO_UINT (g_hash_table_lookup (writer->pointer_types, type));
+  result = GPOINTER_TO_UINT (g_hash_table_lookup (writer->pointer_types, &pointer_type));
   if (result != 0)
     return result;
 
-  result = gsk_sl_pointer_type_write_spv (type, writer);
-  g_hash_table_insert (writer->pointer_types, gsk_sl_pointer_type_ref (type), GUINT_TO_POINTER (result));
+  result = gsk_spv_writer_type_pointer (writer, 
+                                        storage,
+                                        gsk_spv_writer_get_id_for_type (writer, type));
+  gsk_sl_type_ref (type);
+  g_hash_table_insert (writer->pointer_types, g_memdup (&pointer_type, sizeof (GskSpvPointerType)), 
GUINT_TO_POINTER (result));
   return result;
 }
 
diff --git a/gsk/gskspvwritergeneratedprivate.h b/gsk/gskspvwritergeneratedprivate.h
index 57795a1..3fdfc33 100644
--- a/gsk/gskspvwritergeneratedprivate.h
+++ b/gsk/gskspvwritergeneratedprivate.h
@@ -50,7 +50,7 @@ gsk_spv_writer_nop (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_undef (GskSpvWriter *writer,
                       GskSpvWriterSection section,
-                      GskSlType * result_type)
+                      GskSlType *result_type)
 {
   GArray *bytes = gsk_spv_writer_get_bytes (writer, section);
   guint32 result_type_id = gsk_spv_writer_get_id_for_type (writer, result_type);
@@ -68,7 +68,7 @@ gsk_spv_writer_undef (GskSpvWriter *writer,
 static inline void
 gsk_spv_writer_source_continued (GskSpvWriter *writer,
                                  GskSpvWriterSection section,
-                                 const char * continued_source)
+                                 const char *continued_source)
 {
   GArray *bytes = gsk_spv_writer_get_bytes (writer, section);
   guint start_index = bytes->len;
@@ -83,7 +83,7 @@ gsk_spv_writer_source (GskSpvWriter *writer,
                        GskSpvSourceLanguage source_language,
                        guint32 version,
                        guint32 opt_file,
-                       const char * opt_source)
+                       const char *opt_source)
 {
   GArray *bytes = gsk_spv_writer_get_bytes (writer, GSK_SPV_WRITER_SECTION_DEBUG);
   guint start_index = bytes->len;
@@ -100,7 +100,7 @@ gsk_spv_writer_source (GskSpvWriter *writer,
 
 static inline void
 gsk_spv_writer_source_extension (GskSpvWriter *writer,
-                                 const char * extension)
+                                 const char *extension)
 {
   GArray *bytes = gsk_spv_writer_get_bytes (writer, GSK_SPV_WRITER_SECTION_DEBUG);
   guint start_index = bytes->len;
@@ -113,7 +113,7 @@ gsk_spv_writer_source_extension (GskSpvWriter *writer,
 static inline void
 gsk_spv_writer_name (GskSpvWriter *writer,
                      guint32 target,
-                     const char * name)
+                     const char *name)
 {
   GArray *bytes = gsk_spv_writer_get_bytes (writer, GSK_SPV_WRITER_SECTION_DEBUG);
   guint start_index = bytes->len;
@@ -128,7 +128,7 @@ static inline void
 gsk_spv_writer_member_name (GskSpvWriter *writer,
                             guint32 type,
                             guint32 member,
-                            const char * name)
+                            const char *name)
 {
   GArray *bytes = gsk_spv_writer_get_bytes (writer, GSK_SPV_WRITER_SECTION_DEBUG);
   guint start_index = bytes->len;
@@ -143,7 +143,7 @@ gsk_spv_writer_member_name (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_string (GskSpvWriter *writer,
                        GskSpvWriterSection section,
-                       const char * string)
+                       const char *string)
 {
   GArray *bytes = gsk_spv_writer_get_bytes (writer, section);
   guint32 result_id = gsk_spv_writer_make_id (writer);
@@ -176,7 +176,7 @@ gsk_spv_writer_line (GskSpvWriter *writer,
 
 static inline void
 gsk_spv_writer_extension (GskSpvWriter *writer,
-                          const char * name)
+                          const char *name)
 {
   GArray *bytes = gsk_spv_writer_get_bytes (writer, GSK_SPV_WRITER_SECTION_HEADER);
   guint start_index = bytes->len;
@@ -188,7 +188,7 @@ gsk_spv_writer_extension (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_ext_inst_import (GskSpvWriter *writer,
-                                const char * name)
+                                const char *name)
 {
   GArray *bytes = gsk_spv_writer_get_bytes (writer, GSK_SPV_WRITER_SECTION_HEADER);
   guint32 result_id = gsk_spv_writer_make_id (writer);
@@ -205,7 +205,7 @@ gsk_spv_writer_ext_inst_import (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_ext_inst (GskSpvWriter *writer,
                          GskSpvWriterSection section,
-                         GskSlType * result_type,
+                         GskSlType *result_type,
                          guint32 set,
                          guint32 instruction,
                          guint32 *operands,
@@ -245,7 +245,7 @@ static inline void
 gsk_spv_writer_entry_point (GskSpvWriter *writer,
                             GskSpvExecutionModel execution_model,
                             guint32 entry_point,
-                            const char * name,
+                            const char *name,
                             guint32 *interfaces,
                             gsize n_interfaces)
 {
@@ -497,7 +497,7 @@ gsk_spv_writer_type_struct (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_type_opaque (GskSpvWriter *writer,
-                            const char * name)
+                            const char *name)
 {
   GArray *bytes = gsk_spv_writer_get_bytes (writer, GSK_SPV_WRITER_SECTION_DEFINE);
   guint32 result_id = gsk_spv_writer_make_id (writer);
@@ -636,7 +636,7 @@ gsk_spv_writer_type_forward_pointer (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_constant_true (GskSpvWriter *writer,
-                              GskSlType * result_type)
+                              GskSlType *result_type)
 {
   GArray *bytes = gsk_spv_writer_get_bytes (writer, GSK_SPV_WRITER_SECTION_DEFINE);
   guint32 result_type_id = gsk_spv_writer_get_id_for_type (writer, result_type);
@@ -653,7 +653,7 @@ gsk_spv_writer_constant_true (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_constant_false (GskSpvWriter *writer,
-                               GskSlType * result_type)
+                               GskSlType *result_type)
 {
   GArray *bytes = gsk_spv_writer_get_bytes (writer, GSK_SPV_WRITER_SECTION_DEFINE);
   guint32 result_type_id = gsk_spv_writer_get_id_for_type (writer, result_type);
@@ -670,7 +670,7 @@ gsk_spv_writer_constant_false (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_constant (GskSpvWriter *writer,
-                         GskSlType * result_type,
+                         GskSlType *result_type,
                          guint32 *values,
                          gsize n_values)
 {
@@ -690,7 +690,7 @@ gsk_spv_writer_constant (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_constant_composite (GskSpvWriter *writer,
-                                   GskSlType * result_type,
+                                   GskSlType *result_type,
                                    guint32 *constituents,
                                    gsize n_constituents)
 {
@@ -710,7 +710,7 @@ gsk_spv_writer_constant_composite (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_constant_sampler (GskSpvWriter *writer,
-                                 GskSlType * result_type,
+                                 GskSlType *result_type,
                                  GskSpvSamplerAddressingMode sampler_addressing_mode,
                                  guint32 param,
                                  GskSpvSamplerFilterMode sampler_filter_mode)
@@ -733,7 +733,7 @@ gsk_spv_writer_constant_sampler (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_constant_null (GskSpvWriter *writer,
-                              GskSlType * result_type)
+                              GskSlType *result_type)
 {
   GArray *bytes = gsk_spv_writer_get_bytes (writer, GSK_SPV_WRITER_SECTION_DEFINE);
   guint32 result_type_id = gsk_spv_writer_get_id_for_type (writer, result_type);
@@ -750,7 +750,7 @@ gsk_spv_writer_constant_null (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_spec_constant_true (GskSpvWriter *writer,
-                                   GskSlType * result_type)
+                                   GskSlType *result_type)
 {
   GArray *bytes = gsk_spv_writer_get_bytes (writer, GSK_SPV_WRITER_SECTION_DEFINE);
   guint32 result_type_id = gsk_spv_writer_get_id_for_type (writer, result_type);
@@ -767,7 +767,7 @@ gsk_spv_writer_spec_constant_true (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_spec_constant_false (GskSpvWriter *writer,
-                                    GskSlType * result_type)
+                                    GskSlType *result_type)
 {
   GArray *bytes = gsk_spv_writer_get_bytes (writer, GSK_SPV_WRITER_SECTION_DEFINE);
   guint32 result_type_id = gsk_spv_writer_get_id_for_type (writer, result_type);
@@ -784,7 +784,7 @@ gsk_spv_writer_spec_constant_false (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_spec_constant (GskSpvWriter *writer,
-                              GskSlType * result_type,
+                              GskSlType *result_type,
                               guint32 *values,
                               gsize n_values)
 {
@@ -804,7 +804,7 @@ gsk_spv_writer_spec_constant (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_spec_constant_composite (GskSpvWriter *writer,
-                                        GskSlType * result_type,
+                                        GskSlType *result_type,
                                         guint32 *constituents,
                                         gsize n_constituents)
 {
@@ -824,7 +824,7 @@ gsk_spv_writer_spec_constant_composite (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_spec_constant_op (GskSpvWriter *writer,
-                                 GskSlType * result_type,
+                                 GskSlType *result_type,
                                  guint32 *opcodes,
                                  gsize n_opcodes)
 {
@@ -844,7 +844,7 @@ gsk_spv_writer_spec_constant_op (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_function (GskSpvWriter *writer,
-                         GskSlType * result_type,
+                         GskSlType *result_type,
                          GskSpvFunctionControl function_control,
                          guint32 function_type)
 {
@@ -865,7 +865,7 @@ gsk_spv_writer_function (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_function_parameter (GskSpvWriter *writer,
-                                   GskSlType * result_type)
+                                   GskSlType *result_type)
 {
   GArray *bytes = gsk_spv_writer_get_bytes (writer, GSK_SPV_WRITER_SECTION_DECLARE);
   guint32 result_type_id = gsk_spv_writer_get_id_for_type (writer, result_type);
@@ -892,7 +892,7 @@ gsk_spv_writer_function_end (GskSpvWriter *writer)
 
 static inline guint32
 gsk_spv_writer_function_call (GskSpvWriter *writer,
-                              GskSlType * result_type,
+                              GskSlType *result_type,
                               guint32 function,
                               guint32 *argument_0s,
                               gsize n_argument_0s)
@@ -915,12 +915,12 @@ gsk_spv_writer_function_call (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_variable (GskSpvWriter *writer,
                          GskSpvWriterSection section,
-                         GskSlPointerType * result_type,
+                         GskSlType *result_type, GskSpvStorageClass result_type_storage,
                          GskSpvStorageClass storage_class,
                          guint32 opt_initializer)
 {
   GArray *bytes = gsk_spv_writer_get_bytes (writer, section);
-  guint32 result_type_id = gsk_spv_writer_get_id_for_pointer_type (writer, result_type);
+  guint32 result_type_id = gsk_spv_writer_get_id_for_pointer_type (writer, result_type, result_type_storage);
   guint32 result_id = gsk_spv_writer_make_id (writer);
   guint start_index = bytes->len;
 
@@ -937,13 +937,13 @@ gsk_spv_writer_variable (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_image_texel_pointer (GskSpvWriter *writer,
-                                    GskSlPointerType * result_type,
+                                    GskSlType *result_type, GskSpvStorageClass result_type_storage,
                                     guint32 image,
                                     guint32 coordinate,
                                     guint32 sample)
 {
   GArray *bytes = gsk_spv_writer_get_bytes (writer, GSK_SPV_WRITER_SECTION_CODE);
-  guint32 result_type_id = gsk_spv_writer_get_id_for_pointer_type (writer, result_type);
+  guint32 result_type_id = gsk_spv_writer_get_id_for_pointer_type (writer, result_type, result_type_storage);
   guint32 result_id = gsk_spv_writer_make_id (writer);
   guint start_index = bytes->len;
 
@@ -960,7 +960,7 @@ gsk_spv_writer_image_texel_pointer (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_load (GskSpvWriter *writer,
-                     GskSlType * result_type,
+                     GskSlType *result_type,
                      guint32 pointer,
                      GskSpvMemoryAccess opt_memory_access)
 {
@@ -1035,13 +1035,13 @@ gsk_spv_writer_copy_memory_sized (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_access_chain (GskSpvWriter *writer,
-                             GskSlPointerType * result_type,
+                             GskSlType *result_type, GskSpvStorageClass result_type_storage,
                              guint32 base,
                              guint32 *indexes,
                              gsize n_indexes)
 {
   GArray *bytes = gsk_spv_writer_get_bytes (writer, GSK_SPV_WRITER_SECTION_CODE);
-  guint32 result_type_id = gsk_spv_writer_get_id_for_pointer_type (writer, result_type);
+  guint32 result_type_id = gsk_spv_writer_get_id_for_pointer_type (writer, result_type, result_type_storage);
   guint32 result_id = gsk_spv_writer_make_id (writer);
   guint start_index = bytes->len;
 
@@ -1057,13 +1057,13 @@ gsk_spv_writer_access_chain (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_in_bounds_access_chain (GskSpvWriter *writer,
-                                       GskSlPointerType * result_type,
+                                       GskSlType *result_type, GskSpvStorageClass result_type_storage,
                                        guint32 base,
                                        guint32 *indexes,
                                        gsize n_indexes)
 {
   GArray *bytes = gsk_spv_writer_get_bytes (writer, GSK_SPV_WRITER_SECTION_CODE);
-  guint32 result_type_id = gsk_spv_writer_get_id_for_pointer_type (writer, result_type);
+  guint32 result_type_id = gsk_spv_writer_get_id_for_pointer_type (writer, result_type, result_type_storage);
   guint32 result_id = gsk_spv_writer_make_id (writer);
   guint start_index = bytes->len;
 
@@ -1079,7 +1079,7 @@ gsk_spv_writer_in_bounds_access_chain (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_ptr_access_chain (GskSpvWriter *writer,
-                                 GskSlType * result_type,
+                                 GskSlType *result_type,
                                  guint32 base,
                                  guint32 element,
                                  guint32 *indexes,
@@ -1103,7 +1103,7 @@ gsk_spv_writer_ptr_access_chain (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_array_length (GskSpvWriter *writer,
-                             GskSlType * result_type,
+                             GskSlType *result_type,
                              guint32 structure,
                              guint32 array_member)
 {
@@ -1125,7 +1125,7 @@ gsk_spv_writer_array_length (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_generic_ptr_mem_semantics (GskSpvWriter *writer,
                                           GskSpvWriterSection section,
-                                          GskSlType * result_type,
+                                          GskSlType *result_type,
                                           guint32 pointer)
 {
   GArray *bytes = gsk_spv_writer_get_bytes (writer, section);
@@ -1144,7 +1144,7 @@ gsk_spv_writer_generic_ptr_mem_semantics (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_in_bounds_ptr_access_chain (GskSpvWriter *writer,
-                                           GskSlType * result_type,
+                                           GskSlType *result_type,
                                            guint32 base,
                                            guint32 element,
                                            guint32 *indexes,
@@ -1242,7 +1242,7 @@ gsk_spv_writer_group_member_decorate (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_vector_extract_dynamic (GskSpvWriter *writer,
-                                       GskSlType * result_type,
+                                       GskSlType *result_type,
                                        guint32 vector,
                                        guint32 index)
 {
@@ -1263,7 +1263,7 @@ gsk_spv_writer_vector_extract_dynamic (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_vector_insert_dynamic (GskSpvWriter *writer,
-                                      GskSlType * result_type,
+                                      GskSlType *result_type,
                                       guint32 vector,
                                       guint32 component,
                                       guint32 index)
@@ -1286,7 +1286,7 @@ gsk_spv_writer_vector_insert_dynamic (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_vector_shuffle (GskSpvWriter *writer,
-                               GskSlType * result_type,
+                               GskSlType *result_type,
                                guint32 vector_1,
                                guint32 vector_2,
                                guint32 *components,
@@ -1310,7 +1310,7 @@ gsk_spv_writer_vector_shuffle (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_composite_construct (GskSpvWriter *writer,
-                                    GskSlType * result_type,
+                                    GskSlType *result_type,
                                     guint32 *constituents,
                                     gsize n_constituents)
 {
@@ -1330,7 +1330,7 @@ gsk_spv_writer_composite_construct (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_composite_extract (GskSpvWriter *writer,
-                                  GskSlType * result_type,
+                                  GskSlType *result_type,
                                   guint32 composite,
                                   guint32 *indexes,
                                   gsize n_indexes)
@@ -1352,7 +1352,7 @@ gsk_spv_writer_composite_extract (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_composite_insert (GskSpvWriter *writer,
-                                 GskSlType * result_type,
+                                 GskSlType *result_type,
                                  guint32 object,
                                  guint32 composite,
                                  guint32 *indexes,
@@ -1377,7 +1377,7 @@ gsk_spv_writer_composite_insert (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_copy_object (GskSpvWriter *writer,
                             GskSpvWriterSection section,
-                            GskSlType * result_type,
+                            GskSlType *result_type,
                             guint32 operand)
 {
   GArray *bytes = gsk_spv_writer_get_bytes (writer, section);
@@ -1397,7 +1397,7 @@ gsk_spv_writer_copy_object (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_transpose (GskSpvWriter *writer,
                           GskSpvWriterSection section,
-                          GskSlType * result_type,
+                          GskSlType *result_type,
                           guint32 matrix)
 {
   GArray *bytes = gsk_spv_writer_get_bytes (writer, section);
@@ -1417,7 +1417,7 @@ gsk_spv_writer_transpose (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_sampled_image (GskSpvWriter *writer,
                               GskSpvWriterSection section,
-                              GskSlType * result_type,
+                              GskSlType *result_type,
                               guint32 image,
                               guint32 sampler)
 {
@@ -1439,7 +1439,7 @@ gsk_spv_writer_sampled_image (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_image_sample_implicit_lod (GskSpvWriter *writer,
                                           GskSpvWriterSection section,
-                                          GskSlType * result_type,
+                                          GskSlType *result_type,
                                           guint32 sampled_image,
                                           guint32 coordinate,
                                           GskSpvImageOperands opt_image_operands)
@@ -1464,7 +1464,7 @@ gsk_spv_writer_image_sample_implicit_lod (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_image_sample_explicit_lod (GskSpvWriter *writer,
                                           GskSpvWriterSection section,
-                                          GskSlType * result_type,
+                                          GskSlType *result_type,
                                           guint32 sampled_image,
                                           guint32 coordinate,
                                           GskSpvImageOperands image_operands)
@@ -1488,7 +1488,7 @@ gsk_spv_writer_image_sample_explicit_lod (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_image_sample_dref_implicit_lod (GskSpvWriter *writer,
                                                GskSpvWriterSection section,
-                                               GskSlType * result_type,
+                                               GskSlType *result_type,
                                                guint32 sampled_image,
                                                guint32 coordinate,
                                                guint32 d_ref_,
@@ -1515,7 +1515,7 @@ gsk_spv_writer_image_sample_dref_implicit_lod (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_image_sample_dref_explicit_lod (GskSpvWriter *writer,
                                                GskSpvWriterSection section,
-                                               GskSlType * result_type,
+                                               GskSlType *result_type,
                                                guint32 sampled_image,
                                                guint32 coordinate,
                                                guint32 d_ref_,
@@ -1541,7 +1541,7 @@ gsk_spv_writer_image_sample_dref_explicit_lod (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_image_sample_proj_implicit_lod (GskSpvWriter *writer,
                                                GskSpvWriterSection section,
-                                               GskSlType * result_type,
+                                               GskSlType *result_type,
                                                guint32 sampled_image,
                                                guint32 coordinate,
                                                GskSpvImageOperands opt_image_operands)
@@ -1566,7 +1566,7 @@ gsk_spv_writer_image_sample_proj_implicit_lod (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_image_sample_proj_explicit_lod (GskSpvWriter *writer,
                                                GskSpvWriterSection section,
-                                               GskSlType * result_type,
+                                               GskSlType *result_type,
                                                guint32 sampled_image,
                                                guint32 coordinate,
                                                GskSpvImageOperands image_operands)
@@ -1590,7 +1590,7 @@ gsk_spv_writer_image_sample_proj_explicit_lod (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_image_sample_proj_dref_implicit_lod (GskSpvWriter *writer,
                                                     GskSpvWriterSection section,
-                                                    GskSlType * result_type,
+                                                    GskSlType *result_type,
                                                     guint32 sampled_image,
                                                     guint32 coordinate,
                                                     guint32 d_ref_,
@@ -1617,7 +1617,7 @@ gsk_spv_writer_image_sample_proj_dref_implicit_lod (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_image_sample_proj_dref_explicit_lod (GskSpvWriter *writer,
                                                     GskSpvWriterSection section,
-                                                    GskSlType * result_type,
+                                                    GskSlType *result_type,
                                                     guint32 sampled_image,
                                                     guint32 coordinate,
                                                     guint32 d_ref_,
@@ -1643,7 +1643,7 @@ gsk_spv_writer_image_sample_proj_dref_explicit_lod (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_image_fetch (GskSpvWriter *writer,
                             GskSpvWriterSection section,
-                            GskSlType * result_type,
+                            GskSlType *result_type,
                             guint32 image,
                             guint32 coordinate,
                             GskSpvImageOperands opt_image_operands)
@@ -1668,7 +1668,7 @@ gsk_spv_writer_image_fetch (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_image_gather (GskSpvWriter *writer,
                              GskSpvWriterSection section,
-                             GskSlType * result_type,
+                             GskSlType *result_type,
                              guint32 sampled_image,
                              guint32 coordinate,
                              guint32 component,
@@ -1695,7 +1695,7 @@ gsk_spv_writer_image_gather (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_image_dref_gather (GskSpvWriter *writer,
                                   GskSpvWriterSection section,
-                                  GskSlType * result_type,
+                                  GskSlType *result_type,
                                   guint32 sampled_image,
                                   guint32 coordinate,
                                   guint32 d_ref_,
@@ -1722,7 +1722,7 @@ gsk_spv_writer_image_dref_gather (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_image_read (GskSpvWriter *writer,
                            GskSpvWriterSection section,
-                           GskSlType * result_type,
+                           GskSlType *result_type,
                            guint32 image,
                            guint32 coordinate,
                            GskSpvImageOperands opt_image_operands)
@@ -1767,7 +1767,7 @@ gsk_spv_writer_image_write (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_image (GskSpvWriter *writer,
                       GskSpvWriterSection section,
-                      GskSlType * result_type,
+                      GskSlType *result_type,
                       guint32 sampled_image)
 {
   GArray *bytes = gsk_spv_writer_get_bytes (writer, section);
@@ -1787,7 +1787,7 @@ gsk_spv_writer_image (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_image_query_format (GskSpvWriter *writer,
                                    GskSpvWriterSection section,
-                                   GskSlType * result_type,
+                                   GskSlType *result_type,
                                    guint32 image)
 {
   GArray *bytes = gsk_spv_writer_get_bytes (writer, section);
@@ -1807,7 +1807,7 @@ gsk_spv_writer_image_query_format (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_image_query_order (GskSpvWriter *writer,
                                   GskSpvWriterSection section,
-                                  GskSlType * result_type,
+                                  GskSlType *result_type,
                                   guint32 image)
 {
   GArray *bytes = gsk_spv_writer_get_bytes (writer, section);
@@ -1827,7 +1827,7 @@ gsk_spv_writer_image_query_order (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_image_query_size_lod (GskSpvWriter *writer,
                                      GskSpvWriterSection section,
-                                     GskSlType * result_type,
+                                     GskSlType *result_type,
                                      guint32 image,
                                      guint32 level_of_detail)
 {
@@ -1849,7 +1849,7 @@ gsk_spv_writer_image_query_size_lod (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_image_query_size (GskSpvWriter *writer,
                                  GskSpvWriterSection section,
-                                 GskSlType * result_type,
+                                 GskSlType *result_type,
                                  guint32 image)
 {
   GArray *bytes = gsk_spv_writer_get_bytes (writer, section);
@@ -1869,7 +1869,7 @@ gsk_spv_writer_image_query_size (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_image_query_lod (GskSpvWriter *writer,
                                 GskSpvWriterSection section,
-                                GskSlType * result_type,
+                                GskSlType *result_type,
                                 guint32 sampled_image,
                                 guint32 coordinate)
 {
@@ -1891,7 +1891,7 @@ gsk_spv_writer_image_query_lod (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_image_query_levels (GskSpvWriter *writer,
                                    GskSpvWriterSection section,
-                                   GskSlType * result_type,
+                                   GskSlType *result_type,
                                    guint32 image)
 {
   GArray *bytes = gsk_spv_writer_get_bytes (writer, section);
@@ -1911,7 +1911,7 @@ gsk_spv_writer_image_query_levels (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_image_query_samples (GskSpvWriter *writer,
                                     GskSpvWriterSection section,
-                                    GskSlType * result_type,
+                                    GskSlType *result_type,
                                     guint32 image)
 {
   GArray *bytes = gsk_spv_writer_get_bytes (writer, section);
@@ -1930,7 +1930,7 @@ gsk_spv_writer_image_query_samples (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_convert_f_to_u (GskSpvWriter *writer,
-                               GskSlType * result_type,
+                               GskSlType *result_type,
                                guint32 float_value)
 {
   GArray *bytes = gsk_spv_writer_get_bytes (writer, GSK_SPV_WRITER_SECTION_CODE);
@@ -1949,7 +1949,7 @@ gsk_spv_writer_convert_f_to_u (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_convert_f_to_s (GskSpvWriter *writer,
-                               GskSlType * result_type,
+                               GskSlType *result_type,
                                guint32 float_value)
 {
   GArray *bytes = gsk_spv_writer_get_bytes (writer, GSK_SPV_WRITER_SECTION_CODE);
@@ -1968,7 +1968,7 @@ gsk_spv_writer_convert_f_to_s (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_convert_s_to_f (GskSpvWriter *writer,
-                               GskSlType * result_type,
+                               GskSlType *result_type,
                                guint32 signed_value)
 {
   GArray *bytes = gsk_spv_writer_get_bytes (writer, GSK_SPV_WRITER_SECTION_CODE);
@@ -1987,7 +1987,7 @@ gsk_spv_writer_convert_s_to_f (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_convert_u_to_f (GskSpvWriter *writer,
-                               GskSlType * result_type,
+                               GskSlType *result_type,
                                guint32 unsigned_value)
 {
   GArray *bytes = gsk_spv_writer_get_bytes (writer, GSK_SPV_WRITER_SECTION_CODE);
@@ -2006,7 +2006,7 @@ gsk_spv_writer_convert_u_to_f (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_u_convert (GskSpvWriter *writer,
-                          GskSlType * result_type,
+                          GskSlType *result_type,
                           guint32 unsigned_value)
 {
   GArray *bytes = gsk_spv_writer_get_bytes (writer, GSK_SPV_WRITER_SECTION_CODE);
@@ -2025,7 +2025,7 @@ gsk_spv_writer_u_convert (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_s_convert (GskSpvWriter *writer,
-                          GskSlType * result_type,
+                          GskSlType *result_type,
                           guint32 signed_value)
 {
   GArray *bytes = gsk_spv_writer_get_bytes (writer, GSK_SPV_WRITER_SECTION_CODE);
@@ -2044,7 +2044,7 @@ gsk_spv_writer_s_convert (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_f_convert (GskSpvWriter *writer,
-                          GskSlType * result_type,
+                          GskSlType *result_type,
                           guint32 float_value)
 {
   GArray *bytes = gsk_spv_writer_get_bytes (writer, GSK_SPV_WRITER_SECTION_CODE);
@@ -2063,7 +2063,7 @@ gsk_spv_writer_f_convert (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_quantize_to_f16 (GskSpvWriter *writer,
-                                GskSlType * result_type,
+                                GskSlType *result_type,
                                 guint32 value)
 {
   GArray *bytes = gsk_spv_writer_get_bytes (writer, GSK_SPV_WRITER_SECTION_CODE);
@@ -2082,7 +2082,7 @@ gsk_spv_writer_quantize_to_f16 (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_convert_ptr_to_u (GskSpvWriter *writer,
-                                 GskSlType * result_type,
+                                 GskSlType *result_type,
                                  guint32 pointer)
 {
   GArray *bytes = gsk_spv_writer_get_bytes (writer, GSK_SPV_WRITER_SECTION_CODE);
@@ -2101,7 +2101,7 @@ gsk_spv_writer_convert_ptr_to_u (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_sat_convert_s_to_u (GskSpvWriter *writer,
-                                   GskSlType * result_type,
+                                   GskSlType *result_type,
                                    guint32 signed_value)
 {
   GArray *bytes = gsk_spv_writer_get_bytes (writer, GSK_SPV_WRITER_SECTION_CODE);
@@ -2120,7 +2120,7 @@ gsk_spv_writer_sat_convert_s_to_u (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_sat_convert_u_to_s (GskSpvWriter *writer,
-                                   GskSlType * result_type,
+                                   GskSlType *result_type,
                                    guint32 unsigned_value)
 {
   GArray *bytes = gsk_spv_writer_get_bytes (writer, GSK_SPV_WRITER_SECTION_CODE);
@@ -2139,11 +2139,11 @@ gsk_spv_writer_sat_convert_u_to_s (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_convert_u_to_ptr (GskSpvWriter *writer,
-                                 GskSlPointerType * result_type,
+                                 GskSlType *result_type, GskSpvStorageClass result_type_storage,
                                  guint32 integer_value)
 {
   GArray *bytes = gsk_spv_writer_get_bytes (writer, GSK_SPV_WRITER_SECTION_CODE);
-  guint32 result_type_id = gsk_spv_writer_get_id_for_pointer_type (writer, result_type);
+  guint32 result_type_id = gsk_spv_writer_get_id_for_pointer_type (writer, result_type, result_type_storage);
   guint32 result_id = gsk_spv_writer_make_id (writer);
   guint start_index = bytes->len;
 
@@ -2158,11 +2158,11 @@ gsk_spv_writer_convert_u_to_ptr (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_ptr_cast_to_generic (GskSpvWriter *writer,
-                                    GskSlPointerType * result_type,
+                                    GskSlType *result_type, GskSpvStorageClass result_type_storage,
                                     guint32 pointer)
 {
   GArray *bytes = gsk_spv_writer_get_bytes (writer, GSK_SPV_WRITER_SECTION_CODE);
-  guint32 result_type_id = gsk_spv_writer_get_id_for_pointer_type (writer, result_type);
+  guint32 result_type_id = gsk_spv_writer_get_id_for_pointer_type (writer, result_type, result_type_storage);
   guint32 result_id = gsk_spv_writer_make_id (writer);
   guint start_index = bytes->len;
 
@@ -2177,11 +2177,11 @@ gsk_spv_writer_ptr_cast_to_generic (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_generic_cast_to_ptr (GskSpvWriter *writer,
-                                    GskSlPointerType * result_type,
+                                    GskSlType *result_type, GskSpvStorageClass result_type_storage,
                                     guint32 pointer)
 {
   GArray *bytes = gsk_spv_writer_get_bytes (writer, GSK_SPV_WRITER_SECTION_CODE);
-  guint32 result_type_id = gsk_spv_writer_get_id_for_pointer_type (writer, result_type);
+  guint32 result_type_id = gsk_spv_writer_get_id_for_pointer_type (writer, result_type, result_type_storage);
   guint32 result_id = gsk_spv_writer_make_id (writer);
   guint start_index = bytes->len;
 
@@ -2196,12 +2196,12 @@ gsk_spv_writer_generic_cast_to_ptr (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_generic_cast_to_ptr_explicit (GskSpvWriter *writer,
-                                             GskSlPointerType * result_type,
+                                             GskSlType *result_type, GskSpvStorageClass result_type_storage,
                                              guint32 pointer,
                                              GskSpvStorageClass storage)
 {
   GArray *bytes = gsk_spv_writer_get_bytes (writer, GSK_SPV_WRITER_SECTION_CODE);
-  guint32 result_type_id = gsk_spv_writer_get_id_for_pointer_type (writer, result_type);
+  guint32 result_type_id = gsk_spv_writer_get_id_for_pointer_type (writer, result_type, result_type_storage);
   guint32 result_id = gsk_spv_writer_make_id (writer);
   guint start_index = bytes->len;
 
@@ -2217,7 +2217,7 @@ gsk_spv_writer_generic_cast_to_ptr_explicit (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_bitcast (GskSpvWriter *writer,
-                        GskSlType * result_type,
+                        GskSlType *result_type,
                         guint32 operand)
 {
   GArray *bytes = gsk_spv_writer_get_bytes (writer, GSK_SPV_WRITER_SECTION_CODE);
@@ -2236,7 +2236,7 @@ gsk_spv_writer_bitcast (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_s_negate (GskSpvWriter *writer,
-                         GskSlType * result_type,
+                         GskSlType *result_type,
                          guint32 operand)
 {
   GArray *bytes = gsk_spv_writer_get_bytes (writer, GSK_SPV_WRITER_SECTION_CODE);
@@ -2255,7 +2255,7 @@ gsk_spv_writer_s_negate (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_f_negate (GskSpvWriter *writer,
-                         GskSlType * result_type,
+                         GskSlType *result_type,
                          guint32 operand)
 {
   GArray *bytes = gsk_spv_writer_get_bytes (writer, GSK_SPV_WRITER_SECTION_CODE);
@@ -2274,7 +2274,7 @@ gsk_spv_writer_f_negate (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_i_add (GskSpvWriter *writer,
-                      GskSlType * result_type,
+                      GskSlType *result_type,
                       guint32 operand_1,
                       guint32 operand_2)
 {
@@ -2295,7 +2295,7 @@ gsk_spv_writer_i_add (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_f_add (GskSpvWriter *writer,
-                      GskSlType * result_type,
+                      GskSlType *result_type,
                       guint32 operand_1,
                       guint32 operand_2)
 {
@@ -2316,7 +2316,7 @@ gsk_spv_writer_f_add (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_i_sub (GskSpvWriter *writer,
-                      GskSlType * result_type,
+                      GskSlType *result_type,
                       guint32 operand_1,
                       guint32 operand_2)
 {
@@ -2337,7 +2337,7 @@ gsk_spv_writer_i_sub (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_f_sub (GskSpvWriter *writer,
-                      GskSlType * result_type,
+                      GskSlType *result_type,
                       guint32 operand_1,
                       guint32 operand_2)
 {
@@ -2358,7 +2358,7 @@ gsk_spv_writer_f_sub (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_i_mul (GskSpvWriter *writer,
-                      GskSlType * result_type,
+                      GskSlType *result_type,
                       guint32 operand_1,
                       guint32 operand_2)
 {
@@ -2379,7 +2379,7 @@ gsk_spv_writer_i_mul (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_f_mul (GskSpvWriter *writer,
-                      GskSlType * result_type,
+                      GskSlType *result_type,
                       guint32 operand_1,
                       guint32 operand_2)
 {
@@ -2400,7 +2400,7 @@ gsk_spv_writer_f_mul (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_u_div (GskSpvWriter *writer,
-                      GskSlType * result_type,
+                      GskSlType *result_type,
                       guint32 operand_1,
                       guint32 operand_2)
 {
@@ -2421,7 +2421,7 @@ gsk_spv_writer_u_div (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_s_div (GskSpvWriter *writer,
-                      GskSlType * result_type,
+                      GskSlType *result_type,
                       guint32 operand_1,
                       guint32 operand_2)
 {
@@ -2442,7 +2442,7 @@ gsk_spv_writer_s_div (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_f_div (GskSpvWriter *writer,
-                      GskSlType * result_type,
+                      GskSlType *result_type,
                       guint32 operand_1,
                       guint32 operand_2)
 {
@@ -2463,7 +2463,7 @@ gsk_spv_writer_f_div (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_u_mod (GskSpvWriter *writer,
-                      GskSlType * result_type,
+                      GskSlType *result_type,
                       guint32 operand_1,
                       guint32 operand_2)
 {
@@ -2484,7 +2484,7 @@ gsk_spv_writer_u_mod (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_s_rem (GskSpvWriter *writer,
-                      GskSlType * result_type,
+                      GskSlType *result_type,
                       guint32 operand_1,
                       guint32 operand_2)
 {
@@ -2505,7 +2505,7 @@ gsk_spv_writer_s_rem (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_s_mod (GskSpvWriter *writer,
-                      GskSlType * result_type,
+                      GskSlType *result_type,
                       guint32 operand_1,
                       guint32 operand_2)
 {
@@ -2526,7 +2526,7 @@ gsk_spv_writer_s_mod (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_f_rem (GskSpvWriter *writer,
-                      GskSlType * result_type,
+                      GskSlType *result_type,
                       guint32 operand_1,
                       guint32 operand_2)
 {
@@ -2547,7 +2547,7 @@ gsk_spv_writer_f_rem (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_f_mod (GskSpvWriter *writer,
-                      GskSlType * result_type,
+                      GskSlType *result_type,
                       guint32 operand_1,
                       guint32 operand_2)
 {
@@ -2568,7 +2568,7 @@ gsk_spv_writer_f_mod (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_vector_times_scalar (GskSpvWriter *writer,
-                                    GskSlType * result_type,
+                                    GskSlType *result_type,
                                     guint32 vector,
                                     guint32 scalar)
 {
@@ -2589,7 +2589,7 @@ gsk_spv_writer_vector_times_scalar (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_matrix_times_scalar (GskSpvWriter *writer,
-                                    GskSlType * result_type,
+                                    GskSlType *result_type,
                                     guint32 matrix,
                                     guint32 scalar)
 {
@@ -2610,7 +2610,7 @@ gsk_spv_writer_matrix_times_scalar (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_vector_times_matrix (GskSpvWriter *writer,
-                                    GskSlType * result_type,
+                                    GskSlType *result_type,
                                     guint32 vector,
                                     guint32 matrix)
 {
@@ -2631,7 +2631,7 @@ gsk_spv_writer_vector_times_matrix (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_matrix_times_vector (GskSpvWriter *writer,
-                                    GskSlType * result_type,
+                                    GskSlType *result_type,
                                     guint32 matrix,
                                     guint32 vector)
 {
@@ -2652,7 +2652,7 @@ gsk_spv_writer_matrix_times_vector (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_matrix_times_matrix (GskSpvWriter *writer,
-                                    GskSlType * result_type,
+                                    GskSlType *result_type,
                                     guint32 left_matrix,
                                     guint32 right_matrix)
 {
@@ -2673,7 +2673,7 @@ gsk_spv_writer_matrix_times_matrix (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_outer_product (GskSpvWriter *writer,
-                              GskSlType * result_type,
+                              GskSlType *result_type,
                               guint32 vector_1,
                               guint32 vector_2)
 {
@@ -2694,7 +2694,7 @@ gsk_spv_writer_outer_product (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_dot (GskSpvWriter *writer,
-                    GskSlType * result_type,
+                    GskSlType *result_type,
                     guint32 vector_1,
                     guint32 vector_2)
 {
@@ -2715,7 +2715,7 @@ gsk_spv_writer_dot (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_i_add_carry (GskSpvWriter *writer,
-                            GskSlType * result_type,
+                            GskSlType *result_type,
                             guint32 operand_1,
                             guint32 operand_2)
 {
@@ -2736,7 +2736,7 @@ gsk_spv_writer_i_add_carry (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_i_sub_borrow (GskSpvWriter *writer,
-                             GskSlType * result_type,
+                             GskSlType *result_type,
                              guint32 operand_1,
                              guint32 operand_2)
 {
@@ -2757,7 +2757,7 @@ gsk_spv_writer_i_sub_borrow (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_u_mul_extended (GskSpvWriter *writer,
-                               GskSlType * result_type,
+                               GskSlType *result_type,
                                guint32 operand_1,
                                guint32 operand_2)
 {
@@ -2778,7 +2778,7 @@ gsk_spv_writer_u_mul_extended (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_s_mul_extended (GskSpvWriter *writer,
-                               GskSlType * result_type,
+                               GskSlType *result_type,
                                guint32 operand_1,
                                guint32 operand_2)
 {
@@ -2799,7 +2799,7 @@ gsk_spv_writer_s_mul_extended (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_any (GskSpvWriter *writer,
-                    GskSlType * result_type,
+                    GskSlType *result_type,
                     guint32 vector)
 {
   GArray *bytes = gsk_spv_writer_get_bytes (writer, GSK_SPV_WRITER_SECTION_CODE);
@@ -2818,7 +2818,7 @@ gsk_spv_writer_any (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_all (GskSpvWriter *writer,
-                    GskSlType * result_type,
+                    GskSlType *result_type,
                     guint32 vector)
 {
   GArray *bytes = gsk_spv_writer_get_bytes (writer, GSK_SPV_WRITER_SECTION_CODE);
@@ -2837,7 +2837,7 @@ gsk_spv_writer_all (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_is_nan (GskSpvWriter *writer,
-                       GskSlType * result_type,
+                       GskSlType *result_type,
                        guint32 x)
 {
   GArray *bytes = gsk_spv_writer_get_bytes (writer, GSK_SPV_WRITER_SECTION_CODE);
@@ -2856,7 +2856,7 @@ gsk_spv_writer_is_nan (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_is_inf (GskSpvWriter *writer,
-                       GskSlType * result_type,
+                       GskSlType *result_type,
                        guint32 x)
 {
   GArray *bytes = gsk_spv_writer_get_bytes (writer, GSK_SPV_WRITER_SECTION_CODE);
@@ -2875,7 +2875,7 @@ gsk_spv_writer_is_inf (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_is_finite (GskSpvWriter *writer,
-                          GskSlType * result_type,
+                          GskSlType *result_type,
                           guint32 x)
 {
   GArray *bytes = gsk_spv_writer_get_bytes (writer, GSK_SPV_WRITER_SECTION_CODE);
@@ -2894,7 +2894,7 @@ gsk_spv_writer_is_finite (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_is_normal (GskSpvWriter *writer,
-                          GskSlType * result_type,
+                          GskSlType *result_type,
                           guint32 x)
 {
   GArray *bytes = gsk_spv_writer_get_bytes (writer, GSK_SPV_WRITER_SECTION_CODE);
@@ -2913,7 +2913,7 @@ gsk_spv_writer_is_normal (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_sign_bit_set (GskSpvWriter *writer,
-                             GskSlType * result_type,
+                             GskSlType *result_type,
                              guint32 x)
 {
   GArray *bytes = gsk_spv_writer_get_bytes (writer, GSK_SPV_WRITER_SECTION_CODE);
@@ -2932,7 +2932,7 @@ gsk_spv_writer_sign_bit_set (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_less_or_greater (GskSpvWriter *writer,
-                                GskSlType * result_type,
+                                GskSlType *result_type,
                                 guint32 x,
                                 guint32 y)
 {
@@ -2953,7 +2953,7 @@ gsk_spv_writer_less_or_greater (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_ordered (GskSpvWriter *writer,
-                        GskSlType * result_type,
+                        GskSlType *result_type,
                         guint32 x,
                         guint32 y)
 {
@@ -2974,7 +2974,7 @@ gsk_spv_writer_ordered (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_unordered (GskSpvWriter *writer,
-                          GskSlType * result_type,
+                          GskSlType *result_type,
                           guint32 x,
                           guint32 y)
 {
@@ -2995,7 +2995,7 @@ gsk_spv_writer_unordered (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_logical_equal (GskSpvWriter *writer,
-                              GskSlType * result_type,
+                              GskSlType *result_type,
                               guint32 operand_1,
                               guint32 operand_2)
 {
@@ -3016,7 +3016,7 @@ gsk_spv_writer_logical_equal (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_logical_not_equal (GskSpvWriter *writer,
-                                  GskSlType * result_type,
+                                  GskSlType *result_type,
                                   guint32 operand_1,
                                   guint32 operand_2)
 {
@@ -3037,7 +3037,7 @@ gsk_spv_writer_logical_not_equal (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_logical_or (GskSpvWriter *writer,
-                           GskSlType * result_type,
+                           GskSlType *result_type,
                            guint32 operand_1,
                            guint32 operand_2)
 {
@@ -3058,7 +3058,7 @@ gsk_spv_writer_logical_or (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_logical_and (GskSpvWriter *writer,
-                            GskSlType * result_type,
+                            GskSlType *result_type,
                             guint32 operand_1,
                             guint32 operand_2)
 {
@@ -3079,7 +3079,7 @@ gsk_spv_writer_logical_and (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_logical_not (GskSpvWriter *writer,
-                            GskSlType * result_type,
+                            GskSlType *result_type,
                             guint32 operand)
 {
   GArray *bytes = gsk_spv_writer_get_bytes (writer, GSK_SPV_WRITER_SECTION_CODE);
@@ -3098,7 +3098,7 @@ gsk_spv_writer_logical_not (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_select (GskSpvWriter *writer,
-                       GskSlType * result_type,
+                       GskSlType *result_type,
                        guint32 condition,
                        guint32 object_1,
                        guint32 object_2)
@@ -3121,7 +3121,7 @@ gsk_spv_writer_select (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_i_equal (GskSpvWriter *writer,
-                        GskSlType * result_type,
+                        GskSlType *result_type,
                         guint32 operand_1,
                         guint32 operand_2)
 {
@@ -3142,7 +3142,7 @@ gsk_spv_writer_i_equal (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_i_not_equal (GskSpvWriter *writer,
-                            GskSlType * result_type,
+                            GskSlType *result_type,
                             guint32 operand_1,
                             guint32 operand_2)
 {
@@ -3163,7 +3163,7 @@ gsk_spv_writer_i_not_equal (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_u_greater_than (GskSpvWriter *writer,
-                               GskSlType * result_type,
+                               GskSlType *result_type,
                                guint32 operand_1,
                                guint32 operand_2)
 {
@@ -3184,7 +3184,7 @@ gsk_spv_writer_u_greater_than (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_s_greater_than (GskSpvWriter *writer,
-                               GskSlType * result_type,
+                               GskSlType *result_type,
                                guint32 operand_1,
                                guint32 operand_2)
 {
@@ -3205,7 +3205,7 @@ gsk_spv_writer_s_greater_than (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_u_greater_than_equal (GskSpvWriter *writer,
-                                     GskSlType * result_type,
+                                     GskSlType *result_type,
                                      guint32 operand_1,
                                      guint32 operand_2)
 {
@@ -3226,7 +3226,7 @@ gsk_spv_writer_u_greater_than_equal (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_s_greater_than_equal (GskSpvWriter *writer,
-                                     GskSlType * result_type,
+                                     GskSlType *result_type,
                                      guint32 operand_1,
                                      guint32 operand_2)
 {
@@ -3247,7 +3247,7 @@ gsk_spv_writer_s_greater_than_equal (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_u_less_than (GskSpvWriter *writer,
-                            GskSlType * result_type,
+                            GskSlType *result_type,
                             guint32 operand_1,
                             guint32 operand_2)
 {
@@ -3268,7 +3268,7 @@ gsk_spv_writer_u_less_than (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_s_less_than (GskSpvWriter *writer,
-                            GskSlType * result_type,
+                            GskSlType *result_type,
                             guint32 operand_1,
                             guint32 operand_2)
 {
@@ -3289,7 +3289,7 @@ gsk_spv_writer_s_less_than (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_u_less_than_equal (GskSpvWriter *writer,
-                                  GskSlType * result_type,
+                                  GskSlType *result_type,
                                   guint32 operand_1,
                                   guint32 operand_2)
 {
@@ -3310,7 +3310,7 @@ gsk_spv_writer_u_less_than_equal (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_s_less_than_equal (GskSpvWriter *writer,
-                                  GskSlType * result_type,
+                                  GskSlType *result_type,
                                   guint32 operand_1,
                                   guint32 operand_2)
 {
@@ -3331,7 +3331,7 @@ gsk_spv_writer_s_less_than_equal (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_f_ord_equal (GskSpvWriter *writer,
-                            GskSlType * result_type,
+                            GskSlType *result_type,
                             guint32 operand_1,
                             guint32 operand_2)
 {
@@ -3352,7 +3352,7 @@ gsk_spv_writer_f_ord_equal (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_f_unord_equal (GskSpvWriter *writer,
-                              GskSlType * result_type,
+                              GskSlType *result_type,
                               guint32 operand_1,
                               guint32 operand_2)
 {
@@ -3373,7 +3373,7 @@ gsk_spv_writer_f_unord_equal (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_f_ord_not_equal (GskSpvWriter *writer,
-                                GskSlType * result_type,
+                                GskSlType *result_type,
                                 guint32 operand_1,
                                 guint32 operand_2)
 {
@@ -3394,7 +3394,7 @@ gsk_spv_writer_f_ord_not_equal (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_f_unord_not_equal (GskSpvWriter *writer,
-                                  GskSlType * result_type,
+                                  GskSlType *result_type,
                                   guint32 operand_1,
                                   guint32 operand_2)
 {
@@ -3415,7 +3415,7 @@ gsk_spv_writer_f_unord_not_equal (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_f_ord_less_than (GskSpvWriter *writer,
-                                GskSlType * result_type,
+                                GskSlType *result_type,
                                 guint32 operand_1,
                                 guint32 operand_2)
 {
@@ -3436,7 +3436,7 @@ gsk_spv_writer_f_ord_less_than (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_f_unord_less_than (GskSpvWriter *writer,
-                                  GskSlType * result_type,
+                                  GskSlType *result_type,
                                   guint32 operand_1,
                                   guint32 operand_2)
 {
@@ -3457,7 +3457,7 @@ gsk_spv_writer_f_unord_less_than (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_f_ord_greater_than (GskSpvWriter *writer,
-                                   GskSlType * result_type,
+                                   GskSlType *result_type,
                                    guint32 operand_1,
                                    guint32 operand_2)
 {
@@ -3478,7 +3478,7 @@ gsk_spv_writer_f_ord_greater_than (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_f_unord_greater_than (GskSpvWriter *writer,
-                                     GskSlType * result_type,
+                                     GskSlType *result_type,
                                      guint32 operand_1,
                                      guint32 operand_2)
 {
@@ -3499,7 +3499,7 @@ gsk_spv_writer_f_unord_greater_than (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_f_ord_less_than_equal (GskSpvWriter *writer,
-                                      GskSlType * result_type,
+                                      GskSlType *result_type,
                                       guint32 operand_1,
                                       guint32 operand_2)
 {
@@ -3520,7 +3520,7 @@ gsk_spv_writer_f_ord_less_than_equal (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_f_unord_less_than_equal (GskSpvWriter *writer,
-                                        GskSlType * result_type,
+                                        GskSlType *result_type,
                                         guint32 operand_1,
                                         guint32 operand_2)
 {
@@ -3541,7 +3541,7 @@ gsk_spv_writer_f_unord_less_than_equal (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_f_ord_greater_than_equal (GskSpvWriter *writer,
-                                         GskSlType * result_type,
+                                         GskSlType *result_type,
                                          guint32 operand_1,
                                          guint32 operand_2)
 {
@@ -3562,7 +3562,7 @@ gsk_spv_writer_f_ord_greater_than_equal (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_f_unord_greater_than_equal (GskSpvWriter *writer,
-                                           GskSlType * result_type,
+                                           GskSlType *result_type,
                                            guint32 operand_1,
                                            guint32 operand_2)
 {
@@ -3583,7 +3583,7 @@ gsk_spv_writer_f_unord_greater_than_equal (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_shift_right_logical (GskSpvWriter *writer,
-                                    GskSlType * result_type,
+                                    GskSlType *result_type,
                                     guint32 base,
                                     guint32 shift)
 {
@@ -3604,7 +3604,7 @@ gsk_spv_writer_shift_right_logical (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_shift_right_arithmetic (GskSpvWriter *writer,
-                                       GskSlType * result_type,
+                                       GskSlType *result_type,
                                        guint32 base,
                                        guint32 shift)
 {
@@ -3625,7 +3625,7 @@ gsk_spv_writer_shift_right_arithmetic (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_shift_left_logical (GskSpvWriter *writer,
-                                   GskSlType * result_type,
+                                   GskSlType *result_type,
                                    guint32 base,
                                    guint32 shift)
 {
@@ -3646,7 +3646,7 @@ gsk_spv_writer_shift_left_logical (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_bitwise_or (GskSpvWriter *writer,
-                           GskSlType * result_type,
+                           GskSlType *result_type,
                            guint32 operand_1,
                            guint32 operand_2)
 {
@@ -3667,7 +3667,7 @@ gsk_spv_writer_bitwise_or (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_bitwise_xor (GskSpvWriter *writer,
-                            GskSlType * result_type,
+                            GskSlType *result_type,
                             guint32 operand_1,
                             guint32 operand_2)
 {
@@ -3688,7 +3688,7 @@ gsk_spv_writer_bitwise_xor (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_bitwise_and (GskSpvWriter *writer,
-                            GskSlType * result_type,
+                            GskSlType *result_type,
                             guint32 operand_1,
                             guint32 operand_2)
 {
@@ -3709,7 +3709,7 @@ gsk_spv_writer_bitwise_and (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_not (GskSpvWriter *writer,
-                    GskSlType * result_type,
+                    GskSlType *result_type,
                     guint32 operand)
 {
   GArray *bytes = gsk_spv_writer_get_bytes (writer, GSK_SPV_WRITER_SECTION_CODE);
@@ -3728,7 +3728,7 @@ gsk_spv_writer_not (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_bit_field_insert (GskSpvWriter *writer,
-                                 GskSlType * result_type,
+                                 GskSlType *result_type,
                                  guint32 base,
                                  guint32 insert,
                                  guint32 offset,
@@ -3753,7 +3753,7 @@ gsk_spv_writer_bit_field_insert (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_bit_field_s_extract (GskSpvWriter *writer,
-                                    GskSlType * result_type,
+                                    GskSlType *result_type,
                                     guint32 base,
                                     guint32 offset,
                                     guint32 count)
@@ -3776,7 +3776,7 @@ gsk_spv_writer_bit_field_s_extract (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_bit_field_u_extract (GskSpvWriter *writer,
-                                    GskSlType * result_type,
+                                    GskSlType *result_type,
                                     guint32 base,
                                     guint32 offset,
                                     guint32 count)
@@ -3799,7 +3799,7 @@ gsk_spv_writer_bit_field_u_extract (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_bit_reverse (GskSpvWriter *writer,
-                            GskSlType * result_type,
+                            GskSlType *result_type,
                             guint32 base)
 {
   GArray *bytes = gsk_spv_writer_get_bytes (writer, GSK_SPV_WRITER_SECTION_CODE);
@@ -3818,7 +3818,7 @@ gsk_spv_writer_bit_reverse (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_bit_count (GskSpvWriter *writer,
-                          GskSlType * result_type,
+                          GskSlType *result_type,
                           guint32 base)
 {
   GArray *bytes = gsk_spv_writer_get_bytes (writer, GSK_SPV_WRITER_SECTION_CODE);
@@ -3837,7 +3837,7 @@ gsk_spv_writer_bit_count (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_d_pdx (GskSpvWriter *writer,
-                      GskSlType * result_type,
+                      GskSlType *result_type,
                       guint32 p)
 {
   GArray *bytes = gsk_spv_writer_get_bytes (writer, GSK_SPV_WRITER_SECTION_CODE);
@@ -3856,7 +3856,7 @@ gsk_spv_writer_d_pdx (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_d_pdy (GskSpvWriter *writer,
-                      GskSlType * result_type,
+                      GskSlType *result_type,
                       guint32 p)
 {
   GArray *bytes = gsk_spv_writer_get_bytes (writer, GSK_SPV_WRITER_SECTION_CODE);
@@ -3875,7 +3875,7 @@ gsk_spv_writer_d_pdy (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_fwidth (GskSpvWriter *writer,
-                       GskSlType * result_type,
+                       GskSlType *result_type,
                        guint32 p)
 {
   GArray *bytes = gsk_spv_writer_get_bytes (writer, GSK_SPV_WRITER_SECTION_CODE);
@@ -3894,7 +3894,7 @@ gsk_spv_writer_fwidth (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_d_pdx_fine (GskSpvWriter *writer,
-                           GskSlType * result_type,
+                           GskSlType *result_type,
                            guint32 p)
 {
   GArray *bytes = gsk_spv_writer_get_bytes (writer, GSK_SPV_WRITER_SECTION_CODE);
@@ -3913,7 +3913,7 @@ gsk_spv_writer_d_pdx_fine (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_d_pdy_fine (GskSpvWriter *writer,
-                           GskSlType * result_type,
+                           GskSlType *result_type,
                            guint32 p)
 {
   GArray *bytes = gsk_spv_writer_get_bytes (writer, GSK_SPV_WRITER_SECTION_CODE);
@@ -3932,7 +3932,7 @@ gsk_spv_writer_d_pdy_fine (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_fwidth_fine (GskSpvWriter *writer,
-                            GskSlType * result_type,
+                            GskSlType *result_type,
                             guint32 p)
 {
   GArray *bytes = gsk_spv_writer_get_bytes (writer, GSK_SPV_WRITER_SECTION_CODE);
@@ -3951,7 +3951,7 @@ gsk_spv_writer_fwidth_fine (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_d_pdx_coarse (GskSpvWriter *writer,
-                             GskSlType * result_type,
+                             GskSlType *result_type,
                              guint32 p)
 {
   GArray *bytes = gsk_spv_writer_get_bytes (writer, GSK_SPV_WRITER_SECTION_CODE);
@@ -3970,7 +3970,7 @@ gsk_spv_writer_d_pdx_coarse (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_d_pdy_coarse (GskSpvWriter *writer,
-                             GskSlType * result_type,
+                             GskSlType *result_type,
                              guint32 p)
 {
   GArray *bytes = gsk_spv_writer_get_bytes (writer, GSK_SPV_WRITER_SECTION_CODE);
@@ -3989,7 +3989,7 @@ gsk_spv_writer_d_pdy_coarse (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_fwidth_coarse (GskSpvWriter *writer,
-                              GskSlType * result_type,
+                              GskSlType *result_type,
                               guint32 p)
 {
   GArray *bytes = gsk_spv_writer_get_bytes (writer, GSK_SPV_WRITER_SECTION_CODE);
@@ -4082,7 +4082,7 @@ gsk_spv_writer_memory_barrier (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_atomic_load (GskSpvWriter *writer,
-                            GskSlType * result_type,
+                            GskSlType *result_type,
                             guint32 pointer,
                             guint32 scope,
                             guint32 semantics)
@@ -4123,7 +4123,7 @@ gsk_spv_writer_atomic_store (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_atomic_exchange (GskSpvWriter *writer,
-                                GskSlType * result_type,
+                                GskSlType *result_type,
                                 guint32 pointer,
                                 guint32 scope,
                                 guint32 semantics,
@@ -4148,7 +4148,7 @@ gsk_spv_writer_atomic_exchange (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_atomic_compare_exchange (GskSpvWriter *writer,
-                                        GskSlType * result_type,
+                                        GskSlType *result_type,
                                         guint32 pointer,
                                         guint32 scope,
                                         guint32 equal,
@@ -4177,7 +4177,7 @@ gsk_spv_writer_atomic_compare_exchange (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_atomic_compare_exchange_weak (GskSpvWriter *writer,
-                                             GskSlType * result_type,
+                                             GskSlType *result_type,
                                              guint32 pointer,
                                              guint32 scope,
                                              guint32 equal,
@@ -4206,7 +4206,7 @@ gsk_spv_writer_atomic_compare_exchange_weak (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_atomic_i_increment (GskSpvWriter *writer,
-                                   GskSlType * result_type,
+                                   GskSlType *result_type,
                                    guint32 pointer,
                                    guint32 scope,
                                    guint32 semantics)
@@ -4229,7 +4229,7 @@ gsk_spv_writer_atomic_i_increment (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_atomic_i_decrement (GskSpvWriter *writer,
-                                   GskSlType * result_type,
+                                   GskSlType *result_type,
                                    guint32 pointer,
                                    guint32 scope,
                                    guint32 semantics)
@@ -4252,7 +4252,7 @@ gsk_spv_writer_atomic_i_decrement (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_atomic_i_add (GskSpvWriter *writer,
-                             GskSlType * result_type,
+                             GskSlType *result_type,
                              guint32 pointer,
                              guint32 scope,
                              guint32 semantics,
@@ -4277,7 +4277,7 @@ gsk_spv_writer_atomic_i_add (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_atomic_i_sub (GskSpvWriter *writer,
-                             GskSlType * result_type,
+                             GskSlType *result_type,
                              guint32 pointer,
                              guint32 scope,
                              guint32 semantics,
@@ -4302,7 +4302,7 @@ gsk_spv_writer_atomic_i_sub (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_atomic_s_min (GskSpvWriter *writer,
-                             GskSlType * result_type,
+                             GskSlType *result_type,
                              guint32 pointer,
                              guint32 scope,
                              guint32 semantics,
@@ -4327,7 +4327,7 @@ gsk_spv_writer_atomic_s_min (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_atomic_u_min (GskSpvWriter *writer,
-                             GskSlType * result_type,
+                             GskSlType *result_type,
                              guint32 pointer,
                              guint32 scope,
                              guint32 semantics,
@@ -4352,7 +4352,7 @@ gsk_spv_writer_atomic_u_min (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_atomic_s_max (GskSpvWriter *writer,
-                             GskSlType * result_type,
+                             GskSlType *result_type,
                              guint32 pointer,
                              guint32 scope,
                              guint32 semantics,
@@ -4377,7 +4377,7 @@ gsk_spv_writer_atomic_s_max (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_atomic_u_max (GskSpvWriter *writer,
-                             GskSlType * result_type,
+                             GskSlType *result_type,
                              guint32 pointer,
                              guint32 scope,
                              guint32 semantics,
@@ -4402,7 +4402,7 @@ gsk_spv_writer_atomic_u_max (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_atomic_and (GskSpvWriter *writer,
-                           GskSlType * result_type,
+                           GskSlType *result_type,
                            guint32 pointer,
                            guint32 scope,
                            guint32 semantics,
@@ -4427,7 +4427,7 @@ gsk_spv_writer_atomic_and (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_atomic_or (GskSpvWriter *writer,
-                          GskSlType * result_type,
+                          GskSlType *result_type,
                           guint32 pointer,
                           guint32 scope,
                           guint32 semantics,
@@ -4452,7 +4452,7 @@ gsk_spv_writer_atomic_or (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_atomic_xor (GskSpvWriter *writer,
-                           GskSlType * result_type,
+                           GskSlType *result_type,
                            guint32 pointer,
                            guint32 scope,
                            guint32 semantics,
@@ -4477,7 +4477,7 @@ gsk_spv_writer_atomic_xor (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_phi (GskSpvWriter *writer,
-                    GskSlType * result_type,
+                    GskSlType *result_type,
                     guint32 *variable__parent_____s[2],
                     gsize n_variable__parent_____s)
 {
@@ -4663,7 +4663,7 @@ gsk_spv_writer_lifetime_stop (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_group_async_copy (GskSpvWriter *writer,
                                  GskSpvWriterSection section,
-                                 GskSlType * result_type,
+                                 GskSlType *result_type,
                                  guint32 execution,
                                  guint32 destination,
                                  guint32 source,
@@ -4710,7 +4710,7 @@ gsk_spv_writer_group_wait_events (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_group_all (GskSpvWriter *writer,
                           GskSpvWriterSection section,
-                          GskSlType * result_type,
+                          GskSlType *result_type,
                           guint32 execution,
                           guint32 predicate)
 {
@@ -4732,7 +4732,7 @@ gsk_spv_writer_group_all (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_group_any (GskSpvWriter *writer,
                           GskSpvWriterSection section,
-                          GskSlType * result_type,
+                          GskSlType *result_type,
                           guint32 execution,
                           guint32 predicate)
 {
@@ -4754,7 +4754,7 @@ gsk_spv_writer_group_any (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_group_broadcast (GskSpvWriter *writer,
                                 GskSpvWriterSection section,
-                                GskSlType * result_type,
+                                GskSlType *result_type,
                                 guint32 execution,
                                 guint32 value,
                                 guint32 local_id)
@@ -4778,7 +4778,7 @@ gsk_spv_writer_group_broadcast (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_group_i_add (GskSpvWriter *writer,
                             GskSpvWriterSection section,
-                            GskSlType * result_type,
+                            GskSlType *result_type,
                             guint32 execution,
                             GskSpvGroupOperation operation,
                             guint32 x)
@@ -4802,7 +4802,7 @@ gsk_spv_writer_group_i_add (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_group_f_add (GskSpvWriter *writer,
                             GskSpvWriterSection section,
-                            GskSlType * result_type,
+                            GskSlType *result_type,
                             guint32 execution,
                             GskSpvGroupOperation operation,
                             guint32 x)
@@ -4826,7 +4826,7 @@ gsk_spv_writer_group_f_add (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_group_f_min (GskSpvWriter *writer,
                             GskSpvWriterSection section,
-                            GskSlType * result_type,
+                            GskSlType *result_type,
                             guint32 execution,
                             GskSpvGroupOperation operation,
                             guint32 x)
@@ -4850,7 +4850,7 @@ gsk_spv_writer_group_f_min (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_group_u_min (GskSpvWriter *writer,
                             GskSpvWriterSection section,
-                            GskSlType * result_type,
+                            GskSlType *result_type,
                             guint32 execution,
                             GskSpvGroupOperation operation,
                             guint32 x)
@@ -4874,7 +4874,7 @@ gsk_spv_writer_group_u_min (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_group_s_min (GskSpvWriter *writer,
                             GskSpvWriterSection section,
-                            GskSlType * result_type,
+                            GskSlType *result_type,
                             guint32 execution,
                             GskSpvGroupOperation operation,
                             guint32 x)
@@ -4898,7 +4898,7 @@ gsk_spv_writer_group_s_min (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_group_f_max (GskSpvWriter *writer,
                             GskSpvWriterSection section,
-                            GskSlType * result_type,
+                            GskSlType *result_type,
                             guint32 execution,
                             GskSpvGroupOperation operation,
                             guint32 x)
@@ -4922,7 +4922,7 @@ gsk_spv_writer_group_f_max (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_group_u_max (GskSpvWriter *writer,
                             GskSpvWriterSection section,
-                            GskSlType * result_type,
+                            GskSlType *result_type,
                             guint32 execution,
                             GskSpvGroupOperation operation,
                             guint32 x)
@@ -4946,7 +4946,7 @@ gsk_spv_writer_group_u_max (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_group_s_max (GskSpvWriter *writer,
                             GskSpvWriterSection section,
-                            GskSlType * result_type,
+                            GskSlType *result_type,
                             guint32 execution,
                             GskSpvGroupOperation operation,
                             guint32 x)
@@ -4970,7 +4970,7 @@ gsk_spv_writer_group_s_max (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_read_pipe (GskSpvWriter *writer,
                           GskSpvWriterSection section,
-                          GskSlType * result_type,
+                          GskSlType *result_type,
                           guint32 pipe,
                           guint32 pointer,
                           guint32 packet_size,
@@ -4996,7 +4996,7 @@ gsk_spv_writer_read_pipe (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_write_pipe (GskSpvWriter *writer,
                            GskSpvWriterSection section,
-                           GskSlType * result_type,
+                           GskSlType *result_type,
                            guint32 pipe,
                            guint32 pointer,
                            guint32 packet_size,
@@ -5022,7 +5022,7 @@ gsk_spv_writer_write_pipe (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_reserved_read_pipe (GskSpvWriter *writer,
                                    GskSpvWriterSection section,
-                                   GskSlType * result_type,
+                                   GskSlType *result_type,
                                    guint32 pipe,
                                    guint32 reserve_id,
                                    guint32 index,
@@ -5052,7 +5052,7 @@ gsk_spv_writer_reserved_read_pipe (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_reserved_write_pipe (GskSpvWriter *writer,
                                     GskSpvWriterSection section,
-                                    GskSlType * result_type,
+                                    GskSlType *result_type,
                                     guint32 pipe,
                                     guint32 reserve_id,
                                     guint32 index,
@@ -5082,7 +5082,7 @@ gsk_spv_writer_reserved_write_pipe (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_reserve_read_pipe_packets (GskSpvWriter *writer,
                                           GskSpvWriterSection section,
-                                          GskSlType * result_type,
+                                          GskSlType *result_type,
                                           guint32 pipe,
                                           guint32 num_packets,
                                           guint32 packet_size,
@@ -5108,7 +5108,7 @@ gsk_spv_writer_reserve_read_pipe_packets (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_reserve_write_pipe_packets (GskSpvWriter *writer,
                                            GskSpvWriterSection section,
-                                           GskSlType * result_type,
+                                           GskSlType *result_type,
                                            guint32 pipe,
                                            guint32 num_packets,
                                            guint32 packet_size,
@@ -5172,7 +5172,7 @@ gsk_spv_writer_commit_write_pipe (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_is_valid_reserve_id (GskSpvWriter *writer,
                                     GskSpvWriterSection section,
-                                    GskSlType * result_type,
+                                    GskSlType *result_type,
                                     guint32 reserve_id)
 {
   GArray *bytes = gsk_spv_writer_get_bytes (writer, section);
@@ -5192,7 +5192,7 @@ gsk_spv_writer_is_valid_reserve_id (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_get_num_pipe_packets (GskSpvWriter *writer,
                                      GskSpvWriterSection section,
-                                     GskSlType * result_type,
+                                     GskSlType *result_type,
                                      guint32 pipe,
                                      guint32 packet_size,
                                      guint32 packet_alignment)
@@ -5216,7 +5216,7 @@ gsk_spv_writer_get_num_pipe_packets (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_get_max_pipe_packets (GskSpvWriter *writer,
                                      GskSpvWriterSection section,
-                                     GskSlType * result_type,
+                                     GskSlType *result_type,
                                      guint32 pipe,
                                      guint32 packet_size,
                                      guint32 packet_alignment)
@@ -5240,7 +5240,7 @@ gsk_spv_writer_get_max_pipe_packets (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_group_reserve_read_pipe_packets (GskSpvWriter *writer,
                                                 GskSpvWriterSection section,
-                                                GskSlType * result_type,
+                                                GskSlType *result_type,
                                                 guint32 execution,
                                                 guint32 pipe,
                                                 guint32 num_packets,
@@ -5268,7 +5268,7 @@ gsk_spv_writer_group_reserve_read_pipe_packets (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_group_reserve_write_pipe_packets (GskSpvWriter *writer,
                                                  GskSpvWriterSection section,
-                                                 GskSlType * result_type,
+                                                 GskSlType *result_type,
                                                  guint32 execution,
                                                  guint32 pipe,
                                                  guint32 num_packets,
@@ -5338,7 +5338,7 @@ gsk_spv_writer_group_commit_write_pipe (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_enqueue_marker (GskSpvWriter *writer,
                                GskSpvWriterSection section,
-                               GskSlType * result_type,
+                               GskSlType *result_type,
                                guint32 queue,
                                guint32 num_events,
                                guint32 wait_events,
@@ -5364,7 +5364,7 @@ gsk_spv_writer_enqueue_marker (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_enqueue_kernel (GskSpvWriter *writer,
                                GskSpvWriterSection section,
-                               GskSlType * result_type,
+                               GskSlType *result_type,
                                guint32 queue,
                                guint32 flags,
                                guint32 nd_range,
@@ -5405,7 +5405,7 @@ gsk_spv_writer_enqueue_kernel (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_get_kernel_n_drange_sub_group_count (GskSpvWriter *writer,
                                                     GskSpvWriterSection section,
-                                                    GskSlType * result_type,
+                                                    GskSlType *result_type,
                                                     guint32 nd_range,
                                                     guint32 invoke,
                                                     guint32 param,
@@ -5433,7 +5433,7 @@ gsk_spv_writer_get_kernel_n_drange_sub_group_count (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_get_kernel_n_drange_max_sub_group_size (GskSpvWriter *writer,
                                                        GskSpvWriterSection section,
-                                                       GskSlType * result_type,
+                                                       GskSlType *result_type,
                                                        guint32 nd_range,
                                                        guint32 invoke,
                                                        guint32 param,
@@ -5461,7 +5461,7 @@ gsk_spv_writer_get_kernel_n_drange_max_sub_group_size (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_get_kernel_work_group_size (GskSpvWriter *writer,
                                            GskSpvWriterSection section,
-                                           GskSlType * result_type,
+                                           GskSlType *result_type,
                                            guint32 invoke,
                                            guint32 param,
                                            guint32 param_size,
@@ -5487,7 +5487,7 @@ gsk_spv_writer_get_kernel_work_group_size (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_get_kernel_preferred_work_group_size_multiple (GskSpvWriter *writer,
                                                               GskSpvWriterSection section,
-                                                              GskSlType * result_type,
+                                                              GskSlType *result_type,
                                                               guint32 invoke,
                                                               guint32 param,
                                                               guint32 param_size,
@@ -5539,7 +5539,7 @@ gsk_spv_writer_release_event (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_create_user_event (GskSpvWriter *writer,
                                   GskSpvWriterSection section,
-                                  GskSlType * result_type)
+                                  GskSlType *result_type)
 {
   GArray *bytes = gsk_spv_writer_get_bytes (writer, section);
   guint32 result_type_id = gsk_spv_writer_get_id_for_type (writer, result_type);
@@ -5557,7 +5557,7 @@ gsk_spv_writer_create_user_event (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_is_valid_event (GskSpvWriter *writer,
                                GskSpvWriterSection section,
-                               GskSlType * result_type,
+                               GskSlType *result_type,
                                guint32 event)
 {
   GArray *bytes = gsk_spv_writer_get_bytes (writer, section);
@@ -5609,7 +5609,7 @@ gsk_spv_writer_capture_event_profiling_info (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_get_default_queue (GskSpvWriter *writer,
                                   GskSpvWriterSection section,
-                                  GskSlType * result_type)
+                                  GskSlType *result_type)
 {
   GArray *bytes = gsk_spv_writer_get_bytes (writer, section);
   guint32 result_type_id = gsk_spv_writer_get_id_for_type (writer, result_type);
@@ -5627,7 +5627,7 @@ gsk_spv_writer_get_default_queue (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_build_nd_range (GskSpvWriter *writer,
                                GskSpvWriterSection section,
-                               GskSlType * result_type,
+                               GskSlType *result_type,
                                guint32 global_work_size,
                                guint32 local_work_size,
                                guint32 global_work_offset)
@@ -5651,7 +5651,7 @@ gsk_spv_writer_build_nd_range (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_image_sparse_sample_implicit_lod (GskSpvWriter *writer,
                                                  GskSpvWriterSection section,
-                                                 GskSlType * result_type,
+                                                 GskSlType *result_type,
                                                  guint32 sampled_image,
                                                  guint32 coordinate,
                                                  GskSpvImageOperands opt_image_operands)
@@ -5676,7 +5676,7 @@ gsk_spv_writer_image_sparse_sample_implicit_lod (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_image_sparse_sample_explicit_lod (GskSpvWriter *writer,
                                                  GskSpvWriterSection section,
-                                                 GskSlType * result_type,
+                                                 GskSlType *result_type,
                                                  guint32 sampled_image,
                                                  guint32 coordinate,
                                                  GskSpvImageOperands image_operands)
@@ -5700,7 +5700,7 @@ gsk_spv_writer_image_sparse_sample_explicit_lod (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_image_sparse_sample_dref_implicit_lod (GskSpvWriter *writer,
                                                       GskSpvWriterSection section,
-                                                      GskSlType * result_type,
+                                                      GskSlType *result_type,
                                                       guint32 sampled_image,
                                                       guint32 coordinate,
                                                       guint32 d_ref_,
@@ -5727,7 +5727,7 @@ gsk_spv_writer_image_sparse_sample_dref_implicit_lod (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_image_sparse_sample_dref_explicit_lod (GskSpvWriter *writer,
                                                       GskSpvWriterSection section,
-                                                      GskSlType * result_type,
+                                                      GskSlType *result_type,
                                                       guint32 sampled_image,
                                                       guint32 coordinate,
                                                       guint32 d_ref_,
@@ -5753,7 +5753,7 @@ gsk_spv_writer_image_sparse_sample_dref_explicit_lod (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_image_sparse_sample_proj_implicit_lod (GskSpvWriter *writer,
                                                       GskSpvWriterSection section,
-                                                      GskSlType * result_type,
+                                                      GskSlType *result_type,
                                                       guint32 sampled_image,
                                                       guint32 coordinate,
                                                       GskSpvImageOperands opt_image_operands)
@@ -5778,7 +5778,7 @@ gsk_spv_writer_image_sparse_sample_proj_implicit_lod (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_image_sparse_sample_proj_explicit_lod (GskSpvWriter *writer,
                                                       GskSpvWriterSection section,
-                                                      GskSlType * result_type,
+                                                      GskSlType *result_type,
                                                       guint32 sampled_image,
                                                       guint32 coordinate,
                                                       GskSpvImageOperands image_operands)
@@ -5802,7 +5802,7 @@ gsk_spv_writer_image_sparse_sample_proj_explicit_lod (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_image_sparse_sample_proj_dref_implicit_lod (GskSpvWriter *writer,
                                                            GskSpvWriterSection section,
-                                                           GskSlType * result_type,
+                                                           GskSlType *result_type,
                                                            guint32 sampled_image,
                                                            guint32 coordinate,
                                                            guint32 d_ref_,
@@ -5829,7 +5829,7 @@ gsk_spv_writer_image_sparse_sample_proj_dref_implicit_lod (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_image_sparse_sample_proj_dref_explicit_lod (GskSpvWriter *writer,
                                                            GskSpvWriterSection section,
-                                                           GskSlType * result_type,
+                                                           GskSlType *result_type,
                                                            guint32 sampled_image,
                                                            guint32 coordinate,
                                                            guint32 d_ref_,
@@ -5855,7 +5855,7 @@ gsk_spv_writer_image_sparse_sample_proj_dref_explicit_lod (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_image_sparse_fetch (GskSpvWriter *writer,
                                    GskSpvWriterSection section,
-                                   GskSlType * result_type,
+                                   GskSlType *result_type,
                                    guint32 image,
                                    guint32 coordinate,
                                    GskSpvImageOperands opt_image_operands)
@@ -5880,7 +5880,7 @@ gsk_spv_writer_image_sparse_fetch (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_image_sparse_gather (GskSpvWriter *writer,
                                     GskSpvWriterSection section,
-                                    GskSlType * result_type,
+                                    GskSlType *result_type,
                                     guint32 sampled_image,
                                     guint32 coordinate,
                                     guint32 component,
@@ -5907,7 +5907,7 @@ gsk_spv_writer_image_sparse_gather (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_image_sparse_dref_gather (GskSpvWriter *writer,
                                          GskSpvWriterSection section,
-                                         GskSlType * result_type,
+                                         GskSlType *result_type,
                                          guint32 sampled_image,
                                          guint32 coordinate,
                                          guint32 d_ref_,
@@ -5934,7 +5934,7 @@ gsk_spv_writer_image_sparse_dref_gather (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_image_sparse_texels_resident (GskSpvWriter *writer,
                                              GskSpvWriterSection section,
-                                             GskSlType * result_type,
+                                             GskSlType *result_type,
                                              guint32 resident_code)
 {
   GArray *bytes = gsk_spv_writer_get_bytes (writer, section);
@@ -5965,7 +5965,7 @@ gsk_spv_writer_no_line (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_atomic_flag_test_and_set (GskSpvWriter *writer,
                                          GskSpvWriterSection section,
-                                         GskSlType * result_type,
+                                         GskSlType *result_type,
                                          guint32 pointer,
                                          guint32 scope,
                                          guint32 semantics)
@@ -6006,7 +6006,7 @@ gsk_spv_writer_atomic_flag_clear (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_image_sparse_read (GskSpvWriter *writer,
                                   GskSpvWriterSection section,
-                                  GskSlType * result_type,
+                                  GskSlType *result_type,
                                   guint32 image,
                                   guint32 coordinate,
                                   GskSpvImageOperands opt_image_operands)
@@ -6031,7 +6031,7 @@ gsk_spv_writer_image_sparse_read (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_subgroup_ballot_khr (GskSpvWriter *writer,
                                     GskSpvWriterSection section,
-                                    GskSlType * result_type,
+                                    GskSlType *result_type,
                                     guint32 predicate)
 {
   GArray *bytes = gsk_spv_writer_get_bytes (writer, section);
@@ -6051,7 +6051,7 @@ gsk_spv_writer_subgroup_ballot_khr (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_subgroup_first_invocation_khr (GskSpvWriter *writer,
                                               GskSpvWriterSection section,
-                                              GskSlType * result_type,
+                                              GskSlType *result_type,
                                               guint32 value)
 {
   GArray *bytes = gsk_spv_writer_get_bytes (writer, section);
@@ -6071,7 +6071,7 @@ gsk_spv_writer_subgroup_first_invocation_khr (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_subgroup_all_khr (GskSpvWriter *writer,
                                  GskSpvWriterSection section,
-                                 GskSlType * result_type,
+                                 GskSlType *result_type,
                                  guint32 predicate)
 {
   GArray *bytes = gsk_spv_writer_get_bytes (writer, section);
@@ -6091,7 +6091,7 @@ gsk_spv_writer_subgroup_all_khr (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_subgroup_any_khr (GskSpvWriter *writer,
                                  GskSpvWriterSection section,
-                                 GskSlType * result_type,
+                                 GskSlType *result_type,
                                  guint32 predicate)
 {
   GArray *bytes = gsk_spv_writer_get_bytes (writer, section);
@@ -6111,7 +6111,7 @@ gsk_spv_writer_subgroup_any_khr (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_subgroup_all_equal_khr (GskSpvWriter *writer,
                                        GskSpvWriterSection section,
-                                       GskSlType * result_type,
+                                       GskSlType *result_type,
                                        guint32 predicate)
 {
   GArray *bytes = gsk_spv_writer_get_bytes (writer, section);
@@ -6131,7 +6131,7 @@ gsk_spv_writer_subgroup_all_equal_khr (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_subgroup_read_invocation_khr (GskSpvWriter *writer,
                                              GskSpvWriterSection section,
-                                             GskSlType * result_type,
+                                             GskSlType *result_type,
                                              guint32 value,
                                              guint32 index)
 {
@@ -6153,7 +6153,7 @@ gsk_spv_writer_subgroup_read_invocation_khr (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_group_i_add_non_uniform_amd (GskSpvWriter *writer,
                                             GskSpvWriterSection section,
-                                            GskSlType * result_type,
+                                            GskSlType *result_type,
                                             guint32 execution,
                                             GskSpvGroupOperation operation,
                                             guint32 x)
@@ -6177,7 +6177,7 @@ gsk_spv_writer_group_i_add_non_uniform_amd (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_group_f_add_non_uniform_amd (GskSpvWriter *writer,
                                             GskSpvWriterSection section,
-                                            GskSlType * result_type,
+                                            GskSlType *result_type,
                                             guint32 execution,
                                             GskSpvGroupOperation operation,
                                             guint32 x)
@@ -6201,7 +6201,7 @@ gsk_spv_writer_group_f_add_non_uniform_amd (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_group_f_min_non_uniform_amd (GskSpvWriter *writer,
                                             GskSpvWriterSection section,
-                                            GskSlType * result_type,
+                                            GskSlType *result_type,
                                             guint32 execution,
                                             GskSpvGroupOperation operation,
                                             guint32 x)
@@ -6225,7 +6225,7 @@ gsk_spv_writer_group_f_min_non_uniform_amd (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_group_u_min_non_uniform_amd (GskSpvWriter *writer,
                                             GskSpvWriterSection section,
-                                            GskSlType * result_type,
+                                            GskSlType *result_type,
                                             guint32 execution,
                                             GskSpvGroupOperation operation,
                                             guint32 x)
@@ -6249,7 +6249,7 @@ gsk_spv_writer_group_u_min_non_uniform_amd (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_group_s_min_non_uniform_amd (GskSpvWriter *writer,
                                             GskSpvWriterSection section,
-                                            GskSlType * result_type,
+                                            GskSlType *result_type,
                                             guint32 execution,
                                             GskSpvGroupOperation operation,
                                             guint32 x)
@@ -6273,7 +6273,7 @@ gsk_spv_writer_group_s_min_non_uniform_amd (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_group_f_max_non_uniform_amd (GskSpvWriter *writer,
                                             GskSpvWriterSection section,
-                                            GskSlType * result_type,
+                                            GskSlType *result_type,
                                             guint32 execution,
                                             GskSpvGroupOperation operation,
                                             guint32 x)
@@ -6297,7 +6297,7 @@ gsk_spv_writer_group_f_max_non_uniform_amd (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_group_u_max_non_uniform_amd (GskSpvWriter *writer,
                                             GskSpvWriterSection section,
-                                            GskSlType * result_type,
+                                            GskSlType *result_type,
                                             guint32 execution,
                                             GskSpvGroupOperation operation,
                                             guint32 x)
@@ -6321,7 +6321,7 @@ gsk_spv_writer_group_u_max_non_uniform_amd (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_group_s_max_non_uniform_amd (GskSpvWriter *writer,
                                             GskSpvWriterSection section,
-                                            GskSlType * result_type,
+                                            GskSlType *result_type,
                                             guint32 execution,
                                             GskSpvGroupOperation operation,
                                             guint32 x)
@@ -6345,7 +6345,7 @@ gsk_spv_writer_group_s_max_non_uniform_amd (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_fragment_mask_fetch_amd (GskSpvWriter *writer,
                                         GskSpvWriterSection section,
-                                        GskSlType * result_type,
+                                        GskSlType *result_type,
                                         guint32 image,
                                         guint32 coordinate)
 {
@@ -6367,7 +6367,7 @@ gsk_spv_writer_fragment_mask_fetch_amd (GskSpvWriter *writer,
 static inline guint32
 gsk_spv_writer_fragment_fetch_amd (GskSpvWriter *writer,
                                    GskSpvWriterSection section,
-                                   GskSlType * result_type,
+                                   GskSlType *result_type,
                                    guint32 image,
                                    guint32 coordinate,
                                    guint32 fragment_index)
diff --git a/gsk/gskspvwriterprivate.h b/gsk/gskspvwriterprivate.h
index b0c5faa..dedf337 100644
--- a/gsk/gskspvwriterprivate.h
+++ b/gsk/gskspvwriterprivate.h
@@ -61,7 +61,8 @@ GBytes *                gsk_spv_writer_write                    (GskSpvWriter
 guint32                 gsk_spv_writer_get_id_for_type          (GskSpvWriter           *writer,
                                                                  GskSlType              *type);
 guint32                 gsk_spv_writer_get_id_for_pointer_type  (GskSpvWriter           *writer,
-                                                                 GskSlPointerType       *type);
+                                                                 GskSlType              *type,
+                                                                 GskSpvStorageClass      storage);
 guint32                 gsk_spv_writer_get_id_for_value         (GskSpvWriter           *writer,
                                                                  GskSlValue             *value);
 guint32                 gsk_spv_writer_get_id_for_zero          (GskSpvWriter           *writer,
diff --git a/gsk/meson.build b/gsk/meson.build
index 716b3ed..07378c3 100644
--- a/gsk/meson.build
+++ b/gsk/meson.build
@@ -41,7 +41,6 @@ gsk_private_sources = files([
   'gskslfunction.c',
   'gskslnativefunction.c',
   'gskslpreprocessor.c',
-  'gskslpointertype.c',
   'gskslprinter.c',
   'gskslqualifier.c',
   'gskslscope.c',
diff --git a/gsk/spirv.js b/gsk/spirv.js
index f025292..6fab1dc 100644
--- a/gsk/spirv.js
+++ b/gsk/spirv.js
@@ -400,52 +400,52 @@ var Sections = {
 };
 
 var Operands = {
-  "IdMemorySemantics": { ctype: "guint32", ctype_suffix: "",
+  "IdMemorySemantics": { ctype: "guint32 {0}",
                          optional_unset: "0",
                          append_many: "g_array_append_vals ({0}, {1}, {2})",
                          append_one: "g_array_append_val ({0}, {1})" },
-  "IdRef": { ctype: "guint32", ctype_suffix: "",
+  "IdRef": { ctype: "guint32 {0}",
              optional_unset: "0",
              append_many: "g_array_append_vals ({0}, {1}, {2})",
              append_one: "g_array_append_val ({0}, {1})" },
-  "IdResult": { ctype: "guint32", ctype_suffix: "",
+  "IdResult": { ctype: "guint32 {0}",
                 optional_unset: "0",
                 declare_local: "guint32 {0}_id = gsk_spv_writer_make_id (writer);",
                 append_one: "g_array_append_val ({0}, {1}_id)" },
-  "IdResultType": { ctype: "GskSlType *", ctype_suffix: "",
+  "IdResultType": { ctype: "GskSlType *{0}",
                     optional_unset: "NULL",
                     declare_local: "guint32 {0}_id = gsk_spv_writer_get_id_for_type (writer, {0});",
                     append_one: "g_array_append_val ({0}, {1}_id)" },
-  "IdResultPointerType" : { ctype: "GskSlPointerType *", ctype_suffix: "",
+  "IdResultPointerType" : { ctype: "GskSlType *{0}, GskSpvStorageClass {0}_storage",
                             optional_unset: "NULL",
-                            declare_local: "guint32 {0}_id = gsk_spv_writer_get_id_for_pointer_type (writer, 
{0});",
+                            declare_local: "guint32 {0}_id = gsk_spv_writer_get_id_for_pointer_type (writer, 
{0}, {0}_storage);",
                             append_one: "g_array_append_val ({0}, {1}_id)" },
-  "IdScope": { ctype: "guint32", ctype_suffix: "",
+  "IdScope": { ctype: "guint32 {0}",
                optional_unset: "0",
                append_many: "g_array_append_vals ({0}, {1}, {2})",
                append_one: "g_array_append_val ({0}, {1})" },
-  "LiteralContextDependentNumber": { ctype: "guint32", ctype_suffix: "",
+  "LiteralContextDependentNumber": { ctype: "guint32 {0}",
                                      is_many: true,
                                      append_many: "g_array_append_vals ({0}, {1}, {2})" },
-  "LiteralExtInstInteger": { ctype: "guint32", ctype_suffix: "",
+  "LiteralExtInstInteger": { ctype: "guint32 {0}",
                              append_many: "g_array_append_vals ({0}, {1}, {2})",
                              append_one: "g_array_append_val ({0}, {1})" },
-  "LiteralInteger": { ctype: "guint32", ctype_suffix: "",
+  "LiteralInteger": { ctype: "guint32 {0}",
                       append_many: "g_array_append_vals ({0}, {1}, {2})",
                       append_one: "g_array_append_val ({0}, {1})" },
-  "LiteralString": { ctype: "const char *", ctype_suffix: "",
+  "LiteralString": { ctype: "const char *{0}",
                      optional_unset: "NULL",
                      append_one: "append_string ({0}, {1})" },
-  "LiteralSpecConstantOpInteger": { ctype: "guint32", ctype_suffix: "",
+  "LiteralSpecConstantOpInteger": { ctype: "guint32 {0}",
                                     is_many: true,
                                     append_many: "g_array_append_vals ({0}, {1}, {2})" },
-  "PairIdRefLiteralInteger": { ctype: "guint32", ctype_suffix: "[2]",
+  "PairIdRefLiteralInteger": { ctype: "guint32 {0}[2]",
                                append_many: "g_array_append_vals ({0}, {1}, 2 * {2})",
                                append_one: "g_array_append_vals ({0}, {1}, 2)" },
-  "PairIdRefIdRef": { ctype: "guint32", ctype_suffix: "[2]",
+  "PairIdRefIdRef": { ctype: "guint32 {0}[2]",
                       append_many: "g_array_append_vals ({0}, {1}, 2 * {2})",
                       append_one: "g_array_append_vals ({0}, {1}, 2)" },
-  "PairLiteralIntegerIdRef": { ctype: "guint32", ctype_suffix: "[2]",
+  "PairLiteralIntegerIdRef": { ctype: "guint32 {0}[2]",
                                append_many: "g_array_append_vals ({0}, {1}, 2 * {2})",
                                append_one: "g_array_append_vals ({0}, {1}, 2)" }
 };
@@ -456,7 +456,7 @@ for (let kind in spirv.operand_kinds)
     if (kind.category == "BitEnum" ||
         kind.category == "ValueEnum")
       {
-        Operands[kind.kind] = { ctype: "GskSpv" + kind.kind, ctype_suffix: "",
+        Operands[kind.kind] = { ctype: "GskSpv" + kind.kind + " {0}",
                                 append_one: "g_array_append_val ({0}, (guint32) { {1} })" };
         if (kind.category == "BitEnum")
           Operands[kind.kind].optional_unset = "0";
@@ -496,7 +496,6 @@ function fix_operand (ins, o)
     operand = Operands[o.kind];
 
   o.ctype = operand.ctype;
-  o.ctype_suffix = operand.ctype_suffix;
   if (operand.append_one)
     o.append_one = operand.append_one;
   if (operand.append_many)
@@ -655,12 +654,12 @@ else if (ARGV[0] == "functions")
                   }
                 if (o.quantifier == "*")
                   {
-                    print (Array(len+1).join(" ") + o.ctype + " *" + o.varname + o.ctype_suffix + ",")
+                    print (Array(len+1).join(" ") + o.ctype.format ("*" + o.varname) + ",");
                     print (Array(len+1).join(" ") + "gsize n_" + o.varname + (i + 2 - seen_result < 
ins.operands.length ? "," : ")"));
                   }
                 else
                   {
-                    print (Array(len+1).join(" ") + o.ctype + " " + o.varname +  o.ctype_suffix + (i + 2 - 
seen_result < ins.operands.length ? "," : ")"));
+                    print (Array(len+1).join(" ") + o.ctype.format (o.varname) + (i + 2 - seen_result < 
ins.operands.length ? "," : ")"));
                   }
               }
           }


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