spirv/nir: initialize offset on the nir var at vtn_create_variable

This is convenient when dealing with atomic counter uniforms. The
alternative would be doing that at vtn_handle_atomics.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
This commit is contained in:
Alejandro Piñeiro
2017-11-05 16:19:43 +01:00
parent 4110bc4c17
commit c3eb0ba0ff
+1
View File
@@ -1788,6 +1788,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;