Bug 25877 - [GLSL 1.10] implicit conversion from "int" to "float" should not be allowed
Summary: [GLSL 1.10] implicit conversion from "int" to "float" should not be allowed
Status: VERIFIED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Mesa core (show other bugs)
Version: git
Hardware: Other All
: low normal
Assignee: Ian Romanick
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 29044
  Show dependency treegraph
 
Reported: 2010-01-03 17:34 UTC by Gordon Jin
Modified: 2010-08-18 19:53 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Gordon Jin 2010-01-03 17:34:35 UTC
(This is follow-up of bug#25771 and I'm now filing it as mesa bug)

GLSL spec 1.10 says "There are no implicit conversions between types", no exception.
(While spec starting from 1.20 allows the implicit conversion from "int" to "float" as an exception)

But piglit/tests/glslparsertest/shaders/dataType5.frag (testing against v110) passes with the current mesa:
void main()
{
    float f = 1; // int cannot be converted to float, use constructor to do the
conversion explicitly
}

ConstantConversions.frag and dataType13.frag also fail with the similar issue.
Comment 1 Eric Anholt 2010-08-17 08:45:52 UTC
Fixed with glsl2 merge.
Comment 2 Gordon Jin 2010-08-18 19:38:40 UTC
verified with mesa master d442a01ac14382d83cdaac87d2832315ceb3e963.


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.