glsl: take EXT_gpu_shader4 in to account when adding round

GL_EXT_gpu_shader4 adds truncate() and round() builtins.

Fixes: 12567de2be ("glsl: mark some builtins with correct glsl(es) version check")
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6731>
This commit is contained in:
Tapani Pälli 2020-09-15 17:05:00 +03:00 committed by Marge Bot
parent cde5b86a88
commit 5805f5ab01
1 changed files with 13 additions and 1 deletions

View File

@ -1586,6 +1586,18 @@ builtin_builder::create_builtins()
_##NAME(fp64, glsl_type::dvec4_type), \
NULL);
#define FD130GS4(NAME) \
add_function(#NAME, \
_##NAME(v130_or_gpu_shader4, glsl_type::float_type), \
_##NAME(v130_or_gpu_shader4, glsl_type::vec2_type), \
_##NAME(v130_or_gpu_shader4, glsl_type::vec3_type), \
_##NAME(v130_or_gpu_shader4, glsl_type::vec4_type), \
_##NAME(fp64, glsl_type::double_type), \
_##NAME(fp64, glsl_type::dvec2_type), \
_##NAME(fp64, glsl_type::dvec3_type), \
_##NAME(fp64, glsl_type::dvec4_type), \
NULL);
#define FDGS5(NAME) \
add_function(#NAME, \
_##NAME(gpu_shader5_es, glsl_type::float_type), \
@ -1797,7 +1809,7 @@ builtin_builder::create_builtins()
FI64(sign)
FD(floor)
FD130(trunc)
FD130(round)
FD130GS4(round)
FD130(roundEven)
FD(ceil)
FD(fract)