nir/lower_amul: Add a variable mode check
[mesa.git] / src / compiler / glsl_types.cpp
index a1c1beae87246c26d6e8184cb8400452e350e8c7..d6315845e683973afd220071c62864bffd9076f5 100644 (file)
@@ -473,6 +473,28 @@ const glsl_type *glsl_type::get_float16_type() const
                        this->interface_row_major);
 }
 
+const glsl_type *glsl_type::get_int16_type() const
+{
+   assert(this->base_type == GLSL_TYPE_INT);
+
+   return get_instance(GLSL_TYPE_INT16,
+                       this->vector_elements,
+                       this->matrix_columns,
+                       this->explicit_stride,
+                       this->interface_row_major);
+}
+
+const glsl_type *glsl_type::get_uint16_type() const
+{
+   assert(this->base_type == GLSL_TYPE_UINT);
+
+   return get_instance(GLSL_TYPE_UINT16,
+                       this->vector_elements,
+                       this->matrix_columns,
+                       this->explicit_stride,
+                       this->interface_row_major);
+}
+
 static void
 hash_free_type_function(struct hash_entry *entry)
 {