All GLSL struct declarations seem to produce "warning: empty declaration" warning. For example: struct Foo { float a; }; void main() { gl_FragColor = vec4(0.0); } Otherwise the compilation succeeds, so not a critical issue. If I modify glsl2 to output shader info log even when it did compile successfully, then the warning is printed. Reproduces with mesa master (f7217b99f2437), 9.2 (9586f4de7). Works correctly in 9.1 (0dbbfa054c9).
Yeah, I noticed that too. :( It should be any easy fix. I try to get a patch out this week.
Fix by the following commit. This will get cherry picked to the 10.0.1 release. commit 758658850bd5ba64bf2e8c04516ea1292aedcfc3 Author: Ian Romanick <ian.d.romanick@intel.com> Date: Wed Nov 27 11:22:27 2013 -0800 glsl: Don't emit empty declaration warning for a struct specifier The intention is that things like int; will generate a warning. However, we were also accidentally emitting the same warning for things like struct Foo { int x; }; Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68838 Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Cc: Aras Pranckevicius <aras@unity3d.com> Cc: "9.2 10.0" <mesa-stable@lists.freedesktop.org>
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.