summaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl/glsl_lexer.ll
Commit message (Collapse)AuthorAgeFilesLines
* glsl: Parse 0 as a preprocessor INTCONSTANTIan Romanick2016-11-231-0/+4
| | | | | | | | | | | | | | | | | | This allows a more reasonable error message for '#version 0' of 0:1(10): error: GLSL 0.00 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, 3.00 ES, 3.10 ES, and 3.20 ES instead of 0:1(10): error: syntax error, unexpected $undefined, expecting INTCONSTANT Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97420 Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Cc: mesa-stable@lists.freedesktop.org Cc: Juan A. Suarez Romero <jasuarez@igalia.com> Cc: Karol Herbst <karolherbst@gmail.com> (cherry picked from commit c8c46641af43edd106528ac0293db5aa02a2364e)
* mesa: add EXT_texture_cube_map_array supportIlia Mirkin2016-08-281-7/+7
| | | | | | | | This is identical to OES_texture_cube_map_array support. dEQP has tests which use this extension. Also it is part of AEP. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* mesa: Add support for OES_texture_cube_map_arrayIan Romanick2016-08-261-7/+7
| | | | | | | | | | | This has a separate enable flag because this extension also requires OES_geometry_shader. It is possible that some drivers may support OpenGL ES 3.1 and ARB_texture_cube_map but not support OES_geometry_shader. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* glsl: Mark cube map array sampler types as reserved in GLSL ES 3.10Ian Romanick2016-08-261-4/+4
| | | | | | | | | | | All the GLSL 4.x keywords were added to the list of reserved keywords in GLSL ES 3.10. As far as I can tell, these are the only ones that were missed. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Cc: mesa-stable@lists.freedesktop.org Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* glsl: Add extension plumbing for OES/EXT_tessellation_shader.Kenneth Graunke2016-08-081-1/+1
| | | | | | | | This adds the #extension directive support, built-in #defines, lexer keyword support, and updates has_tessellation_shader(). Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* glsl: resource is a reserved keyword in GLSL 4.20 as wellDave Airlie2016-05-041-1/+1
| | | | | | | | | resource just appears in GLSL 4.20 without any fanfare. Fixes GL43-CTX.CommonBugs.CommonBug_ReservedNames Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* glsl: Relax GLSL 1.10 float suffix error to a warning.Matt Turner2016-04-211-2/+2
| | | | | | | | | | | | Float suffixes are allowed in all subsequent GLSL specifications, and it's obvious what the user meant if they specify one. Accept it with a warning to avoid breaking applications, like Planeshift (although it looks like between 0.6.1 and 0.6.3 they might have removed the suffixes from their shaders). Reviewed-by: Lars Hamre <chemecse@gmail.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* glsl: allow usage of the keyword buffer before GLSL 430 / ESSL 310Ilia Mirkin2016-04-091-1/+1
| | | | | | | | | | The GLSL 4.20 and ESSL 3.00 specs don't list 'buffer' as a reserved keyword. Make the parser ignore it unless GLSL 4.30 / ESSL 3.10 are used, or ARB_shader_storage_buffer_objects is enabled. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com> Cc: mesa-stable@lists.freedesktop.org
* mesa: add GL_OES_shader_multisample_interpolation supportIlia Mirkin2016-03-301-1/+1
| | | | | | Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* glsl: invalidate float suffixes for GLSL 1.10 and GLSL ES 1.00Lars Hamre2016-03-291-0/+7
| | | | | | | | | | | | | | | | | | Float suffixes are not allowed in GLSL 1.10 nor GLSL ES 1.00. Fixes the following piglit tests: tests/spec/glsl-1.10/compiler/literals/invalid-float-suffix-capital-f.vert tests/spec/glsl-1.10/compiler/literals/invalid-float-suffix-f.vert` v2: modify error message v3: parse the float instead of returning an ERROR_TOK v4: (by Ken) Change to is_version(120, 300) to avoid breaking ES3 shaders; update commit message accordingly. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=81585 Signed-off-by: Lars Hamre <chemecse@gmail.com> Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* glsl: add OES_texture_buffer and EXT_texture_buffer supportIlia Mirkin2016-03-281-6/+6
| | | | | | | | | Expose the samplerBuffer/imageBuffer types, and allow the various functions to operate on them. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* mesa: add GL_OES_gpu_shader5 and GL_EXT_gpu_shader5 supportIlia Mirkin2016-02-271-1/+1
| | | | | | | | | | | The two extensions are identical, and are largely taking bits of already existing desktop functionality. We continue to do a poor job of supporting the 'precise' keyword, just like we do on desktop. This passes the relevant dEQP tests that I could find. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
* glsl: replace _strtoui64() with strtoull() for MSVCTimothy Arceri2016-02-131-4/+0
| | | | | | Now that MSVC 2013 is required we can remove this. Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
* glsl: move to compiler/Emil Velikov2016-01-261-0/+635
Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Acked-by: Matt Turner <mattst88@gmail.com> Acked-by: Jose Fonseca <jfonseca@vmware.com>