nir/spirv: Add support for the Uniform storage class
authorJason Ekstrand <jason.ekstrand@intel.com>
Thu, 25 Jun 2015 03:32:03 +0000 (20:32 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Thu, 25 Jun 2015 03:32:05 +0000 (20:32 -0700)
This is kida sketchy.  I'm not really sure this is the way it's supposed to
be used.

src/glsl/nir/spirv_to_nir.c

index dcb94fc..8394ab7 100644 (file)
@@ -532,6 +532,7 @@ vtn_handle_variables(struct vtn_builder *b, SpvOp opcode,
       var->name = ralloc_strdup(var, val->name);
 
       switch ((SpvStorageClass)w[3]) {
+      case SpvStorageClassUniform:
       case SpvStorageClassUniformConstant:
          var->data.mode = nir_var_uniform;
          var->data.read_only = true;
@@ -549,7 +550,6 @@ vtn_handle_variables(struct vtn_builder *b, SpvOp opcode,
       case SpvStorageClassFunction:
          var->data.mode = nir_var_local;
          break;
-      case SpvStorageClassUniform:
       case SpvStorageClassWorkgroupLocal:
       case SpvStorageClassWorkgroupGlobal:
       case SpvStorageClassGeneric: