summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2016-10-15 14:47:31 -0700
committerKenneth Graunke <kenneth@whitecape.org>2016-10-16 15:05:00 -0700
commitf30f48476fd2f441c7aaf001bd8456fe2d5432bf (patch)
tree09e475d46683cc5a6b2b442eaeb9028ad7b8887c
parent9baf4505fb31d3fbd2d18ca8b5e732079ef4af66 (diff)
downloadexternal_mesa3d-f30f48476fd2f441c7aaf001bd8456fe2d5432bf.zip
external_mesa3d-f30f48476fd2f441c7aaf001bd8456fe2d5432bf.tar.gz
external_mesa3d-f30f48476fd2f441c7aaf001bd8456fe2d5432bf.tar.bz2
glsl: Disable textureOffset(sampler2DArrayShadow, ...) in GLSL ES.
This has apparently never existed in GLSL ES. Fixes dEQP-GLES3.functional.shaders.texture_functions.invalid .textureoffset_sampler2darrayshadow_vec4_ivec2_vertex and .textureoffset_sampler2darrayshadow_vec4_ivec2_fragment Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98244 Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
-rw-r--r--src/compiler/glsl/builtin_functions.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/compiler/glsl/builtin_functions.cpp b/src/compiler/glsl/builtin_functions.cpp
index ad3d981..3e4bcbb 100644
--- a/src/compiler/glsl/builtin_functions.cpp
+++ b/src/compiler/glsl/builtin_functions.cpp
@@ -123,6 +123,12 @@ v130(const _mesa_glsl_parse_state *state)
}
static bool
+v130_desktop(const _mesa_glsl_parse_state *state)
+{
+ return state->is_version(130, 0);
+}
+
+static bool
v130_fs_only(const _mesa_glsl_parse_state *state)
{
return state->is_version(130, 300) &&
@@ -1808,7 +1814,7 @@ builtin_builder::create_builtins()
* that it was intended to be included previously, so allow it
* in 1.30.
*/
- _texture(ir_tex, v130, glsl_type::float_type, glsl_type::sampler2DArrayShadow_type, glsl_type::vec4_type, TEX_OFFSET),
+ _texture(ir_tex, v130_desktop, glsl_type::float_type, glsl_type::sampler2DArrayShadow_type, glsl_type::vec4_type, TEX_OFFSET),
_texture(ir_txb, v130_fs_only, glsl_type::vec4_type, glsl_type::sampler1D_type, glsl_type::float_type, TEX_OFFSET),
_texture(ir_txb, v130_fs_only, glsl_type::ivec4_type, glsl_type::isampler1D_type, glsl_type::float_type, TEX_OFFSET),