glsl: add has_implicit_uint_to_int_conversion()-helper
[mesa.git] / src / compiler / glsl_types.cpp
index bcc36e50d7fee01ee0f7ba368b31d0dfa437fbcd..e6262371bd0c7a6f3a54dbcab07c3d189f0cba0a 100644 (file)
@@ -1446,8 +1446,7 @@ glsl_type::can_implicitly_convert_to(const glsl_type *desired,
     * state-dependent checks have already happened though, so allow anything
     * that's allowed in any shader version.
     */
-   if ((!state || state->is_version(400, 0) || state->ARB_gpu_shader5_enable ||
-        state->MESA_shader_integer_functions_enable) &&
+   if ((!state || state->has_implicit_uint_to_int_conversion()) &&
          desired->base_type == GLSL_TYPE_UINT && this->base_type == GLSL_TYPE_INT)
       return true;