diff options
author | marha <marha@users.sourceforge.net> | 2013-10-03 13:20:50 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2013-10-03 13:20:50 +0200 |
commit | 5593a3d2f370e3e12a043110bf2e395c938980d6 (patch) | |
tree | bf6a62f84ae8d2071b83a0a723f2937c058a7f1b /mesalib/src/glsl/builtin_functions.cpp | |
parent | 8092f320c341a6b3a1b428fdd4473859d5db8b79 (diff) | |
download | vcxsrv-5593a3d2f370e3e12a043110bf2e395c938980d6.tar.gz vcxsrv-5593a3d2f370e3e12a043110bf2e395c938980d6.tar.bz2 vcxsrv-5593a3d2f370e3e12a043110bf2e395c938980d6.zip |
mesa xkeyboard-config git update 3 Oct 2003
xkeyboard-config commit 7c7f937a2203bdcdc3b2e7cbe55ddfc34cffe3ab
mesa commit d1335926196c216f1abe73f37cfcb61cf7f2bd28
Diffstat (limited to 'mesalib/src/glsl/builtin_functions.cpp')
-rw-r--r-- | mesalib/src/glsl/builtin_functions.cpp | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/mesalib/src/glsl/builtin_functions.cpp b/mesalib/src/glsl/builtin_functions.cpp index 72054e0fe..df735ef31 100644 --- a/mesalib/src/glsl/builtin_functions.cpp +++ b/mesalib/src/glsl/builtin_functions.cpp @@ -262,6 +262,13 @@ texture_query_lod(const _mesa_glsl_parse_state *state) state->ARB_texture_query_lod_enable; } +static bool +texture_gather(const _mesa_glsl_parse_state *state) +{ + return state->is_version(400, 0) || + state->ARB_texture_gather_enable; +} + /* Desktop GL or OES_standard_derivatives + fragment shader only */ static bool fs_oes_derivatives(const _mesa_glsl_parse_state *state) @@ -1816,6 +1823,34 @@ 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("textureGather", + _texture(ir_tg4, texture_gather, glsl_type::vec4_type, glsl_type::sampler2D_type, glsl_type::vec2_type), + _texture(ir_tg4, texture_gather, glsl_type::ivec4_type, glsl_type::isampler2D_type, glsl_type::vec2_type), + _texture(ir_tg4, texture_gather, glsl_type::uvec4_type, glsl_type::usampler2D_type, glsl_type::vec2_type), + + _texture(ir_tg4, texture_gather, glsl_type::vec4_type, glsl_type::sampler2DArray_type, glsl_type::vec3_type), + _texture(ir_tg4, texture_gather, glsl_type::ivec4_type, glsl_type::isampler2DArray_type, glsl_type::vec3_type), + _texture(ir_tg4, texture_gather, glsl_type::uvec4_type, glsl_type::usampler2DArray_type, glsl_type::vec3_type), + + _texture(ir_tg4, texture_gather, glsl_type::vec4_type, glsl_type::samplerCube_type, glsl_type::vec3_type), + _texture(ir_tg4, texture_gather, glsl_type::ivec4_type, glsl_type::isamplerCube_type, glsl_type::vec3_type), + _texture(ir_tg4, texture_gather, glsl_type::uvec4_type, glsl_type::usamplerCube_type, glsl_type::vec3_type), + + _texture(ir_tg4, texture_gather, glsl_type::vec4_type, glsl_type::samplerCubeArray_type, glsl_type::vec4_type), + _texture(ir_tg4, texture_gather, glsl_type::ivec4_type, glsl_type::isamplerCubeArray_type, glsl_type::vec4_type), + _texture(ir_tg4, texture_gather, glsl_type::uvec4_type, glsl_type::usamplerCubeArray_type, glsl_type::vec4_type), + NULL); + + add_function("textureGatherOffset", + _texture(ir_tg4, texture_gather, glsl_type::vec4_type, glsl_type::sampler2D_type, glsl_type::vec2_type, TEX_OFFSET), + _texture(ir_tg4, texture_gather, glsl_type::ivec4_type, glsl_type::isampler2D_type, glsl_type::vec2_type, TEX_OFFSET), + _texture(ir_tg4, texture_gather, glsl_type::uvec4_type, glsl_type::usampler2D_type, glsl_type::vec2_type, TEX_OFFSET), + + _texture(ir_tg4, texture_gather, glsl_type::vec4_type, glsl_type::sampler2DArray_type, glsl_type::vec3_type, TEX_OFFSET), + _texture(ir_tg4, texture_gather, glsl_type::ivec4_type, glsl_type::isampler2DArray_type, glsl_type::vec3_type, TEX_OFFSET), + _texture(ir_tg4, texture_gather, glsl_type::uvec4_type, glsl_type::usampler2DArray_type, glsl_type::vec3_type, TEX_OFFSET), + NULL); + F(dFdx) F(dFdy) F(fwidth) |