summaryrefslogtreecommitdiffstats
path: root/src/compiler/spirv/vtn_variables.c
diff options
context:
space:
mode:
authorAlejandro Piñeiro <[email protected]>2017-11-05 16:19:43 +0100
committerAlejandro Piñeiro <[email protected]>2018-07-03 12:41:46 +0200
commitc3eb0ba0ffa164009174e647c2f31ebc1c8fef74 (patch)
treec55e00ee1bafb79dd616fd6b2c6cb44e516cb9b4 /src/compiler/spirv/vtn_variables.c
parent4110bc4c17990e5b10da6c3dcf8ad6fbd5b99656 (diff)
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 <[email protected]>
Diffstat (limited to 'src/compiler/spirv/vtn_variables.c')
-rw-r--r--src/compiler/spirv/vtn_variables.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/compiler/spirv/vtn_variables.c b/src/compiler/spirv/vtn_variables.c
index ae5122bcd5f..b7c9e6f2f70 100644
--- a/src/compiler/spirv/vtn_variables.c
+++ b/src/compiler/spirv/vtn_variables.c
@@ -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;