Re: [Mesa-dev] Using the 'f' suffix to create a float from an integer literal

2014-11-24 Thread Iago Toral
On Thu, 2014-11-20 at 09:33 -0800, Ian Romanick wrote: On 11/20/2014 05:33 AM, Neil Roberts wrote: For what it's worth, I did a quick grep through the internal and public shader-db and I couldn't find anything using this. git grep -P '\b(?!e[+-])(?![.0-9])[0-9]+f\b' If AMD

Re: [Mesa-dev] Using the 'f' suffix to create a float from an integer literal

2014-11-20 Thread Iago Toral
On Thu, 2014-11-20 at 08:08 +0100, Iago Toral wrote: On Wed, 2014-11-19 at 10:27 -0800, Ian Romanick wrote: On 11/19/2014 03:47 AM, Iago Toral Quiroga wrote: Hi, I came across a GLSL test that checks that doing something like this in a shader should fail: Is this one of the

Re: [Mesa-dev] Using the 'f' suffix to create a float from an integer literal

2014-11-20 Thread Neil Roberts
For what it's worth, I did a quick grep through the internal and public shader-db and I couldn't find anything using this. git grep -P '\b(?!e[+-])(?![.0-9])[0-9]+f\b' If AMD disallows it then it seems like it would be reasonably safe to disallow it in Mesa too. GCC disallows it too which

Re: [Mesa-dev] Using the 'f' suffix to create a float from an integer literal

2014-11-20 Thread Ian Romanick
On 11/20/2014 05:33 AM, Neil Roberts wrote: For what it's worth, I did a quick grep through the internal and public shader-db and I couldn't find anything using this. git grep -P '\b(?!e[+-])(?![.0-9])[0-9]+f\b' If AMD disallows it then it seems like it would be reasonably safe to

[Mesa-dev] Using the 'f' suffix to create a float from an integer literal

2014-11-19 Thread Iago Toral Quiroga
Hi, I came across a GLSL test that checks that doing something like this in a shader should fail: float value = 1f; However, this works fine in Mesa. Checking the spec I see: Floating-point constants are defined as follows. floating-constant: fractional-constant

Re: [Mesa-dev] Using the 'f' suffix to create a float from an integer literal

2014-11-19 Thread Ian Romanick
On 11/19/2014 03:47 AM, Iago Toral Quiroga wrote: Hi, I came across a GLSL test that checks that doing something like this in a shader should fail: Is this one of the dEQP tests? float value = 1f; It seems like we have a test related to this in piglit somewhere... it looks like

Re: [Mesa-dev] Using the 'f' suffix to create a float from an integer literal

2014-11-19 Thread Iago Toral
On Wed, 2014-11-19 at 10:27 -0800, Ian Romanick wrote: On 11/19/2014 03:47 AM, Iago Toral Quiroga wrote: Hi, I came across a GLSL test that checks that doing something like this in a shader should fail: Is this one of the dEQP tests? Yes. float value = 1f; It seems like we have

Re: [Mesa-dev] Using the 'f' suffix to create a float from an integer literal

2014-11-19 Thread Jose Fonseca
The $64,000 question: What do other GLSL compilers (including, perhaps,glslang) do? :) Shouldn't this be the $1e6f question? Jose From: mesa-dev mesa-dev-boun...@lists.freedesktop.org on behalf of Iago Toral ito...@igalia.com Sent: 20 November 2014