nir/spirv: Stop trying to convert pointers to SSA in glsl450
authorJason Ekstrand <jason.ekstrand@intel.com>
Sat, 1 Jul 2017 00:59:06 +0000 (17:59 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Wed, 5 Jul 2017 22:26:55 +0000 (15:26 -0700)
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
src/compiler/spirv/vtn_glsl450.c

index 1d7e2b8d95b283d08c71ce6ddd7c67f58712cc59..c30dcc74addae6fe0b6de6836c7bdde554059a04 100644 (file)
@@ -483,8 +483,13 @@ handle_glsl450_alu(struct vtn_builder *b, enum GLSLstd450 entrypoint,
    /* Collect the various SSA sources */
    unsigned num_inputs = count - 5;
    nir_ssa_def *src[3] = { NULL, };
-   for (unsigned i = 0; i < num_inputs; i++)
+   for (unsigned i = 0; i < num_inputs; i++) {
+      /* These are handled specially below */
+      if (vtn_untyped_value(b, w[i + 5])->value_type == vtn_value_type_pointer)
+         continue;
+
       src[i] = vtn_ssa_value(b, w[i + 5])->def;
+   }
 
    switch (entrypoint) {
    case GLSLstd450Radians: