Graphics
Intel® graphics drivers and software, compatibility, troubleshooting, performance, and optimization
22664 Discussions

GLSL compiler complains about comma when there is none

Stefan3D
Honored Contributor II
1,568 Views

System Setup Information:
-----------------------------------------

System Used:   Acer Aspire 571G
CPU SKU:   i5-5200u
GPU SKU:  hd5500
System BIOS Version: 1.32 (latest)
Graphics Driver Version: 20.19.15.4549 (11-10-2016)
GOP/VBIOS Version: 5.5.1025
Operating System: Windows 10
OS Version: build 14986
API: OpenGL
Occurs on non-Intel GPUs?: NO

Steps to Reproduce:
-------------------------------
1. download attached demo "Quine in one frame"
2. download http://www.geeks3d.com/geexlab/
3. install GeeXLab
4. load XML file
5. check error log


Expected Results:
-------------------------------

Watch Quine demo (at least with NVIDIA GPU, screenshot in ZIP)

Actual Results:
-------------------------------

#define a(b)if((x-16)/11+10*y==i){q=b/d;o=q-10*(q/10);}i++;
causes ERROR: 0:35: ',' : syntax error syntax error

Additional Information:

I didn't write the demo, just converted it from Shadertoy, credits in XML file

NB: the latest OpenGL fixes since build 4463 still don't seem to have been added to BDW / Gen8 branch?

0 Kudos
3 Replies
Michael_C_Intel2
Employee
1,568 Views

Hi Stefan,

Your issue is filed and we will investigate. 

It is possible the fixes were not checked in before the next driver release was finalized. 

 

 

0 Kudos
Michael_C_Intel2
Employee
1,568 Views

Hi Stefan,

The driver team looked into the issue and found no driver bug. According to OGL 4.5 spec (https://www.opengl.org/registry/doc/GLSLangSpec.4.50.pdf ), section 3.3  Preprocessor, the attached shader, where the error occurs, is incorrect. The “Define” macro should have space between identifier and the body, the same as in Cpp standard (Spec says it is related). The error happens, because the parser interprets variable f as a macro function, after which there is a coma which is not expected there. Incorrect defines cause the function ‘mainImage” to be not recognized as function.

Source to cpp standard: http://www.cplusplus.com/doc/tutorial/preprocessor/

https://gcc.gnu.org/onlinedocs/cpp/Function-like-Macros.html#Function-like-Macros

https://gcc.gnu.org/onlinedocs/cpp/Object-like-Macros.html#Object-like-Macros

-Michael 

0 Kudos
Stefan3D
Honored Contributor II
1,568 Views

Thanks for the infos.

I'm still puzzled why the original code runs in WebGL

 

0 Kudos
Reply