Right now, a type is considered a ubo/ssbo if the mode is uniform/shader_storage and the interface_type is different to NULL. See ir_variable::in_in_buffer_block as an example. --- src/compiler/spirv/vtn_variables.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/src/compiler/spirv/vtn_variables.c b/src/compiler/spirv/vtn_variables.c index 53359c41005..2c367b14607 100644 --- a/src/compiler/spirv/vtn_variables.c +++ b/src/compiler/spirv/vtn_variables.c @@ -1694,7 +1694,16 @@ vtn_create_variable(struct vtn_builder *b, struct vtn_value *val, } var->var->data.mode = nir_mode; var->var->data.location = -1; - var->var->interface_type = NULL; + + switch (var->mode) { + case vtn_variable_mode_ubo: + case vtn_variable_mode_ssbo: + var->var->interface_type = without_array->type; + break; + default: + var->var->interface_type = NULL; + break; + } break; case vtn_variable_mode_workgroup: -- 2.14.1 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev