mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-28 03:50:13 +01:00
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:
parent
768c275deb
commit
c6230b9358
2 changed files with 4 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue