Mesa (7.9): glcpp: Define GL_FRAGMENT_PRECISION_HIGH if GLSL version >= 1. 30.

Ian Romanick idr at kemper.freedesktop.org
Wed Dec 15 23:15:08 UTC 2010


Module: Mesa
Branch: 7.9
Commit: 9b8e56a502fce9bedceb6b4c38fa88e0563327eb
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=9b8e56a502fce9bedceb6b4c38fa88e0563327eb

Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Tue Nov 16 16:21:20 2010 -0800

glcpp: Define GL_FRAGMENT_PRECISION_HIGH if GLSL version >= 1.30.

Per section 4.5.4 of the GLSL 1.30 specification.
(cherry picked from commit 3fb83038a05bfcbc41e649b0b6c1a2c6ff41124c)

---

 src/glsl/glcpp/glcpp-parse.y |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/glsl/glcpp/glcpp-parse.y b/src/glsl/glcpp/glcpp-parse.y
index 43513eb..c1c985a 100644
--- a/src/glsl/glcpp/glcpp-parse.y
+++ b/src/glsl/glcpp/glcpp-parse.y
@@ -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




More information about the mesa-commit mailing list