diff options
author | marha <marha@users.sourceforge.net> | 2014-01-26 20:05:50 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2014-01-26 20:10:14 +0100 |
commit | 30af30b78075159fce477ae99cc72540133714d0 (patch) | |
tree | 1028af42bd030d09bf9c9cb6085665300326abc6 /mesalib/src/glsl/builtin_functions.cpp | |
parent | 775780ea274e6602c2d64de33a98ee35979cc330 (diff) | |
download | vcxsrv-30af30b78075159fce477ae99cc72540133714d0.tar.gz vcxsrv-30af30b78075159fce477ae99cc72540133714d0.tar.bz2 vcxsrv-30af30b78075159fce477ae99cc72540133714d0.zip |
xserver randrproto libxtrans fontconfig libxcb xcb-proto mesa git update 26 Jan 2014
xserver commit c1ce807d9f18f215332d7eeb844e8c640f71c53c
libxcb commit e7263931aff3e3450dc938ad465a7577f943549f
libxcb/xcb-proto commit d898fd39ad6c82207eb78666b2daad982dd757b5
randrproto commit a4a6694c059d74247c16527eef4a0ec9f56bbef6
libxtrans commit e1e6121a1638d43d9929589b4723da2b38cb6b44
fontconfig commit e2b406053c2937799da8636c56b72a77998bcab0
mesa commit 07149f0252c52b4ac58b6df4e307fd786b49b490
Diffstat (limited to 'mesalib/src/glsl/builtin_functions.cpp')
-rw-r--r-- | mesalib/src/glsl/builtin_functions.cpp | 137 |
1 files changed, 60 insertions, 77 deletions
diff --git a/mesalib/src/glsl/builtin_functions.cpp b/mesalib/src/glsl/builtin_functions.cpp index 662ff4cea..aeb8e5d94 100644 --- a/mesalib/src/glsl/builtin_functions.cpp +++ b/mesalib/src/glsl/builtin_functions.cpp @@ -576,20 +576,9 @@ private: ir_function_signature *_atomic_op(const char *intrinsic, builtin_available_predicate avail); - ir_function_signature *_min3(builtin_available_predicate avail, - const glsl_type *x_type, - const glsl_type *y_type, - const glsl_type *z_type); - - ir_function_signature *_max3(builtin_available_predicate avail, - const glsl_type *x_type, - const glsl_type *y_type, - const glsl_type *z_type); - - ir_function_signature *_mid3(builtin_available_predicate avail, - const glsl_type *x_type, - const glsl_type *y_type, - const glsl_type *z_type); + B1(min3) + B1(max3) + B1(mid3) #undef B0 #undef B1 @@ -2128,54 +2117,54 @@ builtin_builder::create_builtins() NULL); add_function("min3", - _min3(shader_trinary_minmax, glsl_type::float_type, glsl_type::float_type, glsl_type::float_type), - _min3(shader_trinary_minmax, glsl_type::vec2_type, glsl_type::vec2_type, glsl_type::vec2_type), - _min3(shader_trinary_minmax, glsl_type::vec3_type, glsl_type::vec3_type, glsl_type::vec3_type), - _min3(shader_trinary_minmax, glsl_type::vec4_type, glsl_type::vec4_type, glsl_type::vec4_type), - - _min3(shader_trinary_minmax, glsl_type::int_type, glsl_type::int_type, glsl_type::int_type), - _min3(shader_trinary_minmax, glsl_type::ivec2_type, glsl_type::ivec2_type, glsl_type::ivec2_type), - _min3(shader_trinary_minmax, glsl_type::ivec3_type, glsl_type::ivec3_type, glsl_type::ivec3_type), - _min3(shader_trinary_minmax, glsl_type::ivec4_type, glsl_type::ivec4_type, glsl_type::ivec4_type), - - _min3(shader_trinary_minmax, glsl_type::uint_type, glsl_type::uint_type, glsl_type::uint_type), - _min3(shader_trinary_minmax, glsl_type::uvec2_type, glsl_type::uvec2_type, glsl_type::uvec2_type), - _min3(shader_trinary_minmax, glsl_type::uvec3_type, glsl_type::uvec3_type, glsl_type::uvec3_type), - _min3(shader_trinary_minmax, glsl_type::uvec4_type, glsl_type::uvec4_type, glsl_type::uvec4_type), + _min3(glsl_type::float_type), + _min3(glsl_type::vec2_type), + _min3(glsl_type::vec3_type), + _min3(glsl_type::vec4_type), + + _min3(glsl_type::int_type), + _min3(glsl_type::ivec2_type), + _min3(glsl_type::ivec3_type), + _min3(glsl_type::ivec4_type), + + _min3(glsl_type::uint_type), + _min3(glsl_type::uvec2_type), + _min3(glsl_type::uvec3_type), + _min3(glsl_type::uvec4_type), NULL); add_function("max3", - _max3(shader_trinary_minmax, glsl_type::float_type, glsl_type::float_type, glsl_type::float_type), - _max3(shader_trinary_minmax, glsl_type::vec2_type, glsl_type::vec2_type, glsl_type::vec2_type), - _max3(shader_trinary_minmax, glsl_type::vec3_type, glsl_type::vec3_type, glsl_type::vec3_type), - _max3(shader_trinary_minmax, glsl_type::vec4_type, glsl_type::vec4_type, glsl_type::vec4_type), - - _max3(shader_trinary_minmax, glsl_type::int_type, glsl_type::int_type, glsl_type::int_type), - _max3(shader_trinary_minmax, glsl_type::ivec2_type, glsl_type::ivec2_type, glsl_type::ivec2_type), - _max3(shader_trinary_minmax, glsl_type::ivec3_type, glsl_type::ivec3_type, glsl_type::ivec3_type), - _max3(shader_trinary_minmax, glsl_type::ivec4_type, glsl_type::ivec4_type, glsl_type::ivec4_type), - - _max3(shader_trinary_minmax, glsl_type::uint_type, glsl_type::uint_type, glsl_type::uint_type), - _max3(shader_trinary_minmax, glsl_type::uvec2_type, glsl_type::uvec2_type, glsl_type::uvec2_type), - _max3(shader_trinary_minmax, glsl_type::uvec3_type, glsl_type::uvec3_type, glsl_type::uvec3_type), - _max3(shader_trinary_minmax, glsl_type::uvec4_type, glsl_type::uvec4_type, glsl_type::uvec4_type), + _max3(glsl_type::float_type), + _max3(glsl_type::vec2_type), + _max3(glsl_type::vec3_type), + _max3(glsl_type::vec4_type), + + _max3(glsl_type::int_type), + _max3(glsl_type::ivec2_type), + _max3(glsl_type::ivec3_type), + _max3(glsl_type::ivec4_type), + + _max3(glsl_type::uint_type), + _max3(glsl_type::uvec2_type), + _max3(glsl_type::uvec3_type), + _max3(glsl_type::uvec4_type), NULL); add_function("mid3", - _mid3(shader_trinary_minmax, glsl_type::float_type, glsl_type::float_type, glsl_type::float_type), - _mid3(shader_trinary_minmax, glsl_type::vec2_type, glsl_type::vec2_type, glsl_type::vec2_type), - _mid3(shader_trinary_minmax, glsl_type::vec3_type, glsl_type::vec3_type, glsl_type::vec3_type), - _mid3(shader_trinary_minmax, glsl_type::vec4_type, glsl_type::vec4_type, glsl_type::vec4_type), - - _mid3(shader_trinary_minmax, glsl_type::int_type, glsl_type::int_type, glsl_type::int_type), - _mid3(shader_trinary_minmax, glsl_type::ivec2_type, glsl_type::ivec2_type, glsl_type::ivec2_type), - _mid3(shader_trinary_minmax, glsl_type::ivec3_type, glsl_type::ivec3_type, glsl_type::ivec3_type), - _mid3(shader_trinary_minmax, glsl_type::ivec4_type, glsl_type::ivec4_type, glsl_type::ivec4_type), - - _mid3(shader_trinary_minmax, glsl_type::uint_type, glsl_type::uint_type, glsl_type::uint_type), - _mid3(shader_trinary_minmax, glsl_type::uvec2_type, glsl_type::uvec2_type, glsl_type::uvec2_type), - _mid3(shader_trinary_minmax, glsl_type::uvec3_type, glsl_type::uvec3_type, glsl_type::uvec3_type), - _mid3(shader_trinary_minmax, glsl_type::uvec4_type, glsl_type::uvec4_type, glsl_type::uvec4_type), + _mid3(glsl_type::float_type), + _mid3(glsl_type::vec2_type), + _mid3(glsl_type::vec3_type), + _mid3(glsl_type::vec4_type), + + _mid3(glsl_type::int_type), + _mid3(glsl_type::ivec2_type), + _mid3(glsl_type::ivec3_type), + _mid3(glsl_type::ivec4_type), + + _mid3(glsl_type::uint_type), + _mid3(glsl_type::uvec2_type), + _mid3(glsl_type::uvec3_type), + _mid3(glsl_type::uvec4_type), NULL); #undef F @@ -4064,14 +4053,12 @@ builtin_builder::_atomic_op(const char *intrinsic, } ir_function_signature * -builtin_builder::_min3(builtin_available_predicate avail, - const glsl_type *x_type, const glsl_type *y_type, - const glsl_type *z_type) +builtin_builder::_min3(const glsl_type *type) { - ir_variable *x = in_var(x_type, "x"); - ir_variable *y = in_var(y_type, "y"); - ir_variable *z = in_var(z_type, "z"); - MAKE_SIG(x_type, avail, 3, x, y, z); + ir_variable *x = in_var(type, "x"); + ir_variable *y = in_var(type, "y"); + ir_variable *z = in_var(type, "z"); + MAKE_SIG(type, shader_trinary_minmax, 3, x, y, z); ir_expression *min3 = min2(x, min2(y,z)); body.emit(ret(min3)); @@ -4080,14 +4067,12 @@ builtin_builder::_min3(builtin_available_predicate avail, } ir_function_signature * -builtin_builder::_max3(builtin_available_predicate avail, - const glsl_type *x_type, const glsl_type *y_type, - const glsl_type *z_type) +builtin_builder::_max3(const glsl_type *type) { - ir_variable *x = in_var(x_type, "x"); - ir_variable *y = in_var(y_type, "y"); - ir_variable *z = in_var(z_type, "z"); - MAKE_SIG(x_type, avail, 3, x, y, z); + ir_variable *x = in_var(type, "x"); + ir_variable *y = in_var(type, "y"); + ir_variable *z = in_var(type, "z"); + MAKE_SIG(type, shader_trinary_minmax, 3, x, y, z); ir_expression *max3 = max2(x, max2(y,z)); body.emit(ret(max3)); @@ -4096,14 +4081,12 @@ builtin_builder::_max3(builtin_available_predicate avail, } ir_function_signature * -builtin_builder::_mid3(builtin_available_predicate avail, - const glsl_type *x_type, const glsl_type *y_type, - const glsl_type *z_type) +builtin_builder::_mid3(const glsl_type *type) { - ir_variable *x = in_var(x_type, "x"); - ir_variable *y = in_var(y_type, "y"); - ir_variable *z = in_var(z_type, "z"); - MAKE_SIG(x_type, avail, 3, x, y, z); + ir_variable *x = in_var(type, "x"); + ir_variable *y = in_var(type, "y"); + ir_variable *z = in_var(type, "z"); + MAKE_SIG(type, shader_trinary_minmax, 3, x, y, z); ir_expression *mid3 = max2(min2(x, y), max2(min2(x, z), min2(y, z))); body.emit(ret(mid3)); |