nir/algebraic: Simplify fsat of fsign
[mesa.git] / src / compiler / nir_types.cpp
index 1fae6aa81801bb5f43bb304aabaf25790d5ef035..d24f09415196234382d67882621cb3ad5df1e278 100644 (file)
@@ -172,6 +172,13 @@ glsl_get_sampler_target(const struct glsl_type *type)
    return type->sampler_index();
 }
 
+int
+glsl_get_sampler_coordinate_components(const struct glsl_type *type)
+{
+   assert(glsl_type_is_sampler(type) || glsl_type_is_image(type));
+   return type->coordinate_components();
+}
+
 unsigned
 glsl_get_record_location_offset(const struct glsl_type *type,
                                 unsigned length)