glcpp: Define GL_FRAGMENT_PRECISION_HIGH if GLSL version >= 1.30.
authorKenneth Graunke <kenneth@whitecape.org>
Wed, 17 Nov 2010 00:21:20 +0000 (16:21 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Wed, 17 Nov 2010 00:22:12 +0000 (16:22 -0800)
Per section 4.5.4 of the GLSL 1.30 specification.

src/glsl/glcpp/glcpp-parse.y

index b31a18f87dc0df84df8848d00108260eb67a29cd..b69035a410a6f03051ef03af3f30f9998a7c1903 100644 (file)
@@ -320,6 +320,9 @@ control_line:
                if ($2 == 100)
                        add_builtin_define (parser, "GL_ES", 1);
 
+               if ($2 >= 130)
+                       add_builtin_define (parser, "GL_FRAGMENT_PRECISION_HIGH", 1);
+
                glcpp_printf(parser->output, "#version %" PRIiMAX, $2);
        }
 |      HASH NEWLINE