diff options
author | Marek Olšák <[email protected]> | 2018-08-06 02:48:12 -0400 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2018-12-04 15:33:29 -0500 |
commit | 1660f3aa05f9cdc62787972d7f1905e00580e011 (patch) | |
tree | b3cba1cf79fafd2bac8ed78d47f29422b77125d9 /src/compiler/glsl/builtin_functions.cpp | |
parent | 908f817918fb14a12887f942b8358a5c648b3f92 (diff) |
mesa: expose AMD_texture_texture4
because the closed driver exposes it. Tested by piglit.
Reviewed-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src/compiler/glsl/builtin_functions.cpp')
-rw-r--r-- | src/compiler/glsl/builtin_functions.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/compiler/glsl/builtin_functions.cpp b/src/compiler/glsl/builtin_functions.cpp index b6018806865..0f747b94757 100644 --- a/src/compiler/glsl/builtin_functions.cpp +++ b/src/compiler/glsl/builtin_functions.cpp @@ -419,6 +419,12 @@ texture_gather_cube_map_array(const _mesa_glsl_parse_state *state) } static bool +texture_texture4(const _mesa_glsl_parse_state *state) +{ + return state->AMD_texture_texture4_enable; +} + +static bool texture_gather_or_es31(const _mesa_glsl_parse_state *state) { return state->is_version(400, 310) || @@ -2891,6 +2897,10 @@ builtin_builder::create_builtins() _texture(ir_txd, shader_texture_lod_and_rect, glsl_type::vec4_type, glsl_type::sampler2DRectShadow_type, glsl_type::vec4_type, TEX_PROJECT), NULL); + add_function("texture4", + _texture(ir_tg4, texture_texture4, glsl_type::vec4_type, glsl_type::sampler2D_type, glsl_type::vec2_type), + NULL); + add_function("textureGather", _texture(ir_tg4, texture_gather_or_es31, glsl_type::vec4_type, glsl_type::sampler2D_type, glsl_type::vec2_type), _texture(ir_tg4, texture_gather_or_es31, glsl_type::ivec4_type, glsl_type::isampler2D_type, glsl_type::vec2_type), |