On Thu, Apr 30, 2015 at 5:56 PM, Chris Forbes <chr...@ijw.co.nz> wrote: >> /* Only ARB_texture_gather but not GLSL 4.0 or ARB_gpu_shader5. >> * used for relaxation of const offset requirements. >> */ >> static bool >> -texture_gather_only(const _mesa_glsl_parse_state *state) >> +texture_gather_only_or_es31(const _mesa_glsl_parse_state *state) >> { >> return !state->is_version(400, 0) && >> !state->ARB_gpu_shader5_enable && >> - state->ARB_texture_gather_enable; >> + (state->ARB_texture_gather_enable || >> + state->is_version(0, 310)); >> } > > I don't think this is correct. This is used to enable the restricted > versions of textureGather/textureGatherOffset which require a constant > offset. This restriction doesn't appear to exist in ES3.1 -- it's more > or less the GS5 version. > > An example pair, where at most one should be enabled: > _texture(ir_tg4, texture_gather_only, glsl_type::vec4_type, > glsl_type::sampler2D_type, glsl_type::vec2_type, TEX_OFFSET), > _texture(ir_tg4, gpu_shader5, glsl_type::vec4_type, > glsl_type::sampler2D_type, glsl_type::vec2_type, TEX_OFFSET_NONCONST),
From my read of GLSL ES 3.10, it requires const offsets. Non-const support is added in EXT_gpu_shader5: * extending the textureGather() built-in functions provided by OpenGL ES Shading Language 3.10: * allowing shaders to use arbitrary offsets computed at run-time to select a 2x2 footprint to gather from; and -ilia _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev