spirv: Don't use special semantics when counting vertex attribute size
[mesa.git] / src / compiler / spirv / vtn_variables.c
index 91b24241fd3d33242a51a6dae7cbf656030c3f6b..ecdfd0c735f6ff7da674703efde6a6d29476085d 100644 (file)
@@ -1912,8 +1912,7 @@ is_per_vertex_inout(const struct vtn_variable *var, gl_shader_stage stage)
 }
 
 static void
-assign_missing_member_locations(struct vtn_variable *var,
-                                bool is_vertex_input)
+assign_missing_member_locations(struct vtn_variable *var)
 {
    unsigned length =
       glsl_get_length(glsl_without_array(var->type->type));
@@ -1950,7 +1949,8 @@ assign_missing_member_locations(struct vtn_variable *var,
          glsl_get_struct_field(glsl_without_array(var->type->type), i);
 
       location +=
-         glsl_count_attribute_slots(member_type, is_vertex_input);
+         glsl_count_attribute_slots(member_type,
+                                    false /* is_gl_vertex_input */);
    }
 }
 
@@ -2181,9 +2181,7 @@ vtn_create_variable(struct vtn_builder *b, struct vtn_value *val,
    if ((var->mode == vtn_variable_mode_input ||
         var->mode == vtn_variable_mode_output) &&
        var->var->members) {
-      bool is_vertex_input = (b->shader->info.stage == MESA_SHADER_VERTEX &&
-                              var->mode == vtn_variable_mode_input);
-      assign_missing_member_locations(var, is_vertex_input);
+      assign_missing_member_locations(var);
    }
 
    if (var->mode == vtn_variable_mode_uniform) {