cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

cameni
Journeyman III

GLSL: unsigned integer constant overflow

Hello,

driver version 10.1, the following line of GLSL code:

   uint k = 3367900313U;

gives me Syntax error ERROR___INTEGER_CONST_OVERFLOW, even though the unsigned constant is within 32 bits. Seems like the GLSL compiler rejects unsigned constants with the highest bit set, as if they were signed.
Writing it as

   uint k = 0xC8BE1499U;

works OK.

0 Likes
1 Reply
pboudier
Staff

there is an overflow issue indeed in the glsl parser. we will fix it.

thanks,

Pierre B.

0 Likes