diff options
author | Erik Faye-Lund <[email protected]> | 2018-10-25 16:40:13 +0200 |
---|---|---|
committer | Erik Faye-Lund <[email protected]> | 2018-11-02 11:10:36 +0100 |
commit | 6df922f4384b05f259bc836fc6d626e5c8fe6468 (patch) | |
tree | 90797145f6a4363a24ace91e3874ebc17931e6ae /src/compiler | |
parent | ecab2d6f1481e1e50b20b54ae88dd949c1dafab6 (diff) |
mesa/glsl: add support for EXT_shader_implicit_conversions
EXT_shader_implicit_conversions adds support for implicit conversions
for GLES 3.1 and above.
This is essentially a subset of ARB_gpu_shader5, and augments
OES_gpu_shader5.
Signed-off-by: Erik Faye-Lund <[email protected]>
Reviewed-by: Tapani Pälli <[email protected]>
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/glsl/glsl_parser_extras.cpp | 1 | ||||
-rw-r--r-- | src/compiler/glsl/glsl_parser_extras.h | 5 | ||||
-rw-r--r-- | src/compiler/glsl/ir_function.cpp | 3 |
3 files changed, 7 insertions, 2 deletions
diff --git a/src/compiler/glsl/glsl_parser_extras.cpp b/src/compiler/glsl/glsl_parser_extras.cpp index 1bdd7c4bf17..2a58908c226 100644 --- a/src/compiler/glsl/glsl_parser_extras.cpp +++ b/src/compiler/glsl/glsl_parser_extras.cpp @@ -718,6 +718,7 @@ static const _mesa_glsl_extension _mesa_glsl_supported_extensions[] = { EXT(EXT_separate_shader_objects), EXT(EXT_shader_framebuffer_fetch), EXT(EXT_shader_framebuffer_fetch_non_coherent), + EXT(EXT_shader_implicit_conversions), EXT(EXT_shader_integer_mix), EXT_AEP(EXT_shader_io_blocks), EXT(EXT_shader_samples_identical), diff --git a/src/compiler/glsl/glsl_parser_extras.h b/src/compiler/glsl/glsl_parser_extras.h index e1144a19c15..985200ecab5 100644 --- a/src/compiler/glsl/glsl_parser_extras.h +++ b/src/compiler/glsl/glsl_parser_extras.h @@ -346,13 +346,14 @@ struct _mesa_glsl_parse_state { bool has_implicit_conversions() const { - return is_version(120, 0); + return EXT_shader_implicit_conversions_enable || is_version(120, 0); } bool has_implicit_uint_to_int_conversion() const { return ARB_gpu_shader5_enable || MESA_shader_integer_functions_enable || + EXT_shader_implicit_conversions_enable || is_version(400, 0); } @@ -806,6 +807,8 @@ struct _mesa_glsl_parse_state { bool EXT_shader_framebuffer_fetch_warn; bool EXT_shader_framebuffer_fetch_non_coherent_enable; bool EXT_shader_framebuffer_fetch_non_coherent_warn; + bool EXT_shader_implicit_conversions_enable; + bool EXT_shader_implicit_conversions_warn; bool EXT_shader_integer_mix_enable; bool EXT_shader_integer_mix_warn; bool EXT_shader_io_blocks_enable; diff --git a/src/compiler/glsl/ir_function.cpp b/src/compiler/glsl/ir_function.cpp index 3ee0d170fb2..97262f0f4b9 100644 --- a/src/compiler/glsl/ir_function.cpp +++ b/src/compiler/glsl/ir_function.cpp @@ -274,7 +274,8 @@ choose_best_inexact_overload(_mesa_glsl_parse_state *state, * assume everything supported in any GLSL version is available. */ if (!state || state->is_version(400, 0) || state->ARB_gpu_shader5_enable || - state->MESA_shader_integer_functions_enable) { + state->MESA_shader_integer_functions_enable || + state->EXT_shader_implicit_conversions_enable) { for (ir_function_signature **sig = matches; sig < matches + num_matches; sig++) { if (is_best_inexact_overload(actual_parameters, matches, num_matches, *sig)) return *sig; |