[Mesa-dev] [PATCH v2 18/28] glsl/lexer: Support double floats

Ilia Mirkin imirkin at alum.mit.edu
Sat Feb 7 20:31:49 PST 2015


On Fri, Feb 6, 2015 at 3:40 AM, Ian Romanick <idr at freedesktop.org> wrote:
> On 02/06/2015 06:56 AM, Ilia Mirkin wrote:
>> From: Dave Airlie <airlied at gmail.com>
>>
>> Signed-off-by: Dave Airlie <airlied at redhat.com>
>> ---
>>  src/glsl/glsl_lexer.ll | 29 +++++++++++++++++++++++++----
>>  1 file changed, 25 insertions(+), 4 deletions(-)
>>
>> diff --git a/src/glsl/glsl_lexer.ll b/src/glsl/glsl_lexer.ll
>> index 57c46be..d8bdaa7 100644
>> --- a/src/glsl/glsl_lexer.ll
>> +++ b/src/glsl/glsl_lexer.ll
>> @@ -458,6 +458,15 @@ layout           {
>>                           return FLOATCONSTANT;
>>                       }
>>
>> +[0-9]+\.[0-9]+([eE][+-]?[0-9]+)?(lf|LF)      |
>> +\.[0-9]+([eE][+-]?[0-9]+)?(lf|LF)    |
>> +[0-9]+\.([eE][+-]?[0-9]+)?(lf|LF)    |
>> +[0-9]+[eE][+-]?[0-9]+(lf|LF)         |
>> +[0-9]+(lf|LF)                                {
>
> This last one is not correct.  We used to allow this for float
> constants, but we fixed it.  See commit 9d8aa88.

Removed. Also added a check for glsl 400 / fp64 here as well.

>
> With that fixed, this patch is
>
> Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>


More information about the mesa-dev mailing list