spirv: Only do a block load if you're actually loading a uniform
authorJason Ekstrand <jason.ekstrand@intel.com>
Fri, 28 Aug 2015 23:17:45 +0000 (16:17 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Fri, 28 Aug 2015 23:17:45 +0000 (16:17 -0700)
src/glsl/nir/spirv_to_nir.c

index 3cbaf3c861628b6651aad833c616e95ab75a4e9b..ffaebf10502fff1066dee59ef2baf222a5da170e 100644 (file)
@@ -1147,7 +1147,7 @@ vtn_variable_load(struct vtn_builder *b, nir_deref_var *src,
    nir_deref *src_tail = get_deref_tail(src);
 
    struct vtn_ssa_value *val;
-   if (src->var->interface_type)
+   if (src->var->interface_type && src->var->data.mode == nir_var_uniform)
       val = vtn_block_load(b, src, src_type, src_tail);
    else
       val = _vtn_variable_load(b, src, src_type, src_tail);