summaryrefslogtreecommitdiff
path: root/src/compiler/glsl/ast_to_hir.cpp
diff options
context:
space:
mode:
authorErik Faye-Lund <erik.faye-lund@collabora.com>2018-10-25 16:01:00 +0200
committerErik Faye-Lund <erik.faye-lund@collabora.com>2018-11-02 11:10:36 +0100
commite975c5b785f9e6d0c5ccec12a027b19a6073130c (patch)
tree614c5fca869f3b990956740325babc4f9f7c9781 /src/compiler/glsl/ast_to_hir.cpp
parent12f001f013c71ac43b67df7bf67f9cd3581c9871 (diff)
glsl: add has_implicit_uint_to_int_conversion()-helper
This makes the code a bit easier to read, as well as reduces repetition, especially when we add support for EXT_shader_implicit_conversions. Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Diffstat (limited to 'src/compiler/glsl/ast_to_hir.cpp')
-rw-r--r--src/compiler/glsl/ast_to_hir.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/compiler/glsl/ast_to_hir.cpp b/src/compiler/glsl/ast_to_hir.cpp
index 6d4b2c6aa5d..7f30a708855 100644
--- a/src/compiler/glsl/ast_to_hir.cpp
+++ b/src/compiler/glsl/ast_to_hir.cpp
@@ -250,8 +250,7 @@ get_implicit_conversion_operation(const glsl_type *to, const glsl_type *from,
}
case GLSL_TYPE_UINT:
- if (!state->is_version(400, 0) && !state->ARB_gpu_shader5_enable
- && !state->MESA_shader_integer_functions_enable)
+ if (!state->has_implicit_uint_to_int_conversion())
return (ir_expression_operation)0;
switch (from->base_type) {
case GLSL_TYPE_INT: return ir_unop_i2u;