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

GLSL compiler reports error when declaring arrays without length using Type[] VarName syntax

Yong_H_
Beginner
1,066 Views

In GLSL, if you declare an array without specifying its length using the Type[] VarName syntax, compiler will always report error. Changing the declaration to Type VarName[]; would work around the issue.

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

System Used: (Manufacturer/Model) Sony Vaio Pro 13
CPU SKU: (i3, i5, Pentium, Celeron, etc.) i7 4500U
GPU SKU: (HD4400, HD5100, etc.) HD4400
Processor Line: (Y-Series, U-Series, etc.) U-Series
System BIOS Version: N/A
CMOS settings:N/A
Graphics Driver Version:20.19.15.4444
GOP/VBIOS Version: N/A
Operating System: Windows 10 1607
OS Version:
API: OpenGL
Occurs on non-Intel GPUs?:No

Steps to Reproduce:
-------------------------------
1. Create an GLSL shader with following content:

buffer inputBuffer {
​    vec4[] buffer;

}
​out vec4 outputColor;

void main() { outputColor = buffer[0]; }


2. Compile the shader with glCompileShader function

Expected Results: The shader should be compiled successfully.
Actual Results: Driver reports shader compilation error : "array without length"
-------------------------------

Additional Information: N/A

0 Kudos
1 Reply
Michael_C_Intel2
Employee
1,066 Views

Hi Yong,

I have filed a report and ma talking with the driver team about the issue. We may need additional information as we begin investigating, a sample binary or code would help us replicate the issue quicker. I will update you when I learn more.

-Michael 

0 Kudos
Reply