[Bug 89415] New: Mesa incorrectly thinks #extension directive is in the middle of a shader
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Tue Mar 3 12:27:27 PST 2015
https://bugs.freedesktop.org/show_bug.cgi?id=89415
Bug ID: 89415
Summary: Mesa incorrectly thinks #extension directive is in the
middle of a shader
Product: Mesa
Version: git
Hardware: All
OS: Linux (All)
Status: NEW
Severity: normal
Priority: medium
Component: glsl-compiler
Assignee: idr at freedesktop.org
Reporter: dark_sylinc at yahoo.com.ar
QA Contact: intel-3d-bugs at lists.freedesktop.org
Created attachment 113961
--> https://bugs.freedesktop.org/attachment.cgi?id=113961&action=edit
Vertex and Pixel shaders that fail compilation
Mesa incorrectly determines the #extension keyword is in the middle of a
shader, apparently because there are two blank spaces (or may be because of the
#version keyword).
>From the GLSL specs:
Each extension can define its allowed granularity of scope. If nothing is said,
the granularity is a shader (that is, a single compilation unit), **and the
extension directives must occur before any non-preprocessor tokens**.
Attached is the vertex and pixel shader. Mesa complains the vertex shader has
its extension directive declared in the middle of the shader, even though it's
not.
The version used was from git 3d4d77a5dc7bc9f60d7845ff1d8d5b23f988232a which is
from today.
This shader compiles fine in both NVIDIA and AMD propietary drivers in both
Linux and Windows.
Additionally since this is a pedantic issue, I'd suggest on this error Mesa
should try to reparse the file again and only leave a warning. Since there's
already a patch that enables the extension keyword to be used in the middle of
a shader (see
http://lists.freedesktop.org/archives/mesa-dev/2014-July/062988.html)
I can be reached for further information if needed.
Cheers
Matias
--
You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/intel-3d-bugs/attachments/20150303/540a5fb3/attachment.html>
More information about the intel-3d-bugs
mailing list