[gtk+/wip/otte/shader: 167/200] gsksl: Get rid of pointer types



commit 10c9d845793ed631bcb89a64a221ecbb771b8f01
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 380d7c2..21ff9af 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 bd0d510..427ab46 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 3b7262e..d106688 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);
@@ -1396,7 +1396,7 @@ gsk_spv_writer_copy_object (GskSpvWriter *writer,
 
 static inline guint32
 gsk_spv_writer_transpose (GskSpvWriter *writer,
-                          GskSlType * result_type,
+                          GskSlType *result_type,
                           guint32 matrix)
 {
   GArray *bytes = gsk_spv_writer_get_bytes (writer, GSK_SPV_WRITER_SECTION_CODE);
@@ -1416,7 +1416,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)
 {
@@ -1438,7 +1438,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)
@@ -1463,7 +1463,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)
@@ -1487,7 +1487,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_,
@@ -1514,7 +1514,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_,
@@ -1540,7 +1540,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)
@@ -1565,7 +1565,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)
@@ -1589,7 +1589,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_,
@@ -1616,7 +1616,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_,
@@ -1642,7 +1642,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)
@@ -1667,7 +1667,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,
@@ -1694,7 +1694,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_,
@@ -1721,7 +1721,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)
@@ -1766,7 +1766,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);
@@ -1786,7 +1786,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);
@@ -1806,7 +1806,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);
@@ -1826,7 +1826,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)
 {
@@ -1848,7 +1848,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);
@@ -1868,7 +1868,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)
 {
@@ -1890,7 +1890,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);
@@ -1910,7 +1910,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);
@@ -1929,7 +1929,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);
@@ -1948,7 +1948,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);
@@ -1967,7 +1967,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);
@@ -1986,7 +1986,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);
@@ -2005,7 +2005,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);
@@ -2024,7 +2024,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);
@@ -2043,7 +2043,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);
@@ -2062,7 +2062,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);
@@ -2081,7 +2081,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);
@@ -2100,7 +2100,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);
@@ -2119,7 +2119,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);
@@ -2138,11 +2138,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;
 
@@ -2157,11 +2157,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;
 
@@ -2176,11 +2176,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;
 
@@ -2195,12 +2195,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;
 
