Bug 37205 - [GLSL] Norsetto shadow mapping: error: type mismatch
Summary: [GLSL] Norsetto shadow mapping: error: type mismatch
Status: RESOLVED NOTOURBUG
Alias: None
Product: Mesa
Classification: Unclassified
Component: Mesa core (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: mesa-dev
QA Contact:
URL: http://norsetto.site11.com/?db_select...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-14 08:38 UTC by Sven Arvidsson
Modified: 2011-05-14 10:14 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
failing shader (1.97 KB, text/plain)
2011-05-14 08:38 UTC, Sven Arvidsson
Details

Description Sven Arvidsson 2011-05-14 08:38:33 UTC
Created attachment 46715 [details]
failing shader

The Norsetto shadow mapping demo fails to compile one of the shaders with a "type mismatch" error. This was working back in 2009, so I guess it's a problem with the rewritten GLSL compiler.

http://norsetto.site11.com/?db_select=shadow&page_id=97

The failing shader is attached.
Comment 1 Marek Olšák 2011-05-14 08:50:04 UTC
I guess the problem is:

offset.y = 0;

But it should be:

offset.y = 0.0;

It looks like a bug in the demo.
Comment 2 Sven Arvidsson 2011-05-14 09:10:49 UTC
True, it does run with this small change. I don't have any other GL implementations to compare with, but I guess they are more forgiving with these errors.
Comment 3 Kenneth Graunke 2011-05-14 10:14:19 UTC
Yep, that's the issue.  The GLSL 1.10 specification, Chapter 4, explicitly states "There are no implicit conversions between types."

Another alternative is to use #version 120.  GLSL >= 1.20 supports implicit conversions and would be perfectly okay with that line.  There's really no reason not to use 1.20 at this point.


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.