[Mesa-dev] [PATCH 10/18] spirv/nir: initialize offset on the nir var at vtn_create_variable

Alejandro PiƱeiro apinheiro at igalia.com
Fri Jun 29 14:28:56 UTC 2018


This is convenient when dealing with atomic counter uniforms. The
alternative would be doing that at vtn_handle_atomics.
---
 src/compiler/spirv/vtn_variables.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/compiler/spirv/vtn_variables.c b/src/compiler/spirv/vtn_variables.c
index c75492ef43f..b3adaecc36b 100644
--- a/src/compiler/spirv/vtn_variables.c
+++ b/src/compiler/spirv/vtn_variables.c
@@ -1801,6 +1801,7 @@ vtn_create_variable(struct vtn_builder *b, struct vtn_value *val,
       var->var->data.explicit_binding = var->explicit_binding;
       var->var->data.descriptor_set = var->descriptor_set;
       var->var->data.index = var->input_attachment_index;
+      var->var->data.offset = var->offset;
 
       if (glsl_type_is_image(without_array->type))
          var->var->data.image.format = without_array->image_format;
-- 
2.14.1



More information about the mesa-dev mailing list