diff options
author | Marek Olšák <[email protected]> | 2015-06-16 01:32:28 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2015-07-23 00:59:27 +0200 |
commit | 2abbe941e1bfaf494eb739b9fb81503736298f14 (patch) | |
tree | e3efbe4599fae877503e1f3c10eaf71daa1c51f0 | |
parent | fb800b3dcd32ddb6f57143b46105d677eb01da80 (diff) |
glsl: add the tessellation extension to the list for the "layout" qualifier
This is technically not needed, but it makes the compiler return a better
error message if tessellation is used with GLSL < 1.50.
Instead of:
error: syntax error, unexpected NEW_IDENTIFIER, expecting $end
It returns:
error: #version 150 layout qualifier `triangles' used
And the tessellation spec says:
OpenGL 3.2 and GLSL 1.50 are required.
So it makes perfect sense.
Reviewed-by: Kenneth Graunke <[email protected]>
-rw-r--r-- | src/glsl/glsl_lexer.ll | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/glsl/glsl_lexer.ll b/src/glsl/glsl_lexer.ll index ac4e2b70cc7..fe0083fe745 100644 --- a/src/glsl/glsl_lexer.ll +++ b/src/glsl/glsl_lexer.ll @@ -426,7 +426,8 @@ layout { || yyextra->ARB_uniform_buffer_object_enable || yyextra->ARB_fragment_coord_conventions_enable || yyextra->ARB_shading_language_420pack_enable - || yyextra->ARB_compute_shader_enable) { + || yyextra->ARB_compute_shader_enable + || yyextra->ARB_tessellation_shader_enable) { return LAYOUT_TOK; } else { void *mem_ctx = yyextra; |