summaryrefslogtreecommitdiffstats
path: root/src/compiler/spirv/vtn_variables.c
diff options
context:
space:
mode:
authorAlejandro Piñeiro <[email protected]>2017-11-05 12:00:19 +0100
committerAlejandro Piñeiro <[email protected]>2018-07-03 12:37:32 +0200
commitc6230b93587c6a8874b138e8efb9066e32c17381 (patch)
tree504e2e2446bc85af6c61ab03d399f6cbac58832f /src/compiler/spirv/vtn_variables.c
parent768c275debb2ccf0e3093a893e19345f359b5c58 (diff)
spirv/nir: add offset at vtn_variable
Also initialize it on var_decoration_cb This is equivalent to nir_variable.offset, used to store the location an atomic counter is stored at. Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/compiler/spirv/vtn_variables.c')
-rw-r--r--src/compiler/spirv/vtn_variables.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/compiler/spirv/vtn_variables.c b/src/compiler/spirv/vtn_variables.c
index 6a2144ceabb..c56d74d683b 100644
--- a/src/compiler/spirv/vtn_variables.c
+++ b/src/compiler/spirv/vtn_variables.c
@@ -1346,6 +1346,9 @@ var_decoration_cb(struct vtn_builder *b, struct vtn_value *val, int member,
case SpvDecorationPatch:
vtn_var->patch = true;
break;
+ case SpvDecorationOffset:
+ vtn_var->offset = dec->literals[0];
+ break;
default:
break;
}