glsl: Expose built-in packing functions under GLSL 4.2.
authorMatt Turner <mattst88@gmail.com>
Thu, 12 Mar 2015 01:14:28 +0000 (18:14 -0700)
committerMatt Turner <mattst88@gmail.com>
Fri, 13 Mar 2015 17:42:38 +0000 (10:42 -0700)
ARB_shading_language_packing is part of GLSL 4.2, not 4.0 as I
mistakenly believed. The following functions are available only with
ARB_shading_language_packing, GLSL 4.2 (not GLSL 4.0), or ES 3.0:

   - packSnorm2x16
   - unpackSnorm2x16
   - packHalf2x16
   - unpackHalf2x16

Reviewed-by: Carl Worth <cworth@cworth.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/glsl/builtin_functions.cpp

index 84bbdc2a4c6c8d9108765c190770d3b9d3646c9b..c6075722c912283b45a77c71d993ba90e7bdf8fa 100644 (file)
@@ -201,7 +201,7 @@ static bool
 shader_packing_or_es3(const _mesa_glsl_parse_state *state)
 {
    return state->ARB_shading_language_packing_enable ||
-          state->is_version(400, 300);
+          state->is_version(420, 300);
 }
 
 static bool