+ if (nir_variable_is_in_ssbo(var) &&
+ !(var->data.access & ACCESS_NON_WRITEABLE)) {
+ unsigned array_size = is_interface_array ?
+ glsl_get_length(var->type) : 1;
+
+ STATIC_ASSERT(MAX_SHADER_STORAGE_BUFFERS <= 32);
+
+ /* Shaders that use too many SSBOs will fail to compile, which
+ * we don't care about.
+ *
+ * This is true for shaders that do not use too many SSBOs:
+ */
+ if (buffer_block_index + array_size <= 32) {
+ state.shader_storage_blocks_write_access |=
+ u_bit_consecutive(buffer_block_index, array_size);
+ }
+ }
+ }
+
+ if (!prog->data->spirv && state.var_is_in_block &&
+ glsl_without_array(state.current_var->type) != state.current_var->interface_type) {
+