summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Olšák <marek.olsak@amd.com>2018-08-07 21:31:09 -0400
committerMarek Olšák <marek.olsak@amd.com>2019-04-24 20:45:15 -0400
commit4ff3b8e18a968f557be1529ecb03a7df5da1890f (patch)
tree47a19923c522edb767412424f564707b66bd833f
parent8dbe23c8c69c1ad0f8914970b110bbd30ff76b0d (diff)
glsl: add texture builtin functions for EXT_gpu_shader4
v2: some fixes to texture functions thanks to piglit tests Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com> (v1) Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> (v1) Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de> (v1) Reviewed-by: Eric Anholt <eric@anholt.net>
-rw-r--r--src/compiler/glsl/builtin_functions.cpp692
1 files changed, 667 insertions, 25 deletions
diff --git a/src/compiler/glsl/builtin_functions.cpp b/src/compiler/glsl/builtin_functions.cpp
index cea307bff48..fff84955ce0 100644
--- a/src/compiler/glsl/builtin_functions.cpp
+++ b/src/compiler/glsl/builtin_functions.cpp
@@ -219,7 +219,8 @@ lod_exists_in_stage(const _mesa_glsl_parse_state *state)
*/
return state->stage == MESA_SHADER_VERTEX ||
state->is_version(130, 300) ||
- state->ARB_shader_texture_lod_enable;
+ state->ARB_shader_texture_lod_enable ||
+ state->EXT_gpu_shader4_enable;
}
static bool
@@ -287,6 +288,15 @@ gpu_shader4(const _mesa_glsl_parse_state *state)
}
static bool
+gpu_shader4_derivs_only(const _mesa_glsl_parse_state *state)
+{
+ return state->EXT_gpu_shader4_enable &&
+ (state->stage == MESA_SHADER_FRAGMENT ||
+ (state->stage == MESA_SHADER_COMPUTE &&
+ state->NV_compute_shader_derivatives_enable));
+}
+
+static bool
v130_or_gpu_shader4(const _mesa_glsl_parse_state *state)
{
return state->is_version(130, 300) || state->EXT_gpu_shader4_enable;
@@ -357,20 +367,23 @@ static bool
texture_array_lod(const _mesa_glsl_parse_state *state)
{
return lod_exists_in_stage(state) &&
- state->EXT_texture_array_enable;
+ (state->EXT_texture_array_enable ||
+ state->EXT_gpu_shader4_enable);
}
static bool
fs_texture_array(const _mesa_glsl_parse_state *state)
{
return state->stage == MESA_SHADER_FRAGMENT &&
- state->EXT_texture_array_enable;
+ (state->EXT_texture_array_enable ||
+ state->EXT_gpu_shader4_enable);
}
static bool
texture_array(const _mesa_glsl_parse_state *state)
{
- return state->EXT_texture_array_enable;
+ return state->EXT_texture_array_enable ||
+ state->EXT_gpu_shader4_enable;
}
static bool
@@ -2014,6 +2027,54 @@ builtin_builder::create_builtins()
_textureSize(texture_multisample_array, glsl_type::ivec3_type, glsl_type::usampler2DMSArray_type),
NULL);
+ add_function("textureSize1D",
+ _textureSize(gpu_shader4, glsl_type::int_type, glsl_type::sampler1D_type),
+ _textureSize(gpu_shader4, glsl_type::int_type, glsl_type::isampler1D_type),
+ _textureSize(gpu_shader4, glsl_type::int_type, glsl_type::usampler1D_type),
+ NULL);
+
+ add_function("textureSize2D",
+ _textureSize(gpu_shader4, glsl_type::ivec2_type, glsl_type::sampler2D_type),
+ _textureSize(gpu_shader4, glsl_type::ivec2_type, glsl_type::isampler2D_type),
+ _textureSize(gpu_shader4, glsl_type::ivec2_type, glsl_type::usampler2D_type),
+ NULL);
+
+ add_function("textureSize3D",
+ _textureSize(gpu_shader4, glsl_type::ivec3_type, glsl_type::sampler3D_type),
+ _textureSize(gpu_shader4, glsl_type::ivec3_type, glsl_type::isampler3D_type),
+ _textureSize(gpu_shader4, glsl_type::ivec3_type, glsl_type::usampler3D_type),
+ NULL);
+
+ add_function("textureSizeCube",
+ _textureSize(gpu_shader4, glsl_type::ivec2_type, glsl_type::samplerCube_type),
+ _textureSize(gpu_shader4, glsl_type::ivec2_type, glsl_type::isamplerCube_type),
+ _textureSize(gpu_shader4, glsl_type::ivec2_type, glsl_type::usamplerCube_type),
+ NULL);
+
+ add_function("textureSize1DArray",
+ _textureSize(gpu_shader4, glsl_type::ivec2_type, glsl_type::sampler1DArray_type),
+ _textureSize(gpu_shader4, glsl_type::ivec2_type, glsl_type::isampler1DArray_type),
+ _textureSize(gpu_shader4, glsl_type::ivec2_type, glsl_type::usampler1DArray_type),
+ NULL);
+
+ add_function("textureSize2DArray",
+ _textureSize(gpu_shader4, glsl_type::ivec3_type, glsl_type::sampler2DArray_type),
+ _textureSize(gpu_shader4, glsl_type::ivec3_type, glsl_type::isampler2DArray_type),
+ _textureSize(gpu_shader4, glsl_type::ivec3_type, glsl_type::usampler2DArray_type),
+ NULL);
+
+ add_function("textureSize2DRect",
+ _textureSize(gpu_shader4, glsl_type::ivec2_type, glsl_type::sampler2DRect_type),
+ _textureSize(gpu_shader4, glsl_type::ivec2_type, glsl_type::isampler2DRect_type),
+ _textureSize(gpu_shader4, glsl_type::ivec2_type, glsl_type::usampler2DRect_type),
+ NULL);
+
+ add_function("textureSizeBuffer",
+ _textureSize(gpu_shader4, glsl_type::int_type, glsl_type::samplerBuffer_type),
+ _textureSize(gpu_shader4, glsl_type::int_type, glsl_type::isamplerBuffer_type),
+ _textureSize(gpu_shader4, glsl_type::int_type, glsl_type::usamplerBuffer_type),
+ NULL);
+
add_function("textureSamples",
_textureSamples(shader_samples, glsl_type::sampler2DMS_type),
_textureSamples(shader_samples, glsl_type::isampler2DMS_type),
@@ -2207,6 +2268,80 @@ builtin_builder::create_builtins()
_texture(ir_txb, v130_derivatives_only, glsl_type::float_type, glsl_type::sampler1DArrayShadow_type, glsl_type::vec3_type, TEX_OFFSET),
NULL);
+ add_function("texture1DOffset",
+ _texture(ir_tex, gpu_shader4, glsl_type::vec4_type, glsl_type::sampler1D_type, glsl_type::float_type, TEX_OFFSET),
+ _texture(ir_tex, gpu_shader4, glsl_type::ivec4_type, glsl_type::isampler1D_type, glsl_type::float_type, TEX_OFFSET),
+ _texture(ir_tex, gpu_shader4, glsl_type::uvec4_type, glsl_type::usampler1D_type, glsl_type::float_type, TEX_OFFSET),
+ _texture(ir_txb, gpu_shader4_derivs_only, glsl_type::vec4_type, glsl_type::sampler1D_type, glsl_type::float_type, TEX_OFFSET),
+ _texture(ir_txb, gpu_shader4_derivs_only, glsl_type::ivec4_type, glsl_type::isampler1D_type, glsl_type::float_type, TEX_OFFSET),
+ _texture(ir_txb, gpu_shader4_derivs_only, glsl_type::uvec4_type, glsl_type::usampler1D_type, glsl_type::float_type, TEX_OFFSET),
+ NULL);
+
+ add_function("texture2DOffset",
+ _texture(ir_tex, gpu_shader4, glsl_type::vec4_type, glsl_type::sampler2D_type, glsl_type::vec2_type, TEX_OFFSET),
+ _texture(ir_tex, gpu_shader4, glsl_type::ivec4_type, glsl_type::isampler2D_type, glsl_type::vec2_type, TEX_OFFSET),
+ _texture(ir_tex, gpu_shader4, glsl_type::uvec4_type, glsl_type::usampler2D_type, glsl_type::vec2_type, TEX_OFFSET),
+ _texture(ir_txb, gpu_shader4_derivs_only, glsl_type::vec4_type, glsl_type::sampler2D_type, glsl_type::vec2_type, TEX_OFFSET),
+ _texture(ir_txb, gpu_shader4_derivs_only, glsl_type::ivec4_type, glsl_type::isampler2D_type, glsl_type::vec2_type, TEX_OFFSET),
+ _texture(ir_txb, gpu_shader4_derivs_only, glsl_type::uvec4_type, glsl_type::usampler2D_type, glsl_type::vec2_type, TEX_OFFSET),
+ NULL);
+
+ add_function("texture3DOffset",
+ _texture(ir_tex, gpu_shader4, glsl_type::vec4_type, glsl_type::sampler3D_type, glsl_type::vec3_type, TEX_OFFSET),
+ _texture(ir_tex, gpu_shader4, glsl_type::ivec4_type, glsl_type::isampler3D_type, glsl_type::vec3_type, TEX_OFFSET),
+ _texture(ir_tex, gpu_shader4, glsl_type::uvec4_type, glsl_type::usampler3D_type, glsl_type::vec3_type, TEX_OFFSET),
+ _texture(ir_txb, gpu_shader4_derivs_only, glsl_type::vec4_type, glsl_type::sampler3D_type, glsl_type::vec3_type, TEX_OFFSET),
+ _texture(ir_txb, gpu_shader4_derivs_only, glsl_type::ivec4_type, glsl_type::isampler3D_type, glsl_type::vec3_type, TEX_OFFSET),
+ _texture(ir_txb, gpu_shader4_derivs_only, glsl_type::uvec4_type, glsl_type::usampler3D_type, glsl_type::vec3_type, TEX_OFFSET),
+ NULL);
+
+ add_function("texture2DRectOffset",
+ _texture(ir_tex, gpu_shader4, glsl_type::vec4_type, glsl_type::sampler2DRect_type, glsl_type::vec2_type, TEX_OFFSET),
+ _texture(ir_tex, gpu_shader4, glsl_type::ivec4_type, glsl_type::isampler2DRect_type, glsl_type::vec2_type, TEX_OFFSET),
+ _texture(ir_tex, gpu_shader4, glsl_type::uvec4_type, glsl_type::usampler2DRect_type, glsl_type::vec2_type, TEX_OFFSET),
+ NULL);
+
+ add_function("shadow2DRectOffset",
+ _texture(ir_tex, gpu_shader4, glsl_type::vec4_type, glsl_type::sampler2DRectShadow_type, glsl_type::vec3_type, TEX_OFFSET),
+ NULL);
+
+ add_function("shadow1DOffset",
+ _texture(ir_tex, gpu_shader4, glsl_type::vec4_type, glsl_type::sampler1DShadow_type, glsl_type::vec3_type, TEX_OFFSET),
+ _texture(ir_txb, gpu_shader4_derivs_only, glsl_type::vec4_type, glsl_type::sampler1DShadow_type, glsl_type::vec3_type, TEX_OFFSET),
+ NULL);
+
+ add_function("shadow2DOffset",
+ _texture(ir_tex, gpu_shader4, glsl_type::vec4_type, glsl_type::sampler2DShadow_type, glsl_type::vec3_type, TEX_OFFSET),
+ _texture(ir_txb, gpu_shader4_derivs_only, glsl_type::vec4_type, glsl_type::sampler2DShadow_type, glsl_type::vec3_type, TEX_OFFSET),
+ NULL);
+
+ add_function("texture1DArrayOffset",
+ _texture(ir_tex, gpu_shader4, glsl_type::vec4_type, glsl_type::sampler1DArray_type, glsl_type::vec2_type, TEX_OFFSET),
+ _texture(ir_tex, gpu_shader4, glsl_type::ivec4_type, glsl_type::isampler1DArray_type, glsl_type::vec2_type, TEX_OFFSET),
+ _texture(ir_tex, gpu_shader4, glsl_type::uvec4_type, glsl_type::usampler1DArray_type, glsl_type::vec2_type, TEX_OFFSET),
+ _texture(ir_txb, gpu_shader4_derivs_only, glsl_type::vec4_type, glsl_type::sampler1DArray_type, glsl_type::vec2_type, TEX_OFFSET),
+ _texture(ir_txb, gpu_shader4_derivs_only, glsl_type::ivec4_type, glsl_type::isampler1DArray_type, glsl_type::vec2_type, TEX_OFFSET),
+ _texture(ir_txb, gpu_shader4_derivs_only, glsl_type::uvec4_type, glsl_type::usampler1DArray_type, glsl_type::vec2_type, TEX_OFFSET),
+ NULL);
+
+ add_function("texture2DArrayOffset",
+ _texture(ir_tex, gpu_shader4, glsl_type::vec4_type, glsl_type::sampler2DArray_type, glsl_type::vec3_type, TEX_OFFSET),
+ _texture(ir_tex, gpu_shader4, glsl_type::ivec4_type, glsl_type::isampler2DArray_type, glsl_type::vec3_type, TEX_OFFSET),
+ _texture(ir_tex, gpu_shader4, glsl_type::uvec4_type, glsl_type::usampler2DArray_type, glsl_type::vec3_type, TEX_OFFSET),
+ _texture(ir_txb, gpu_shader4_derivs_only, glsl_type::vec4_type, glsl_type::sampler2DArray_type, glsl_type::vec3_type, TEX_OFFSET),
+ _texture(ir_txb, gpu_shader4_derivs_only, glsl_type::ivec4_type, glsl_type::isampler2DArray_type, glsl_type::vec3_type, TEX_OFFSET),
+ _texture(ir_txb, gpu_shader4_derivs_only, glsl_type::uvec4_type, glsl_type::usampler2DArray_type, glsl_type::vec3_type, TEX_OFFSET),
+ NULL);
+
+ add_function("shadow1DArrayOffset",
+ _texture(ir_tex, gpu_shader4, glsl_type::vec4_type, glsl_type::sampler1DArrayShadow_type, glsl_type::vec3_type, TEX_OFFSET),
+ _texture(ir_txb, gpu_shader4_derivs_only, glsl_type::vec4_type, glsl_type::sampler1DArrayShadow_type, glsl_type::vec3_type, TEX_OFFSET),
+ NULL);
+
+ add_function("shadow2DArrayOffset",
+ _texture(ir_tex, gpu_shader4, glsl_type::vec4_type, glsl_type::sampler2DArrayShadow_type, glsl_type::vec4_type, TEX_OFFSET),
+ NULL);
+
add_function("textureProj",
_texture(ir_tex, v130, glsl_type::vec4_type, glsl_type::sampler1D_type, glsl_type::vec2_type, TEX_PROJECT),
_texture(ir_tex, v130, glsl_type::ivec4_type, glsl_type::isampler1D_type, glsl_type::vec2_type, TEX_PROJECT),
@@ -2304,6 +2439,47 @@ builtin_builder::create_builtins()
NULL);
+ add_function("texelFetch1D",
+ _texelFetch(gpu_shader4, glsl_type::vec4_type, glsl_type::sampler1D_type, glsl_type::int_type),
+ _texelFetch(gpu_shader4, glsl_type::ivec4_type, glsl_type::isampler1D_type, glsl_type::int_type),
+ _texelFetch(gpu_shader4, glsl_type::uvec4_type, glsl_type::usampler1D_type, glsl_type::int_type),
+ NULL);
+
+ add_function("texelFetch2D",
+ _texelFetch(gpu_shader4, glsl_type::vec4_type, glsl_type::sampler2D_type, glsl_type::ivec2_type),
+ _texelFetch(gpu_shader4, glsl_type::ivec4_type, glsl_type::isampler2D_type, glsl_type::ivec2_type),
+ _texelFetch(gpu_shader4, glsl_type::uvec4_type, glsl_type::usampler2D_type, glsl_type::ivec2_type),
+ NULL);
+
+ add_function("texelFetch3D",
+ _texelFetch(gpu_shader4, glsl_type::vec4_type, glsl_type::sampler3D_type, glsl_type::ivec3_type),
+ _texelFetch(gpu_shader4, glsl_type::ivec4_type, glsl_type::isampler3D_type, glsl_type::ivec3_type),
+ _texelFetch(gpu_shader4, glsl_type::uvec4_type, glsl_type::usampler3D_type, glsl_type::ivec3_type),
+ NULL);
+
+ add_function("texelFetch2DRect",
+ _texelFetch(gpu_shader4, glsl_type::vec4_type, glsl_type::sampler2DRect_type, glsl_type::ivec2_type),
+ _texelFetch(gpu_shader4, glsl_type::ivec4_type, glsl_type::isampler2DRect_type, glsl_type::ivec2_type),
+ _texelFetch(gpu_shader4, glsl_type::uvec4_type, glsl_type::usampler2DRect_type, glsl_type::ivec2_type),
+ NULL);
+
+ add_function("texelFetch1DArray",
+ _texelFetch(gpu_shader4, glsl_type::vec4_type, glsl_type::sampler1DArray_type, glsl_type::ivec2_type),
+ _texelFetch(gpu_shader4, glsl_type::ivec4_type, glsl_type::isampler1DArray_type, glsl_type::ivec2_type),
+ _texelFetch(gpu_shader4, glsl_type::uvec4_type, glsl_type::usampler1DArray_type, glsl_type::ivec2_type),
+ NULL);
+
+ add_function("texelFetch2DArray",
+ _texelFetch(gpu_shader4, glsl_type::vec4_type, glsl_type::sampler2DArray_type, glsl_type::ivec3_type),
+ _texelFetch(gpu_shader4, glsl_type::ivec4_type, glsl_type::isampler2DArray_type, glsl_type::ivec3_type),
+ _texelFetch(gpu_shader4, glsl_type::uvec4_type, glsl_type::usampler2DArray_type, glsl_type::ivec3_type),
+ NULL);
+
+ add_function("texelFetchBuffer",
+ _texelFetch(gpu_shader4, glsl_type::vec4_type, glsl_type::samplerBuffer_type, glsl_type::int_type),
+ _texelFetch(gpu_shader4, glsl_type::ivec4_type, glsl_type::isamplerBuffer_type, glsl_type::int_type),
+ _texelFetch(gpu_shader4, glsl_type::uvec4_type, glsl_type::usamplerBuffer_type, glsl_type::int_type),
+ NULL);
add_function("texelFetchOffset",
_texelFetch(v130, glsl_type::vec4_type, glsl_type::sampler1D_type, glsl_type::int_type, glsl_type::int_type),
@@ -2332,6 +2508,42 @@ builtin_builder::create_builtins()
NULL);
+ add_function("texelFetch1DOffset",
+ _texelFetch(gpu_shader4, glsl_type::vec4_type, glsl_type::sampler1D_type, glsl_type::int_type, glsl_type::int_type),
+ _texelFetch(gpu_shader4, glsl_type::ivec4_type, glsl_type::isampler1D_type, glsl_type::int_type, glsl_type::int_type),
+ _texelFetch(gpu_shader4, glsl_type::uvec4_type, glsl_type::usampler1D_type, glsl_type::int_type, glsl_type::int_type),
+ NULL);
+
+ add_function("texelFetch2DOffset",
+ _texelFetch(gpu_shader4, glsl_type::vec4_type, glsl_type::sampler2D_type, glsl_type::ivec2_type, glsl_type::ivec2_type),
+ _texelFetch(gpu_shader4, glsl_type::ivec4_type, glsl_type::isampler2D_type, glsl_type::ivec2_type, glsl_type::ivec2_type),
+ _texelFetch(gpu_shader4, glsl_type::uvec4_type, glsl_type::usampler2D_type, glsl_type::ivec2_type, glsl_type::ivec2_type),
+ NULL);
+
+ add_function("texelFetch3DOffset",
+ _texelFetch(gpu_shader4, glsl_type::vec4_type, glsl_type::sampler3D_type, glsl_type::ivec3_type, glsl_type::ivec3_type),
+ _texelFetch(gpu_shader4, glsl_type::ivec4_type, glsl_type::isampler3D_type, glsl_type::ivec3_type, glsl_type::ivec3_type),
+ _texelFetch(gpu_shader4, glsl_type::uvec4_type, glsl_type::usampler3D_type, glsl_type::ivec3_type, glsl_type::ivec3_type),
+ NULL);
+
+ add_function("texelFetch2DRectOffset",
+ _texelFetch(gpu_shader4, glsl_type::vec4_type, glsl_type::sampler2DRect_type, glsl_type::ivec2_type, glsl_type::ivec2_type),
+ _texelFetch(gpu_shader4, glsl_type::ivec4_type, glsl_type::isampler2DRect_type, glsl_type::ivec2_type, glsl_type::ivec2_type),
+ _texelFetch(gpu_shader4, glsl_type::uvec4_type, glsl_type::usampler2DRect_type, glsl_type::ivec2_type, glsl_type::ivec2_type),
+ NULL);
+
+ add_function("texelFetch1DArrayOffset",
+ _texelFetch(gpu_shader4, glsl_type::vec4_type, glsl_type::sampler1DArray_type, glsl_type::ivec2_type, glsl_type::int_type),
+ _texelFetch(gpu_shader4, glsl_type::ivec4_type, glsl_type::isampler1DArray_type, glsl_type::ivec2_type, glsl_type::int_type),
+ _texelFetch(gpu_shader4, glsl_type::uvec4_type, glsl_type::usampler1DArray_type, glsl_type::ivec2_type, glsl_type::int_type),
+ NULL);
+
+ add_function("texelFetch2DArrayOffset",
+ _texelFetch(gpu_shader4, glsl_type::vec4_type, glsl_type::sampler2DArray_type, glsl_type::ivec3_type, glsl_type::ivec2_type),
+ _texelFetch(gpu_shader4, glsl_type::ivec4_type, glsl_type::isampler2DArray_type, glsl_type::ivec3_type, glsl_type::ivec2_type),
+ _texelFetch(gpu_shader4, glsl_type::uvec4_type, glsl_type::usampler2DArray_type, glsl_type::ivec3_type, glsl_type::ivec2_type),
+ NULL);
+
add_function("textureProjOffset",
_texture(ir_tex, v130, glsl_type::vec4_type, glsl_type::sampler1D_type, glsl_type::vec2_type, TEX_PROJECT | TEX_OFFSET),
_texture(ir_tex, v130, glsl_type::ivec4_type, glsl_type::isampler1D_type, glsl_type::vec2_type, TEX_PROJECT | TEX_OFFSET),
@@ -2385,6 +2597,68 @@ builtin_builder::create_builtins()
_texture(ir_txb, v130_derivatives_only, glsl_type::float_type, glsl_type::sampler2DShadow_type, glsl_type::vec4_type, TEX_PROJECT | TEX_OFFSET),
NULL);
+ add_function("texture1DProjOffset",
+ _texture(ir_tex, gpu_shader4, glsl_type::vec4_type, glsl_type::sampler1D_type, glsl_type::vec2_type, TEX_PROJECT | TEX_OFFSET),
+ _texture(ir_tex, gpu_shader4, glsl_type::ivec4_type, glsl_type::isampler1D_type, glsl_type::vec2_type, TEX_PROJECT | TEX_OFFSET),
+ _texture(ir_tex, gpu_shader4, glsl_type::uvec4_type, glsl_type::usampler1D_type, glsl_type::vec2_type, TEX_PROJECT | TEX_OFFSET),
+ _texture(ir_tex, gpu_shader4, glsl_type::vec4_type, glsl_type::sampler1D_type, glsl_type::vec4_type, TEX_PROJECT | TEX_OFFSET),
+ _texture(ir_tex, gpu_shader4, glsl_type::ivec4_type, glsl_type::isampler1D_type, glsl_type::vec4_type, TEX_PROJECT | TEX_OFFSET),
+ _texture(ir_tex, gpu_shader4, glsl_type::uvec4_type, glsl_type::usampler1D_type, glsl_type::vec4_type, TEX_PROJECT | TEX_OFFSET),
+ _texture(ir_txb, gpu_shader4_derivs_only, glsl_type::vec4_type, glsl_type::sampler1D_type, glsl_type::vec2_type, TEX_PROJECT | TEX_OFFSET),
+ _texture(ir_txb, gpu_shader4_derivs_only, glsl_type::ivec4_type, glsl_type::isampler1D_type, glsl_type::vec2_type, TEX_PROJECT | TEX_OFFSET),
+ _texture(ir_txb, gpu_shader4_derivs_only, glsl_type::uvec4_type, glsl_type::usampler1D_type, glsl_type::vec2_type, TEX_PROJECT | TEX_OFFSET),
+ _texture(ir_txb, gpu_shader4_derivs_only, glsl_type::vec4_type, glsl_type::sampler1D_type, glsl_type::vec4_type, TEX_PROJECT | TEX_OFFSET),
+ _texture(ir_txb, gpu_shader4_derivs_only, glsl_type::ivec4_type, glsl_type::isampler1D_type, glsl_type::vec4_type, TEX_PROJECT | TEX_OFFSET),
+ _texture(ir_txb, gpu_shader4_derivs_only, glsl_type::uvec4_type, glsl_type::usampler1D_type, glsl_type::vec4_type, TEX_PROJECT | TEX_OFFSET),
+ NULL);
+
+ add_function("texture2DProjOffset",
+ _texture(ir_tex, gpu_shader4, glsl_type::vec4_type, glsl_type::sampler2D_type, glsl_type::vec3_type, TEX_PROJECT | TEX_OFFSET),
+ _texture(ir_tex, gpu_shader4, glsl_type::ivec4_type, glsl_type::isampler2D_type, glsl_type::vec3_type, TEX_PROJECT | TEX_OFFSET),
+ _texture(ir_tex, gpu_shader4, glsl_type::uvec4_type, glsl_type::usampler2D_type, glsl_type::vec3_type, TEX_PROJECT | TEX_OFFSET),
+ _texture(ir_tex, gpu_shader4, glsl_type::vec4_type, glsl_type::sampler2D_type, glsl_type::vec4_type, TEX_PROJECT | TEX_OFFSET),
+ _texture(ir_tex, gpu_shader4, glsl_type::ivec4_type, glsl_type::isampler2D_type, glsl_type::vec4_type, TEX_PROJECT | TEX_OFFSET),
+ _texture(ir_tex, gpu_shader4, glsl_type::uvec4_type, glsl_type::usampler2D_type, glsl_type::vec4_type, TEX_PROJECT | TEX_OFFSET),
+ _texture(ir_txb, gpu_shader4_derivs_only, glsl_type::vec4_type, glsl_type::sampler2D_type, glsl_type::vec3_type, TEX_PROJECT | TEX_OFFSET),
+ _texture(ir_txb, gpu_shader4_derivs_only, glsl_type::ivec4_type, glsl_type::isampler2D_type, glsl_type::vec3_type, TEX_PROJECT | TEX_OFFSET),
+ _texture(ir_txb, gpu_shader4_derivs_only, glsl_type::uvec4_type, glsl_type::usampler2D_type, glsl_type::vec3_type, TEX_PROJECT | TEX_OFFSET),
+ _texture(ir_txb, gpu_shader4_derivs_only, glsl_type::vec4_type, glsl_type::sampler2D_type, glsl_type::vec4_type, TEX_PROJECT | TEX_OFFSET),
+ _texture(ir_txb, gpu_shader4_derivs_only, glsl_type::ivec4_type, glsl_type::isampler2D_type, glsl_type::vec4_type, TEX_PROJECT | TEX_OFFSET),
+ _texture(ir_txb, gpu_shader4_derivs_only, glsl_type::uvec4_type, glsl_type::usampler2D_type, glsl_type::vec4_type, TEX_PROJECT | TEX_OFFSET),
+ NULL);
+
+ add_function("texture3DProjOffset",
+ _texture(ir_tex, gpu_shader4, glsl_type::vec4_type, glsl_type::sampler3D_type, glsl_type::vec4_type, TEX_PROJECT | TEX_OFFSET),
+ _texture(ir_tex, gpu_shader4, glsl_type::ivec4_type, glsl_type::isampler3D_type, glsl_type::vec4_type, TEX_PROJECT | TEX_OFFSET),
+ _texture(ir_tex, gpu_shader4, glsl_type::uvec4_type, glsl_type::usampler3D_type, glsl_type::vec4_type, TEX_PROJECT | TEX_OFFSET),
+ _texture(ir_txb, gpu_shader4_derivs_only, glsl_type::vec4_type, glsl_type::sampler3D_type, glsl_type::vec4_type, TEX_PROJECT | TEX_OFFSET),
+ _texture(ir_txb, gpu_shader4_derivs_only, glsl_type::ivec4_type, glsl_type::isampler3D_type, glsl_type::vec4_type, TEX_PROJECT | TEX_OFFSET),
+ _texture(ir_txb, gpu_shader4_derivs_only, glsl_type::uvec4_type, glsl_type::usampler3D_type, glsl_type::vec4_type, TEX_PROJECT | TEX_OFFSET),
+ NULL);
+
+ add_function("shadow1DProjOffset",
+ _texture(ir_tex, gpu_shader4, glsl_type::vec4_type, glsl_type::sampler1DShadow_type, glsl_type::vec4_type, TEX_PROJECT | TEX_OFFSET),
+ _texture(ir_txb, gpu_shader4_derivs_only, glsl_type::vec4_type, glsl_type::sampler1DShadow_type, glsl_type::vec4_type, TEX_PROJECT | TEX_OFFSET),
+ NULL);
+
+ add_function("shadow2DProjOffset",
+ _texture(ir_tex, gpu_shader4, glsl_type::vec4_type, glsl_type::sampler2DShadow_type, glsl_type::vec4_type, TEX_PROJECT | TEX_OFFSET),
+ _texture(ir_txb, gpu_shader4_derivs_only, glsl_type::vec4_type, glsl_type::sampler2DShadow_type, glsl_type::vec4_type, TEX_PROJECT | TEX_OFFSET),
+ NULL);
+
+ add_function("texture2DRectProjOffset",
+ _texture(ir_tex, gpu_shader4, glsl_type::vec4_type, glsl_type::sampler2DRect_type, glsl_type::vec3_type, TEX_PROJECT | TEX_OFFSET),
+ _texture(ir_tex, gpu_shader4, glsl_type::ivec4_type, glsl_type::isampler2DRect_type, glsl_type::vec3_type, TEX_PROJECT | TEX_OFFSET),
+ _texture(ir_tex, gpu_shader4, glsl_type::uvec4_type, glsl_type::usampler2DRect_type, glsl_type::vec3_type, TEX_PROJECT | TEX_OFFSET),
+ _texture(ir_tex, gpu_shader4, glsl_type::vec4_type, glsl_type::sampler2DRect_type, glsl_type::vec4_type, TEX_PROJECT | TEX_OFFSET),
+ _texture(ir_tex, gpu_shader4, glsl_type::ivec4_type, glsl_type::isampler2DRect_type, glsl_type::vec4_type, TEX_PROJECT | TEX_OFFSET),
+ _texture(ir_tex, gpu_shader4, glsl_type::uvec4_type, glsl_type::usampler2DRect_type, glsl_type::vec4_type, TEX_PROJECT | TEX_OFFSET),
+ NULL);
+
+ add_function("shadow2DRectProjOffset",
+ _texture(ir_tex, gpu_shader4, glsl_type::vec4_type, glsl_type::sampler2DRectShadow_type, glsl_type::vec4_type, TEX_PROJECT | TEX_OFFSET),
+ NULL);
+
add_function("textureLodOffset",
_texture(ir_txl, v130, glsl_type::vec4_type, glsl_type::sampler1D_type, glsl_type::float_type, TEX_OFFSET),
_texture(ir_txl, v130, glsl_type::ivec4_type, glsl_type::isampler1D_type, glsl_type::float_type, TEX_OFFSET),
@@ -2412,6 +2686,48 @@ builtin_builder::create_builtins()
_texture(ir_txl, v130, glsl_type::float_type, glsl_type::sampler1DArrayShadow_type, glsl_type::vec3_type, TEX_OFFSET),
NULL);
+ add_function("texture1DLodOffset",
+ _texture(ir_txl, gpu_shader4, glsl_type::vec4_type, glsl_type::sampler1D_type, glsl_type::float_type, TEX_OFFSET),
+ _texture(ir_txl, gpu_shader4, glsl_type::ivec4_type, glsl_type::isampler1D_type, glsl_type::float_type, TEX_OFFSET),
+ _texture(ir_txl, gpu_shader4, glsl_type::uvec4_type, glsl_type::usampler1D_type, glsl_type::float_type, TEX_OFFSET),
+ NULL);
+
+ add_function("texture2DLodOffset",
+ _texture(ir_txl, gpu_shader4, glsl_type::vec4_type, glsl_type::sampler2D_type, glsl_type::vec2_type, TEX_OFFSET),
+ _texture(ir_txl, gpu_shader4, glsl_type::ivec4_type, glsl_type::isampler2D_type, glsl_type::vec2_type, TEX_OFFSET),
+ _texture(ir_txl, gpu_shader4, glsl_type::uvec4_type, glsl_type::usampler2D_type, glsl_type::vec2_type, TEX_OFFSET),
+ NULL);
+
+ add_function("texture3DLodOffset",
+ _texture(ir_txl, gpu_shader4, glsl_type::vec4_type, glsl_type::sampler3D_type, glsl_type::vec3_type, TEX_OFFSET),
+ _texture(ir_txl, gpu_shader4, glsl_type::ivec4_type, glsl_type::isampler3D_type, glsl_type::vec3_type, TEX_OFFSET),
+ _texture(ir_txl, gpu_shader4, glsl_type::uvec4_type, glsl_type::usampler3D_type, glsl_type::vec3_type, TEX_OFFSET),
+ NULL);
+
+ add_function("shadow1DLodOffset",
+ _texture(ir_txl, gpu_shader4, glsl_type::vec4_type, glsl_type::sampler1DShadow_type, glsl_type::vec3_type, TEX_OFFSET),
+ NULL);
+
+ add_function("shadow2DLodOffset",
+ _texture(ir_txl, gpu_shader4, glsl_type::vec4_type, glsl_type::sampler2DShadow_type, glsl_type::vec3_type, TEX_OFFSET),
+ NULL);
+
+ add_function("texture1DArrayLodOffset",
+ _texture(ir_txl, gpu_shader4, glsl_type::vec4_type, glsl_type::sampler1DArray_type, glsl_type::vec2_type, TEX_OFFSET),
+ _texture(ir_txl, gpu_shader4, glsl_type::ivec4_type, glsl_type::isampler1DArray_type, glsl_type::vec2_type, TEX_OFFSET),
+ _texture(ir_txl, gpu_shader4, glsl_type::uvec4_type, glsl_type::usampler1DArray_type, glsl_type::vec2_type, TEX_OFFSET),
+ NULL);
+
+ add_function("texture2DArrayLodOffset",
+ _texture(ir_txl, gpu_shader4, glsl_type::vec4_type, glsl_type::sampler2DArray_type, glsl_type::vec3_type, TEX_OFFSET),
+ _texture(ir_txl, gpu_shader4, glsl_type::ivec4_type, glsl_type::isampler2DArray_type, glsl_type::vec3_type, TEX_OFFSET),
+ _texture(ir_txl, gpu_shader4, glsl_type::uvec4_type, glsl_type::usampler2DArray_type, glsl_type::vec3_type, TEX_OFFSET),
+ NULL);
+
+ add_function("shadow1DArrayLodOffset",
+ _texture(ir_txl, gpu_shader4, glsl_type::vec4_type, glsl_type::sampler1DArrayShadow_type, glsl_type::vec3_type, TEX_OFFSET),
+ NULL);
+
add_function("textureProjLod",
_texture(ir_txl, v130, glsl_type::vec4_type, glsl_type::sampler1D_type, glsl_type::vec2_type, TEX_PROJECT),
_texture(ir_txl, v130, glsl_type::ivec4_type, glsl_type::isampler1D_type, glsl_type::vec2_type, TEX_PROJECT),
@@ -2458,6 +2774,38 @@ builtin_builder::create_builtins()
_texture(ir_txl, v130, glsl_type::float_type, glsl_type::sampler2DShadow_type, glsl_type::vec4_type, TEX_PROJECT | TEX_OFFSET),
NULL);
+ add_function("texture1DProjLodOffset",
+ _texture(ir_txl, gpu_shader4, glsl_type::vec4_type, glsl_type::sampler1D_type, glsl_type::vec2_type, TEX_PROJECT | TEX_OFFSET),
+ _texture(ir_txl, gpu_shader4, glsl_type::ivec4_type, glsl_type::isampler1D_type, glsl_type::vec2_type, TEX_PROJECT | TEX_OFFSET),
+ _texture(ir_txl, gpu_shader4, glsl_type::uvec4_type, glsl_type::usampler1D_type, glsl_type::vec2_type, TEX_PROJECT | TEX_OFFSET),
+ _texture(ir_txl, gpu_shader4, glsl_type::vec4_type, glsl_type::sampler1D_type, glsl_type::vec4_type, TEX_PROJECT | TEX_OFFSET),
+ _texture(ir_txl, gpu_shader4, glsl_type::ivec4_type, glsl_type::isampler1D_type, glsl_type::vec4_type, TEX_PROJECT | TEX_OFFSET),
+ _texture(ir_txl, gpu_shader4, glsl_type::uvec4_type, glsl_type::usampler1D_type, glsl_type::vec4_type, TEX_PROJECT | TEX_OFFSET),
+ NULL);
+
+ add_function("texture2DProjLodOffset",
+ _texture(ir_txl, gpu_shader4, glsl_type::vec4_type, glsl_type::sampler2D_type, glsl_type::vec3_type, TEX_PROJECT | TEX_OFFSET),
+ _texture(ir_txl, gpu_shader4, glsl_type::ivec4_type, glsl_type::isampler2D_type, glsl_type::vec3_type, TEX_PROJECT | TEX_OFFSET),
+ _texture(ir_txl, gpu_shader4, glsl_type::uvec4_type, glsl_type::usampler2D_type, glsl_type::vec3_type, TEX_PROJECT | TEX_OFFSET),
+ _texture(ir_txl, gpu_shader4, glsl_type::vec4_type, glsl_type::sampler2D_type, glsl_type::vec4_type, TEX_PROJECT | TEX_OFFSET),
+ _texture(ir_txl, gpu_shader4, glsl_type::ivec4_type, glsl_type::isampler2D_type, glsl_type::vec4_type, TEX_PROJECT | TEX_OFFSET),
+ _texture(ir_txl, gpu_shader4, glsl_type::uvec4_type, glsl_type::usampler2D_type, glsl_type::vec4_type, TEX_PROJECT | TEX_OFFSET),
+ NULL);
+
+ add_function("texture3DProjLodOffset",
+ _texture(ir_txl, gpu_shader4, glsl_type::vec4_type, glsl_type::sampler3D_type, glsl_type::vec4_type, TEX_PROJECT | TEX_OFFSET),
+ _texture(ir_txl, gpu_shader4, glsl_type::ivec4_type, glsl_type::isampler3D_type, glsl_type::vec4_type, TEX_PROJECT | TEX_OFFSET),
+ _texture(ir_txl, gpu_shader4, glsl_type::uvec4_type, glsl_type::usampler3D_type, glsl_type::vec4_type, TEX_PROJECT | TEX_OFFSET),
+ NULL);
+
+ add_function("shadow1DProjLodOffset",
+ _texture(ir_txl, gpu_shader4, glsl_type::vec4_type, glsl_type::sampler1DShadow_type, glsl_type::vec4_type, TEX_PROJECT | TEX_OFFSET),
+ NULL);
+
+ add_function("shadow2DProjLodOffset",
+ _texture(ir_txl, gpu_shader4, glsl_type::vec4_type, glsl_type::sampler2DShadow_type, glsl_type::vec4_type, TEX_PROJECT | TEX_OFFSET),
+ NULL);
+
add_function("textureGrad",
_texture(ir_txd, v130, glsl_type::vec4_type, glsl_type::sampler1D_type, glsl_type::float_type),
_texture(ir_txd, v130, glsl_type::ivec4_type, glsl_type::isampler1D_type, glsl_type::float_type),
@@ -2535,6 +2883,62 @@ builtin_builder::create_builtins()
_texture(ir_txd, v130, glsl_type::float_type, glsl_type::sampler2DArrayShadow_type, glsl_type::vec4_type, TEX_OFFSET),
NULL);
+ add_function("texture1DGradOffset",
+ _texture(ir_txd, gpu_shader4, glsl_type::vec4_type, glsl_type::sampler1D_type, glsl_type::float_type, TEX_OFFSET),
+ _texture(ir_txd, gpu_shader4, glsl_type::ivec4_type, glsl_type::isampler1D_type, glsl_type::float_type, TEX_OFFSET),
+ _texture(ir_txd, gpu_shader4, glsl_type::uvec4_type, glsl_type::usampler1D_type, glsl_type::float_type, TEX_OFFSET),
+ NULL);
+
+ add_function("texture2DGradOffset",
+ _texture(ir_txd, gpu_shader4, glsl_type::vec4_type, glsl_type::sampler2D_type, glsl_type::vec2_type, TEX_OFFSET),
+ _texture(ir_txd, gpu_shader4, glsl_type::ivec4_type, glsl_type::isampler2D_type, glsl_type::vec2_type, TEX_OFFSET),
+ _texture(ir_txd, gpu_shader4, glsl_type::uvec4_type, glsl_type::usampler2D_type, glsl_type::vec2_type, TEX_OFFSET),
+ NULL);
+
+ add_function("texture3DGradOffset",
+ _texture(ir_txd, gpu_shader4, glsl_type::vec4_type, glsl_type::sampler3D_type, glsl_type::vec3_type, TEX_OFFSET),
+ _texture(ir_txd, gpu_shader4, glsl_type::ivec4_type, glsl_type::isampler3D_type, glsl_type::vec3_type, TEX_OFFSET),
+ _texture(ir_txd, gpu_shader4, glsl_type::uvec4_type, glsl_type::usampler3D_type, glsl_type::vec3_type, TEX_OFFSET),
+ NULL);
+
+ add_function("texture2DRectGradOffset",
+ _texture(ir_txd, gpu_shader4, glsl_type::vec4_type, glsl_type::sampler2DRect_type, glsl_type::vec2_type, TEX_OFFSET),
+ _texture(ir_txd, gpu_shader4, glsl_type::ivec4_type, glsl_type::isampler2DRect_type, glsl_type::vec2_type, TEX_OFFSET),
+ _texture(ir_txd, gpu_shader4, glsl_type::uvec4_type, glsl_type::usampler2DRect_type, glsl_type::vec2_type, TEX_OFFSET),
+ NULL);
+
+ add_function("shadow2DRectGradOffset",
+ _texture(ir_txd, gpu_shader4, glsl_type::vec4_type, glsl_type::sampler2DRectShadow_type, glsl_type::vec3_type, TEX_OFFSET),
+ NULL);
+
+ add_function("shadow1DGradOffset",
+ _texture(ir_txd, gpu_shader4, glsl_type::vec4_type, glsl_type::sampler1DShadow_type, glsl_type::vec3_type, TEX_OFFSET),
+ NULL);
+
+ add_function("shadow2DGradOffset",
+ _texture(ir_txd, gpu_shader4, glsl_type::vec4_type, glsl_type::sampler2DShadow_type, glsl_type::vec3_type, TEX_OFFSET),
+ NULL);
+
+ add_function("texture1DArrayGradOffset",
+ _texture(ir_txd, gpu_shader4, glsl_type::vec4_type, glsl_type::sampler1DArray_type, glsl_type::vec2_type, TEX_OFFSET),
+ _texture(ir_txd, gpu_shader4, glsl_type::ivec4_type, glsl_type::isampler1DArray_type, glsl_type::vec2_type, TEX_OFFSET),
+ _texture(ir_txd, gpu_shader4, glsl_type::uvec4_type, glsl_type::usampler1DArray_type, glsl_type::vec2_type, TEX_OFFSET),
+ NULL);
+
+ add_function("texture2DArrayGradOffset",
+ _texture(ir_txd, gpu_shader4, glsl_type::vec4_type, glsl_type::sampler2DArray_type, glsl_type::vec3_type, TEX_OFFSET),
+ _texture(ir_txd, gpu_shader4, glsl_type::ivec4_type, glsl_type::isampler2DArray_type, glsl_type::vec3_type, TEX_OFFSET),
+ _texture(ir_txd, gpu_shader4, glsl_type::uvec4_type, glsl_type::usampler2DArray_type, glsl_type::vec3_type, TEX_OFFSET),
+ NULL);
+
+ add_function("shadow1DArrayGradOffset",
+ _texture(ir_txd, gpu_shader4, glsl_type::vec4_type, glsl_type::sampler1DArrayShadow_type, glsl_type::vec3_type, TEX_OFFSET),
+ NULL);
+
+ add_function("shadow2DArrayGradOffset",
+ _texture(ir_txd, gpu_shader4, glsl_type::vec4_type, glsl_type::sampler2DArrayShadow_type, glsl_type::vec4_type, TEX_OFFSET),
+ NULL);
+
add_function("textureProjGrad",
_texture(ir_txd, v130, glsl_type::vec4_type, glsl_type::sampler1D_type, glsl_type::vec2_type, TEX_PROJECT),
_texture(ir_txd, v130, glsl_type::ivec4_type, glsl_type::isampler1D_type, glsl_type::vec2_type, TEX_PROJECT),
@@ -2599,6 +3003,51 @@ builtin_builder::create_builtins()
_texture(ir_txd, v130, glsl_type::float_type, glsl_type::sampler2DShadow_type, glsl_type::vec4_type, TEX_PROJECT | TEX_OFFSET),
NULL);
+ add_function("texture1DProjGradOffset",
+ _texture(ir_txd, gpu_shader4, glsl_type::vec4_type, glsl_type::sampler1D_type, glsl_type::vec2_type, TEX_PROJECT | TEX_OFFSET),
+ _texture(ir_txd, gpu_shader4, glsl_type::ivec4_type, glsl_type::isampler1D_type, glsl_type::vec2_type, TEX_PROJECT | TEX_OFFSET),
+ _texture(ir_txd, gpu_shader4, glsl_type::uvec4_type, glsl_type::usampler1D_type, glsl_type::vec2_type, TEX_PROJECT | TEX_OFFSET),
+ _texture(ir_txd, gpu_shader4, glsl_type::vec4_type, glsl_type::sampler1D_type, glsl_type::vec4_type, TEX_PROJECT | TEX_OFFSET),
+ _texture(ir_txd, gpu_shader4, glsl_type::ivec4_type, glsl_type::isampler1D_type, glsl_type::vec4_type, TEX_PROJECT | TEX_OFFSET),
+ _texture(ir_txd, gpu_shader4, glsl_type::uvec4_type, glsl_type::usampler1D_type, glsl_type::vec4_type, TEX_PROJECT | TEX_OFFSET),
+ NULL);
+
+ add_function("texture2DProjGradOffset",
+ _texture(ir_txd, gpu_shader4, glsl_type::vec4_type, glsl_type::sampler2D_type, glsl_type::vec3_type, TEX_PROJECT | TEX_OFFSET),
+ _texture(ir_txd, gpu_shader4, glsl_type::ivec4_type, glsl_type::isampler2D_type, glsl_type::vec3_type, TEX_PROJECT | TEX_OFFSET),
+ _texture(ir_txd, gpu_shader4, glsl_type::uvec4_type, glsl_type::usampler2D_type, glsl_type::vec3_type, TEX_PROJECT | TEX_OFFSET),
+ _texture(ir_txd, gpu_shader4, glsl_type::vec4_type, glsl_type::sampler2D_type, glsl_type::vec4_type, TEX_PROJECT | TEX_OFFSET),
+ _texture(ir_txd, gpu_shader4, glsl_type::ivec4_type, glsl_type::isampler2D_type, glsl_type::vec4_type, TEX_PROJECT | TEX_OFFSET),
+ _texture(ir_txd, gpu_shader4, glsl_type::uvec4_type, glsl_type::usampler2D_type, glsl_type::vec4_type, TEX_PROJECT | TEX_OFFSET),
+ NULL);
+
+ add_function("texture3DProjGradOffset",
+ _texture(ir_txd, gpu_shader4, glsl_type::vec4_type, glsl_type::sampler3D_type, glsl_type::vec4_type, TEX_PROJECT | TEX_OFFSET),
+ _texture(ir_txd, gpu_shader4, glsl_type::ivec4_type, glsl_type::isampler3D_type, glsl_type::vec4_type, TEX_PROJECT | TEX_OFFSET),
+ _texture(ir_txd, gpu_shader4, glsl_type::uvec4_type, glsl_type::usampler3D_type, glsl_type::vec4_type, TEX_PROJECT | TEX_OFFSET),
+ NULL);
+
+ add_function("texture2DRectProjGradOffset",
+ _texture(ir_txd, gpu_shader4, glsl_type::vec4_type, glsl_type::sampler2DRect_type, glsl_type::vec3_type, TEX_PROJECT | TEX_OFFSET),
+ _texture(ir_txd, gpu_shader4, glsl_type::ivec4_type, glsl_type::isampler2DRect_type, glsl_type::vec3_type, TEX_PROJECT | TEX_OFFSET),
+ _texture(ir_txd, gpu_shader4, glsl_type::uvec4_type, glsl_type::usampler2DRect_type, glsl_type::vec3_type, TEX_PROJECT | TEX_OFFSET),
+ _texture(ir_txd, gpu_shader4, glsl_type::vec4_type, glsl_type::sampler2DRect_type, glsl_type::vec4_type, TEX_PROJECT | TEX_OFFSET),
+ _texture(ir_txd, gpu_shader4, glsl_type::ivec4_type, glsl_type::isampler2DRect_type, glsl_type::vec4_type, TEX_PROJECT | TEX_OFFSET),
+ _texture(ir_txd, gpu_shader4, glsl_type::uvec4_type, glsl_type::usampler2DRect_type, glsl_type::vec4_type, TEX_PROJECT | TEX_OFFSET),
+ NULL);
+
+ add_function("shadow2DRectProjGradOffset",
+ _texture(ir_txd, gpu_shader4, glsl_type::vec4_type, glsl_type::sampler2DRectShadow_type, glsl_type::vec4_type, TEX_PROJECT | TEX_OFFSET),
+ NULL);
+
+ add_function("shadow1DProjGradOffset",
+ _texture(ir_txd, gpu_shader4, glsl_type::vec4_type, glsl_type::sampler1DShadow_type, glsl_type::vec4_type, TEX_PROJECT | TEX_OFFSET),
+ NULL);
+
+ add_function("shadow2DProjGradOffset",
+ _texture(ir_txd, gpu_shader4, glsl_type::vec4_type, glsl_type::sampler2DShadow_type, glsl_type::vec4_type, TEX_PROJECT | TEX_OFFSET),
+ NULL);
+
add_function("EmitVertex", _EmitVertex(), NULL);
add_function("EndPrimitive", _EndPrimitive(), NULL);
add_function("EmitStreamVertex",
@@ -2729,13 +3178,21 @@ builtin_builder::create_builtins()
NULL);
add_function("texture1D",
- _texture(ir_tex, v110, glsl_type::vec4_type, glsl_type::sampler1D_type, glsl_type::float_type),
- _texture(ir_txb, v110_derivatives_only, glsl_type::vec4_type, glsl_type::sampler1D_type, glsl_type::float_type),
+ _texture(ir_tex, v110, glsl_type::vec4_type, glsl_type::sampler1D_type, glsl_type::float_type),
+ _texture(ir_txb, v110_derivatives_only, glsl_type::vec4_type, glsl_type::sampler1D_type, glsl_type::float_type),
+ _texture(ir_tex, gpu_shader4, glsl_type::ivec4_type, glsl_type::isampler1D_type, glsl_type::float_type),
+ _texture(ir_txb, gpu_shader4_derivs_only, glsl_type::ivec4_type, glsl_type::isampler1D_type, glsl_type::float_type),
+ _texture(ir_tex, gpu_shader4, glsl_type::uvec4_type, glsl_type::usampler1D_type, glsl_type::float_type),
+ _texture(ir_txb, gpu_shader4_derivs_only, glsl_type::uvec4_type, glsl_type::usampler1D_type, glsl_type::float_type),
NULL);
add_function("texture1DArray",
- _texture(ir_tex, texture_array, glsl_type::vec4_type, glsl_type::sampler1DArray_type, glsl_type::vec2_type),
- _texture(ir_txb, fs_texture_array, glsl_type::vec4_type, glsl_type::sampler1DArray_type, glsl_type::vec2_type),
+ _texture(ir_tex, texture_array, glsl_type::vec4_type, glsl_type::sampler1DArray_type, glsl_type::vec2_type),
+ _texture(ir_txb, fs_texture_array, glsl_type::vec4_type, glsl_type::sampler1DArray_type, glsl_type::vec2_type),
+ _texture(ir_tex, gpu_shader4, glsl_type::ivec4_type, glsl_type::isampler1DArray_type, glsl_type::vec2_type),
+ _texture(ir_txb, gpu_shader4_derivs_only, glsl_type::ivec4_type, glsl_type::isampler1DArray_type, glsl_type::vec2_type),
+ _texture(ir_tex, gpu_shader4, glsl_type::uvec4_type, glsl_type::usampler1DArray_type, glsl_type::vec2_type),
+ _texture(ir_txb, gpu_shader4_derivs_only, glsl_type::uvec4_type, glsl_type::usampler1DArray_type, glsl_type::vec2_type),
NULL);
add_function("texture1DProj",
@@ -2743,88 +3200,152 @@ builtin_builder::create_builtins()
_texture(ir_tex, v110, glsl_type::vec4_type, glsl_type::sampler1D_type, glsl_type::vec4_type, TEX_PROJECT),
_texture(ir_txb, v110_derivatives_only, glsl_type::vec4_type, glsl_type::sampler1D_type, glsl_type::vec2_type, TEX_PROJECT),
_texture(ir_txb, v110_derivatives_only, glsl_type::vec4_type, glsl_type::sampler1D_type, glsl_type::vec4_type, TEX_PROJECT),
+ _texture(ir_tex, gpu_shader4, glsl_type::ivec4_type, glsl_type::isampler1D_type, glsl_type::vec2_type, TEX_PROJECT),
+ _texture(ir_tex, gpu_shader4, glsl_type::ivec4_type, glsl_type::isampler1D_type, glsl_type::vec4_type, TEX_PROJECT),
+ _texture(ir_txb, gpu_shader4_derivs_only, glsl_type::ivec4_type, glsl_type::isampler1D_type, glsl_type::vec2_type, TEX_PROJECT),
+ _texture(ir_txb, gpu_shader4_derivs_only, glsl_type::ivec4_type, glsl_type::isampler1D_type, glsl_type::vec4_type, TEX_PROJECT),
+ _texture(ir_tex, gpu_shader4, glsl_type::uvec4_type, glsl_type::usampler1D_type, glsl_type::vec2_type, TEX_PROJECT),
+ _texture(ir_tex, gpu_shader4, glsl_type::uvec4_type, glsl_type::usampler1D_type, glsl_type::vec4_type, TEX_PROJECT),
+ _texture(ir_txb, gpu_shader4_derivs_only, glsl_type::uvec4_type, glsl_type::usampler1D_type, glsl_type::vec2_type, TEX_PROJECT),
+ _texture(ir_txb, gpu_shader4_derivs_only, glsl_type::uvec4_type, glsl_type::usampler1D_type, glsl_type::vec4_type, TEX_PROJECT),
NULL);
add_function("texture1DLod",
_texture(ir_txl, tex1d_lod, glsl_type::vec4_type, glsl_type::sampler1D_type, glsl_type::float_type),
+ _texture(ir_txl, gpu_shader4, glsl_type::ivec4_type, glsl_type::isampler1D_type, glsl_type::float_type),
+ _texture(ir_txl, gpu_shader4, glsl_type::uvec4_type, glsl_type::usampler1D_type, glsl_type::float_type),
NULL);
add_function("texture1DArrayLod",
_texture(ir_txl, texture_array_lod, glsl_type::vec4_type, glsl_type::sampler1DArray_type, glsl_type::vec2_type),
+ _texture(ir_txl, gpu_shader4, glsl_type::ivec4_type, glsl_type::isampler1DArray_type, glsl_type::vec2_type),
+ _texture(ir_txl, gpu_shader4, glsl_type::uvec4_type, glsl_type::usampler1DArray_type, glsl_type::vec2_type),
NULL);
add_function("texture1DProjLod",
_texture(ir_txl, tex1d_lod, glsl_type::vec4_type, glsl_type::sampler1D_type, glsl_type::vec2_type, TEX_PROJECT),
_texture(ir_txl, tex1d_lod, glsl_type::vec4_type, glsl_type::sampler1D_type, glsl_type::vec4_type, TEX_PROJECT),
+ _texture(ir_txl, gpu_shader4, glsl_type::ivec4_type, glsl_type::isampler1D_type, glsl_type::vec2_type, TEX_PROJECT),
+ _texture(ir_txl, gpu_shader4, glsl_type::ivec4_type, glsl_type::isampler1D_type, glsl_type::vec4_type, TEX_PROJECT),
+ _texture(ir_txl, gpu_shader4, glsl_type::uvec4_type, glsl_type::usampler1D_type, glsl_type::vec2_type, TEX_PROJECT),
+ _texture(ir_txl, gpu_shader4, glsl_type::uvec4_type, glsl_type::usampler1D_type, glsl_type::vec4_type, TEX_PROJECT),
NULL);
add_function("texture2D",
- _texture(ir_tex, always_available, glsl_type::vec4_type, glsl_type::sampler2D_type, glsl_type::vec2_type),
- _texture(ir_txb, derivatives_only, glsl_type::vec4_type, glsl_type::sampler2D_type, glsl_type::vec2_type),
- _texture(ir_tex, texture_external, glsl_type::vec4_type, glsl_type::samplerExternalOES_type, glsl_type::vec2_type),
+ _texture(ir_tex, always_available, glsl_type::vec4_type, glsl_type::sampler2D_type, glsl_type::vec2_type),
+ _texture(ir_txb, derivatives_only, glsl_type::vec4_type, glsl_type::sampler2D_type, glsl_type::vec2_type),
+ _texture(ir_tex, gpu_shader4, glsl_type::ivec4_type, glsl_type::isampler2D_type, glsl_type::vec2_type),
+ _texture(ir_txb, gpu_shader4_derivs_only, glsl_type::ivec4_type, glsl_type::isampler2D_type, glsl_type::vec2_type),
+ _texture(ir_tex, gpu_shader4, glsl_type::uvec4_type, glsl_type::usampler2D_type, glsl_type::vec2_type),
+ _texture(ir_txb, gpu_shader4_derivs_only, glsl_type::uvec4_type, glsl_type::usampler2D_type, glsl_type::vec2_type),
+ _texture(ir_tex, texture_external, glsl_type::vec4_type, glsl_type::samplerExternalOES_type, glsl_type::vec2_type),
NULL);
add_function("texture2DArray",
- _texture(ir_tex, texture_array, glsl_type::vec4_type, glsl_type::sampler2DArray_type, glsl_type::vec3_type),
- _texture(ir_txb, fs_texture_array, glsl_type::vec4_type, glsl_type::sampler2DArray_type, glsl_type::vec3_type),
+ _texture(ir_tex, texture_array, glsl_type::vec4_type, glsl_type::sampler2DArray_type, glsl_type::vec3_type),
+ _texture(ir_txb, fs_texture_array, glsl_type::vec4_type, glsl_type::sampler2DArray_type, glsl_type::vec3_type),
+ _texture(ir_tex, gpu_shader4, glsl_type::ivec4_type, glsl_type::isampler2DArray_type, glsl_type::vec3_type),
+ _texture(ir_txb, gpu_shader4_derivs_only, glsl_type::ivec4_type, glsl_type::isampler2DArray_type, glsl_type::vec3_type),
+ _texture(ir_tex, gpu_shader4, glsl_type::uvec4_type, glsl_type::usampler2DArray_type, glsl_type::vec3_type),
+ _texture(ir_txb, gpu_shader4_derivs_only, glsl_type::uvec4_type, glsl_type::usampler2DArray_type, glsl_type::vec3_type),
NULL);
add_function("texture2DProj",
- _texture(ir_tex, always_available, glsl_type::vec4_type, glsl_type::sampler2D_type, glsl_type::vec3_type, TEX_PROJECT),
- _texture(ir_tex, always_available, glsl_type::vec4_type, glsl_type::sampler2D_type, glsl_type::vec4_type, TEX_PROJECT),
- _texture(ir_txb, derivatives_only, glsl_type::vec4_type, glsl_type::sampler2D_type, glsl_type::vec3_type, TEX_PROJECT),
- _texture(ir_txb, derivatives_only, glsl_type::vec4_type, glsl_type::sampler2D_type, glsl_type::vec4_type, TEX_PROJECT),
- _texture(ir_tex, texture_external, glsl_type::vec4_type, glsl_type::samplerExternalOES_type, glsl_type::vec3_type, TEX_PROJECT),
- _texture(ir_tex, texture_external, glsl_type::vec4_type, glsl_type::samplerExternalOES_type, glsl_type::vec4_type, TEX_PROJECT),
+ _texture(ir_tex, always_available, glsl_type::vec4_type, glsl_type::sampler2D_type, glsl_type::vec3_type, TEX_PROJECT),
+ _texture(ir_tex, always_available, glsl_type::vec4_type, glsl_type::sampler2D_type, glsl_type::vec4_type, TEX_PROJECT),
+ _texture(ir_txb, derivatives_only, glsl_type::vec4_type, glsl_type::sampler2D_type, glsl_type::vec3_type, TEX_PROJECT),
+ _texture(ir_txb, derivatives_only, glsl_type::vec4_type, glsl_type::sampler2D_type, glsl_type::vec4_type, TEX_PROJECT),
+ _texture(ir_tex, gpu_shader4, glsl_type::ivec4_type, glsl_type::isampler2D_type, glsl_type::vec3_type, TEX_PROJECT),
+ _texture(ir_tex, gpu_shader4, glsl_type::ivec4_type, glsl_type::isampler2D_type, glsl_type::vec4_type, TEX_PROJECT),
+ _texture(ir_txb, gpu_shader4_derivs_only, glsl_type::ivec4_type, glsl_type::isampler2D_type, glsl_type::vec3_type, TEX_PROJECT),
+ _texture(ir_txb, gpu_shader4_derivs_only, glsl_type::ivec4_type, glsl_type::isampler2D_type, glsl_type::vec4_type, TEX_PROJECT),
+ _texture(ir_tex, gpu_shader4, glsl_type::uvec4_type, glsl_type::usampler2D_type, glsl_type::vec3_type, TEX_PROJECT),
+ _texture(ir_tex, gpu_shader4, glsl_type::uvec4_type, glsl_type::usampler2D_type, glsl_type::vec4_type, TEX_PROJECT),
+ _texture(ir_txb, gpu_shader4_derivs_only, glsl_type::uvec4_type, glsl_type::usampler2D_type, glsl_type::vec3_type, TEX_PROJECT),
+ _texture(ir_txb, gpu_shader4_derivs_only, glsl_type::uvec4_type, glsl_type::usampler2D_type, glsl_type::vec4_type, TEX_PROJECT),
+ _texture(ir_tex, texture_external, glsl_type::vec4_type, glsl_type::samplerExternalOES_type, glsl_type::vec3_type, TEX_PROJECT),
+ _texture(ir_tex, texture_external, glsl_type::vec4_type, glsl_type::samplerExternalOES_type, glsl_type::vec4_type, TEX_PROJECT),
NULL);
add_function("texture2DLod",
_texture(ir_txl, lod_exists_in_stage, glsl_type::vec4_type, glsl_type::sampler2D_type, glsl_type::vec2_type),
+ _texture(ir_txl, gpu_shader4, glsl_type::ivec4_type, glsl_type::isampler2D_type, glsl_type::vec2_type),
+ _texture(ir_txl, gpu_shader4, glsl_type::uvec4_type, glsl_type::usampler2D_type, glsl_type::vec2_type),
NULL);
add_function("texture2DArrayLod",
_texture(ir_txl, texture_array_lod, glsl_type::vec4_type, glsl_type::sampler2DArray_type, glsl_type::vec3_type),
+ _texture(ir_txl, gpu_shader4, glsl_type::ivec4_type, glsl_type::isampler2DArray_type, glsl_type::vec3_type),
+ _texture(ir_txl, gpu_shader4, glsl_type::uvec4_type, glsl_type::usampler2DArray_type, glsl_type::vec3_type),
NULL);
add_function("texture2DProjLod",
_texture(ir_txl, lod_exists_in_stage, glsl_type::vec4_type, glsl_type::sampler2D_type, glsl_type::vec3_type, TEX_PROJECT),
_texture(ir_txl, lod_exists_in_stage, glsl_type::vec4_type, glsl_type::sampler2D_type, glsl_type::vec4_type, TEX_PROJECT),
+ _texture(ir_txl, gpu_shader4, glsl_type::ivec4_type, glsl_type::isampler2D_type, glsl_type::vec3_type, TEX_PROJECT),
+ _texture(ir_txl, gpu_shader4, glsl_type::ivec4_type, glsl_type::isampler2D_type, glsl_type::vec4_type, TEX_PROJECT),
+ _texture(ir_txl, gpu_shader4, glsl_type::uvec4_type, glsl_type::usampler2D_type, glsl_type::vec3_type, TEX_PROJECT),
+ _texture(ir_txl, gpu_shader4, glsl_type::uvec4_type, glsl_type::usampler2D_type, glsl_type::vec4_type, TEX_PROJECT),
NULL);
add_function("texture3D",
- _texture(ir_tex, tex3d, glsl_type::vec4_type, glsl_type::sampler3D_type, glsl_type::vec3_type),
- _texture(ir_txb, derivatives_tex3d, glsl_type::vec4_type, glsl_type::sampler3D_type, glsl_type::vec3_type),
+ _texture(ir_tex, tex3d, glsl_type::vec4_type, glsl_type::sampler3D_type, glsl_type::vec3_type),
+ _texture(ir_txb, derivatives_tex3d, glsl_type::vec4_type, glsl_type::sampler3D_type, glsl_type::vec3_type),
+ _texture(ir_tex, gpu_shader4, glsl_type::ivec4_type, glsl_type::isampler3D_type, glsl_type::vec3_type),
+ _texture(ir_txb, gpu_shader4_derivs_only, glsl_type::ivec4_type, glsl_type::isampler3D_type, glsl_type::vec3_type),
+ _texture(ir_tex, gpu_shader4, glsl_type::uvec4_type, glsl_type::usampler3D_type, glsl_type::vec3_type),
+ _texture(ir_txb, gpu_shader4_derivs_only, glsl_type::uvec4_type, glsl_type::usampler3D_type, glsl_type::vec3_type),
NULL);
add_function("texture3DProj",
- _texture(ir_tex, tex3d, glsl_type::vec4_type, glsl_type::sampler3D_type, glsl_type::vec4_type, TEX_PROJECT),
- _texture(ir_txb, derivatives_tex3d, glsl_type::vec4_type, glsl_type::sampler3D_type, glsl_type::vec4_type, TEX_PROJECT),
+ _texture(ir_tex, tex3d, glsl_type::vec4_type, glsl_type::sampler3D_type, glsl_type::vec4_type, TEX_PROJECT),
+ _texture(ir_txb, derivatives_tex3d, glsl_type::vec4_type, glsl_type::sampler3D_type, glsl_type::vec4_type, TEX_PROJECT),
+ _texture(ir_tex, gpu_shader4, glsl_type::ivec4_type, glsl_type::isampler3D_type, glsl_type::vec4_type, TEX_PROJECT),
+ _texture(ir_txb, gpu_shader4_derivs_only, glsl_type::ivec4_type, glsl_type::isampler3D_type, glsl_type::vec4_type, TEX_PROJECT),
+ _texture(ir_tex, gpu_shader4, glsl_type::uvec4_type, glsl_type::usampler3D_type, glsl_type::vec4_type, TEX_PROJECT),
+ _texture(ir_txb, gpu_shader4_derivs_only, glsl_type::uvec4_type, glsl_type::usampler3D_type, glsl_type::vec4_type, TEX_PROJECT),
NULL);
add_function("texture3DLod",
_texture(ir_txl, tex3d_lod, glsl_type::vec4_type, glsl_type::sampler3D_type, glsl_type::vec3_type),
+ _texture(ir_txl, gpu_shader4, glsl_type::ivec4_type, glsl_type::isampler3D_type, glsl_type::vec3_type),
+ _texture(ir_txl, gpu_shader4, glsl_type::uvec4_type, glsl_type::usampler3D_type, glsl_type::vec3_type),
NULL);
add_function("texture3DProjLod",
_texture(ir_txl, tex3d_lod, glsl_type::vec4_type, glsl_type::sampler3D_type, glsl_type::vec4_type, TEX_PROJECT),
+ _texture(ir_txl, gpu_shader4, glsl_type::ivec4_type, glsl_type::isampler3D_type, glsl_type::vec4_type, TEX_PROJECT),
+ _texture(ir_txl, gpu_shader4, glsl_type::uvec4_type, glsl_type::usampler3D_type, glsl_type::vec4_type, TEX_PROJECT),
NULL);
add_function("textureCube",
- _texture(ir_tex, always_available, glsl_type::vec4_type, glsl_type::samplerCube_type, glsl_type::vec3_type),
- _texture(ir_txb, derivatives_only, glsl_type::vec4_type, glsl_type::samplerCube_type, glsl_type::vec3_type),
+ _texture(ir_tex, always_available, glsl_type::vec4_type, glsl_type::samplerCube_type, glsl_type::vec3_type),
+ _texture(ir_txb, derivatives_only, glsl_type::vec4_type, glsl_type::samplerCube_type, glsl_type::vec3_type),
+ _texture(ir_tex, gpu_shader4, glsl_type::ivec4_type, glsl_type::isamplerCube_type, glsl_type::vec3_type),
+ _texture(ir_txb, gpu_shader4_derivs_only, glsl_type::ivec4_type, glsl_type::isamplerCube_type, glsl_type::vec3_type),
+ _texture(ir_tex, gpu_shader4, glsl_type::uvec4_type, glsl_type::usamplerCube_type, glsl_type::vec3_type),
+ _texture(ir_txb, gpu_shader4_derivs_only, glsl_type::uvec4_type, glsl_type::usamplerCube_type, glsl_type::vec3_type),
NULL);
add_function("textureCubeLod",
_texture(ir_txl, lod_exists_in_stage, glsl_type::vec4_type, glsl_type::samplerCube_type, glsl_type::vec3_type),
+ _texture(ir_txl, gpu_shader4, glsl_type::ivec4_type, glsl_type::isamplerCube_type, glsl_type::vec3_type),
+ _texture(ir_txl, gpu_shader4, glsl_type::uvec4_type, glsl_type::usamplerCube_type, glsl_type::vec3_type),
NULL);
add_function("texture2DRect",
_texture(ir_tex, texture_rectangle, glsl_type::vec4_type, glsl_type::sampler2DRect_type, glsl_type::vec2_type),
+ _texture(ir_tex, gpu_shader4, glsl_type::ivec4_type, glsl_type::isampler2DRect_type, glsl_type::vec2_type),
+ _texture(ir_tex, gpu_shader4, glsl_type::uvec4_type, glsl_type::usampler2DRect_type, glsl_type::vec2_type),
NULL);
add_function("texture2DRectProj",
_texture(ir_tex, texture_rectangle, glsl_type::vec4_type, glsl_type::sampler2DRect_type, glsl_type::vec3_type, TEX_PROJECT),
_texture(ir_tex, texture_rectangle, glsl_type::vec4_type, glsl_type::sampler2DRect_type, glsl_type::vec4_type, TEX_PROJECT),
+ _texture(ir_tex, gpu_shader4, glsl_type::ivec4_type, glsl_type::isampler2DRect_type, glsl_type::vec3_type, TEX_PROJECT),
+ _texture(ir_tex, gpu_shader4, glsl_type::ivec4_type, glsl_type::isampler2DRect_type, glsl_type::vec4_type, TEX_PROJECT),
+ _texture(ir_tex, gpu_shader4, glsl_type::uvec4_type, glsl_type::usampler2DRect_type, glsl_type::vec3_type, TEX_PROJECT),
+ _texture(ir_tex, gpu_shader4, glsl_type::uvec4_type, glsl_type::usampler2DRect_type, glsl_type::vec4_type, TEX_PROJECT),
NULL);
add_function("shadow1D",
@@ -2852,6 +3373,16 @@ builtin_builder::create_builtins()
_texture(ir_txb, v110_derivatives_only, glsl_type::vec4_type, glsl_type::sampler1DShadow_type, glsl_type::vec4_type, TEX_PROJECT),
NULL);
+ add_function("shadow2DArray",
+ _texture(ir_tex, texture_array, glsl_type::vec4_type, glsl_type::sampler2DArrayShadow_type, glsl_type::vec4_type),
+ _texture(ir_txb, fs_texture_array, glsl_type::vec4_type, glsl_type::sampler2DArrayShadow_type, glsl_type::vec4_type),
+ NULL);
+
+ add_function("shadowCube",
+ _texture(ir_tex, gpu_shader4, glsl_type::vec4_type, glsl_type::samplerCubeShadow_type, glsl_type::vec4_type),
+ _texture(ir_txb, gpu_shader4_derivs_only, glsl_type::vec4_type, glsl_type::samplerCubeShadow_type, glsl_type::vec4_type),
+ NULL);
+
add_function("shadow2DProj",
_texture(ir_tex, v110, glsl_type::vec4_type, glsl_type::sampler2DShadow_type, glsl_type::vec4_type, TEX_PROJECT),
_texture(ir_txb, v110_derivatives_only, glsl_type::vec4_type, glsl_type::sampler2DShadow_type, glsl_type::vec4_type, TEX_PROJECT),
@@ -2952,6 +3483,117 @@ builtin_builder::create_builtins()
_texture(ir_tg4, texture_texture4, glsl_type::vec4_type, glsl_type::sampler2D_type, glsl_type::vec2_type),
NULL);
+ add_function("texture1DGrad",
+ _texture(ir_txd, gpu_shader4, glsl_type::vec4_type, glsl_type::sampler1D_type, glsl_type::float_type),
+ _texture(ir_txd, gpu_shader4, glsl_type::ivec4_type, glsl_type::isampler1D_type, glsl_type::float_type),
+ _texture(ir_txd, gpu_shader4, glsl_type::uvec4_type, glsl_type::usampler1D_type, glsl_type::float_type),
+ NULL);
+
+ add_function("texture1DProjGrad",
+ _texture(ir_txd, gpu_shader4, glsl_type::vec4_type, glsl_type::sampler1D_type, glsl_type::vec2_type, TEX_PROJECT),
+ _texture(ir_txd, gpu_shader4, glsl_type::vec4_type, glsl_type::sampler1D_type, glsl_type::vec4_type, TEX_PROJECT),
+ _texture(ir_txd, gpu_shader4, glsl_type::ivec4_type, glsl_type::isampler1D_type, glsl_type::vec2_type, TEX_PROJECT),
+ _texture(ir_txd, gpu_shader4, glsl_type::ivec4_type, glsl_type::isampler1D_type, glsl_type::vec4_type, TEX_PROJECT),
+ _texture(ir_txd, gpu_shader4, glsl_type::uvec4_type, glsl_type::usampler1D_type, glsl_type::vec2_type, TEX_PROJECT),
+ _texture(ir_txd, gpu_shader4, glsl_type::uvec4_type, glsl_type::usampler1D_type, glsl_type::vec4_type, TEX_PROJECT),
+ NULL);
+
+ add_function("texture1DArrayGrad",
+ _texture(ir_txd, gpu_shader4, glsl_type::vec4_type, glsl_type::sampler1DArray_type, glsl_type::vec2_type),
+ _texture(ir_txd, gpu_shader4, glsl_type::ivec4_type, glsl_type::isampler1DArray_type, glsl_type::vec2_type),
+ _texture(ir_txd, gpu_shader4, glsl_type::uvec4_type, glsl_type::usampler1DArray_type, glsl_type::vec2_type),
+ NULL);
+
+ add_function("texture2DGrad",
+ _texture(ir_txd, gpu_shader4, glsl_type::vec4_type, glsl_type::sampler2D_type, glsl_type::vec2_type),
+ _texture(ir_txd, gpu_shader4, glsl_type::ivec4_type, glsl_type::isampler2D_type, glsl_type::vec2_type),
+ _texture(ir_txd, gpu_shader4, glsl_type::uvec4_type, glsl_type::usampler2D_type, glsl_type::vec2_type),
+ NULL);
+
+ add_function("texture2DProjGrad",
+ _texture(ir_txd, gpu_shader4, glsl_type::vec4_type, glsl_type::sampler2D_type, glsl_type::vec3_type, TEX_PROJECT),
+ _texture(ir_txd, gpu_shader4, glsl_type::vec4_type, glsl_type::sampler2D_type, glsl_type::vec4_type, TEX_PROJECT),
+ _texture(ir_txd, gpu_shader4, glsl_type::ivec4_type, glsl_type::isampler2D_type, glsl_type::vec3_type, TEX_PROJECT),
+ _texture(ir_txd, gpu_shader4, glsl_type::ivec4_type, glsl_type::isampler2D_type, glsl_type::vec4_type, TEX_PROJECT),
+ _texture(ir_txd, gpu_shader4, glsl_type::uvec4_type, glsl_type::usampler2D_type, glsl_type::vec3_type, TEX_PROJECT),
+ _texture(ir_txd, gpu_shader4, glsl_type::uvec4_type, glsl_type::usampler2D_type, glsl_type::vec4_type, TEX_PROJECT),
+ NULL);
+
+ add_function("texture2DArrayGrad",
+ _texture(ir_txd, gpu_shader4, glsl_type::vec4_type, glsl_type::sampler2DArray_type, glsl_type::vec3_type),
+ _texture(ir_txd, gpu_shader4, glsl_type::ivec4_type, glsl_type::isampler2DArray_type, glsl_type::vec3_type),
+ _texture(ir_txd, gpu_shader4, glsl_type::uvec4_type, glsl_type::usampler2DArray_type, glsl_type::vec3_type),
+ NULL);
+
+ add_function("texture3DGrad",
+ _texture(ir_txd, gpu_shader4, glsl_type::vec4_type, glsl_type::sampler3D_type, glsl_type::vec3_type),
+ _texture(ir_txd, gpu_shader4, glsl_type::ivec4_type, glsl_type::isampler3D_type, glsl_type::vec3_type),
+ _texture(ir_txd, gpu_shader4, glsl_type::uvec4_type, glsl_type::usampler3D_type, glsl_type::vec3_type),
+ NULL);
+
+ add_function("texture3DProjGrad",
+ _texture(ir_txd, gpu_shader4, glsl_type::vec4_type, glsl_type::sampler3D_type, glsl_type::vec4_type, TEX_PROJECT),
+ _texture(ir_txd, gpu_shader4, glsl_type::ivec4_type, glsl_type::isampler3D_type, glsl_type::vec4_type, TEX_PROJECT),
+ _texture(ir_txd, gpu_shader4, glsl_type::uvec4_type, glsl_type::usampler3D_type, glsl_type::vec4_type, TEX_PROJECT),
+ NULL);
+
+ add_function("textureCubeGrad",
+ _texture(ir_txd, gpu_shader4, glsl_type::vec4_type, glsl_type::samplerCube_type, glsl_type::vec3_type),
+ _texture(ir_txd, gpu_shader4, glsl_type::ivec4_type, glsl_type::isamplerCube_type, glsl_type::vec3_type),
+ _texture(ir_txd, gpu_shader4, glsl_type::uvec4_type, glsl_type::usamplerCube_type, glsl_type::vec3_type),
+ NULL);
+
+ add_function("shadow1DGrad",
+ _texture(ir_txd, gpu_shader4, glsl_type::vec4_type, glsl_type::sampler1DShadow_type, glsl_type::vec3_type),
+ NULL);
+
+ add_function("shadow1DProjGrad",
+ _texture(ir_txd, gpu_shader4, glsl_type::vec4_type, glsl_type::sampler1DShadow_type, glsl_type::vec4_type, TEX_PROJECT),
+ NULL);
+
+ add_function("shadow1DArrayGrad",
+ _texture(ir_txd, gpu_shader4, glsl_type::vec4_type, glsl_type::sampler1DArrayShadow_type, glsl_type::vec3_type),
+ NULL);
+
+ add_function("shadow2DGrad",
+ _texture(ir_txd, gpu_shader4, glsl_type::vec4_type, glsl_type::sampler2DShadow_type, glsl_type::vec3_type),
+ NULL);
+
+ add_function("shadow2DProjGrad",
+ _texture(ir_txd, gpu_shader4, glsl_type::vec4_type, glsl_type::sampler2DShadow_type, glsl_type::vec4_type, TEX_PROJECT),
+ NULL);
+
+ add_function("shadow2DArrayGrad",
+ _texture(ir_txd, gpu_shader4, glsl_type::vec4_type, glsl_type::sampler2DArrayShadow_type, glsl_type::vec4_type),
+ NULL);
+
+ add_function("texture2DRectGrad",
+ _texture(ir_txd, gpu_shader4, glsl_type::vec4_type, glsl_type::sampler2DRect_type, glsl_type::vec2_type),
+ _texture(ir_txd, gpu_shader4, glsl_type::ivec4_type, glsl_type::isampler2DRect_type, glsl_type::vec2_type),
+ _texture(ir_txd, gpu_shader4, glsl_type::uvec4_type, glsl_type::usampler2DRect_type, glsl_type::vec2_type),
+ NULL);
+
+ add_function("texture2DRectProjGrad",
+ _texture(ir_txd, gpu_shader4, glsl_type::vec4_type, glsl_type::sampler2DRect_type, glsl_type::vec3_type, TEX_PROJECT),
+ _texture(ir_txd, gpu_shader4, glsl_type::vec4_type, glsl_type::sampler2DRect_type, glsl_type::vec4_type, TEX_PROJECT),
+ _texture(ir_txd, gpu_shader4, glsl_type::ivec4_type, glsl_type::isampler2DRect_type, glsl_type::vec3_type, TEX_PROJECT),
+ _texture(ir_txd, gpu_shader4, glsl_type::ivec4_type, glsl_type::isampler2DRect_type, glsl_type::vec4_type, TEX_PROJECT),
+ _texture(ir_txd, gpu_shader4, glsl_type::uvec4_type, glsl_type::usampler2DRect_type, glsl_type::vec3_type, TEX_PROJECT),
+ _texture(ir_txd, gpu_shader4, glsl_type::uvec4_type, glsl_type::usampler2DRect_type, glsl_type::vec4_type, TEX_PROJECT),
+ NULL);
+
+ add_function("shadow2DRectGrad",
+ _texture(ir_txd, gpu_shader4, glsl_type::vec4_type, glsl_type::sampler2DRectShadow_type, glsl_type::vec3_type),
+ NULL);
+
+ add_function("shadow2DRectProjGrad",
+ _texture(ir_txd, gpu_shader4, glsl_type::vec4_type, glsl_type::sampler2DRectShadow_type, glsl_type::vec4_type, TEX_PROJECT),
+ NULL);
+
+ add_function("shadowCubeGrad",
+ _texture(ir_txd, gpu_shader4, glsl_type::vec4_type, glsl_type::samplerCubeShadow_type, glsl_type::vec4_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),