glsl: Add support for precise redeclarations

This works like glsl-1.20+'s invariant redeclarations, but with fewer
restrictions, since `precise` is allowed on pretty much anything.

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
This commit is contained in:
Chris Forbes
2014-04-27 16:03:54 +12:00
parent 4b756b20c4
commit 5ecffe5a3a
4 changed files with 47 additions and 7 deletions

View File

@@ -746,13 +746,11 @@ public:
exec_list declarations;
/**
* Special flag for vertex shader "invariant" declarations.
*
* Vertex shaders can contain "invariant" variable redeclarations that do
* not include a type. For example, "invariant gl_Position;". This flag
* is used to note these cases when no type is specified.
* Flags for redeclarations. In these cases, no type is specified, to
* `type` is allowed to be NULL. In all other cases, this would be an error.
*/
int invariant;
int invariant; /** < `invariant` redeclaration */
int precise; /** < `precise` redeclaration */
};