@@ -2216,7 +2216,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);
@@ -2235,7 +2235,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);
@@ -2254,7 +2254,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);
@@ -2273,7 +2273,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)
 {
@@ -2294,7 +2294,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)
 {
@@ -2315,7 +2315,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)
 {
@@ -2336,7 +2336,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)
 {
@@ -2357,7 +2357,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)
 {
@@ -2378,7 +2378,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)
 {
@@ -2399,7 +2399,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)
 {
@@ -2420,7 +2420,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)
 {
@@ -2441,7 +2441,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)
 {
@@ -2462,7 +2462,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)
 {
@@ -2483,7 +2483,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)
 {
@@ -2504,7 +2504,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)
 {
@@ -2525,7 +2525,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)
 {
@@ -2546,7 +2546,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)
 {
@@ -2567,7 +2567,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)
 {
@@ -2588,7 +2588,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)
 {
@@ -2609,7 +2609,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)
 {
@@ -2630,7 +2630,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)
 {
@@ -2651,7 +2651,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)
 {
@@ -2672,7 +2672,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)
 {
@@ -2693,7 +2693,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)
 {
@@ -2714,7 +2714,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)
 {
@@ -2735,7 +2735,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)
 {
@@ -2756,7 +2756,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)
 {
@@ -2777,7 +2777,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)
 {
@@ -2798,7 +2798,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);
@@ -2817,7 +2817,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);
@@ -2836,7 +2836,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);
@@ -2855,7 +2855,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);
@@ -2874,7 +2874,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);
@@ -2893,7 +2893,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);
@@ -2912,7 +2912,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);
@@ -2931,7 +2931,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)
 {
@@ -2952,7 +2952,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)
 {
@@ -2973,7 +2973,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)
 {
@@ -2994,7 +2994,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)
 {
@@ -3015,7 +3015,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)
 {
@@ -3036,7 +3036,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)
 {
@@ -3057,7 +3057,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)
 {
@@ -3078,7 +3078,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);
@@ -3097,7 +3097,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)
@@ -3120,7 +3120,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)
 {
@@ -3141,7 +3141,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)
 {
@@ -3162,7 +3162,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)
 {
@@ -3183,7 +3183,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)
 {
@@ -3204,7 +3204,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)
 {
@@ -3225,7 +3225,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)
 {
@@ -3246,7 +3246,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)
 {
@@ -3267,7 +3267,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)
 {
@@ -3288,7 +3288,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)
 {
@@ -3309,7 +3309,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)
 {
@@ -3330,7 +3330,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)
 {
@@ -3351,7 +3351,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)
 {
@@ -3372,7 +3372,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)
 {
@@ -3393,7 +3393,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)
 {
@@ -3414,7 +3414,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)
 {
@@ -3435,7 +3435,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)
 {
@@ -3456,7 +3456,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)
 {
@@ -3477,7 +3477,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)
 {
@@ -3498,7 +3498,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)
 {
@@ -3519,7 +3519,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)
 {
@@ -3540,7 +3540,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)
 {
@@ -3561,7 +3561,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)
 {
@@ -3582,7 +3582,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)
 {
@@ -3603,7 +3603,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)
 {
@@ -3624,7 +3624,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)
 {
@@ -3645,7 +3645,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)
 {
@@ -3666,7 +3666,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)
 {
@@ -3687,7 +3687,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)
 {
@@ -3708,7 +3708,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);
@@ -3727,7 +3727,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,
@@ -3752,7 +3752,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)
@@ -3775,7 +3775,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)
@@ -3798,7 +3798,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);
@@ -3817,7 +3817,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);
@@ -3836,7 +3836,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);
@@ -3855,7 +3855,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);
@@ -3874,7 +3874,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);
@@ -3893,7 +3893,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);
@@ -3912,7 +3912,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);
@@ -3931,7 +3931,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);
@@ -3950,7 +3950,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);
@@ -3969,7 +3969,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);
@@ -3988,7 +3988,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);
@@ -4081,7 +4081,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)
@@ -4122,7 +4122,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,
@@ -4147,7 +4147,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,
@@ -4176,7 +4176,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,
@@ -4205,7 +4205,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)
@@ -4228,7 +4228,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)
@@ -4251,7 +4251,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,
@@ -4276,7 +4276,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,
@@ -4301,7 +4301,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,
@@ -4326,7 +4326,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,
@@ -4351,7 +4351,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,
@@ -4376,7 +4376,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,
@@ -4401,7 +4401,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,
@@ -4426,7 +4426,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,
@@ -4451,7 +4451,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,
@@ -4476,7 +4476,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)
 {
@@ -4662,7 +4662,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,
@@ -4709,7 +4709,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)
 {
@@ -4731,7 +4731,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)
 {
@@ -4753,7 +4753,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)
@@ -4777,7 +4777,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)
@@ -4801,7 +4801,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)
@@ -4825,7 +4825,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)
@@ -4849,7 +4849,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)
@@ -4873,7 +4873,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)
@@ -4897,7 +4897,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)
@@ -4921,7 +4921,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)
@@ -4945,7 +4945,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)
@@ -4969,7 +4969,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,
@@ -4995,7 +4995,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,
@@ -5021,7 +5021,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,
@@ -5051,7 +5051,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,
@@ -5081,7 +5081,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,
@@ -5107,7 +5107,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,
@@ -5171,7 +5171,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);
@@ -5191,7 +5191,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)
@@ -5215,7 +5215,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)
@@ -5239,7 +5239,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,
@@ -5267,7 +5267,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,
@@ -5337,7 +5337,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,
@@ -5363,7 +5363,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,
@@ -5404,7 +5404,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,
@@ -5432,7 +5432,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,
@@ -5460,7 +5460,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,
@@ -5486,7 +5486,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,
@@ -5538,7 +5538,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);
@@ -5556,7 +5556,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);
@@ -5608,7 +5608,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);
@@ -5626,7 +5626,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)
@@ -5650,7 +5650,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)
@@ -5675,7 +5675,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)
@@ -5699,7 +5699,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_,
@@ -5726,7 +5726,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_,
@@ -5752,7 +5752,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)
@@ -5777,7 +5777,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)
@@ -5801,7 +5801,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_,
@@ -5828,7 +5828,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_,
@@ -5854,7 +5854,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)
@@ -5879,7 +5879,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,
@@ -5906,7 +5906,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_,
@@ -5933,7 +5933,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);
@@ -5964,7 +5964,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)
@@ -6005,7 +6005,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)
@@ -6030,7 +6030,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);
@@ -6050,7 +6050,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);
@@ -6070,7 +6070,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);
@@ -6090,7 +6090,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);
@@ -6110,7 +6110,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);
@@ -6130,7 +6130,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)
 {
@@ -6152,7 +6152,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)
@@ -6176,7 +6176,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)
@@ -6200,7 +6200,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)
@@ -6224,7 +6224,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)
@@ -6248,7 +6248,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)
@@ -6272,7 +6272,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)
@@ -6296,7 +6296,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)
@@ -6320,7 +6320,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)
@@ -6344,7 +6344,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)
 {
@@ -6366,7 +6366,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 bd5e588..63dcf87 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]