if (glsl_get_base_type(glsl_without_array(variable->type)) == GLSL_TYPE_FLOAT) {
unsigned interp_type;
- if (variable->data.sample) {
+ if (variable->data.sample)
interp_type = INTERP_SAMPLE;
- ctx->shader_info->info.ps.force_persample = true;
- } else if (variable->data.centroid)
+ else if (variable->data.centroid)
interp_type = INTERP_CENTROID;
else
interp_type = INTERP_CENTER;
}
}
+static void
+gather_info_input_decl_ps(const nir_shader *nir, const nir_variable *var,
+ struct ac_shader_info *info)
+{
+ const struct glsl_type *type = glsl_without_array(var->type);
+
+ if (glsl_get_base_type(type) == GLSL_TYPE_FLOAT) {
+ if (var->data.sample)
+ info->ps.force_persample = true;
+ }
+}
+
static void
gather_info_input_decl(const nir_shader *nir, const nir_variable *var,
struct ac_shader_info *info)
case MESA_SHADER_VERTEX:
info->vs.has_vertex_buffers = true;
break;
+ case MESA_SHADER_FRAGMENT:
+ gather_info_input_decl_ps(nir, var, info);
+ break;
default:
break;
}