aboutsummaryrefslogtreecommitdiffstats
path: root/src/compiler
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/spirv/vtn_private.h1
-rw-r--r--src/compiler/spirv/vtn_variables.c2
2 files changed, 3 insertions, 0 deletions
diff --git a/src/compiler/spirv/vtn_private.h b/src/compiler/spirv/vtn_private.h
index 232396775df..bef82dfb5b5 100644
--- a/src/compiler/spirv/vtn_private.h
+++ b/src/compiler/spirv/vtn_private.h
@@ -456,6 +456,7 @@ struct vtn_variable {
unsigned descriptor_set;
unsigned binding;
+ bool explicit_binding;
unsigned input_attachment_index;
bool patch;
diff --git a/src/compiler/spirv/vtn_variables.c b/src/compiler/spirv/vtn_variables.c
index 225b088ecbc..df88abdbd63 100644
--- a/src/compiler/spirv/vtn_variables.c
+++ b/src/compiler/spirv/vtn_variables.c
@@ -1507,6 +1507,7 @@ var_decoration_cb(struct vtn_builder *b, struct vtn_value *val, int member,
switch (dec->decoration) {
case SpvDecorationBinding:
vtn_var->binding = dec->literals[0];
+ vtn_var->explicit_binding = true;
return;
case SpvDecorationDescriptorSet:
vtn_var->descriptor_set = dec->literals[0];
@@ -1930,6 +1931,7 @@ vtn_create_variable(struct vtn_builder *b, struct vtn_value *val,
* for these. We should fix that.
*/
var->var->data.binding = var->binding;
+ var->var->data.explicit_binding = var->explicit_binding;
var->var->data.descriptor_set = var->descriptor_set;
var->var->data.index = var->input_attachment_index;