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 <tarceri@itsqueeze.com>
This commit is contained in:
@@ -465,6 +465,7 @@ struct vtn_variable {
|
||||
unsigned descriptor_set;
|
||||
unsigned binding;
|
||||
bool explicit_binding;
|
||||
unsigned offset;
|
||||
unsigned input_attachment_index;
|
||||
bool patch;
|
||||
|
||||
|
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user