Bug: glCompileShader fails to compile geometry shader with max_vertices > 256 although GL_MAX_GEOMETRY_OUTPUT_VERTICES >> 256
• Repro steps (in Python):
- Initialize OpenGL
- Ensure version of GL and GLSL is > 3.0
- Ensure values of GL_MAX_GEOMETRY_OUTPUT_VERTICES and GL_MAX_GEOMETRY_OUTPUT_COMPONENTS are > 256
- Compile geometry shader with “layout( line_strip, max_vertices = 256 ) out;”
- Verify there are no errors and shader works as expected
- Change max_vertices to 257
- Recompile shader
• Expected result:
No errors and shader works as expected
• Actual result:
GL_GEOMETRY_SHADER (GL_GEOMETRY_SHADER) Shader compile failure (0): b"ERROR: 0:5: ‘max_vertices’ : layout qualifier-id value cannot be greater than 256\n\n"
b’ layout( line_strip, max_vertices = 257 ) out;’
• System config:
PyOpenGL 3.1.5
pyopengltk 0.0.3
tk 0.1.0
GL_VERSION: b’4.6.0 - Build 27.20.100.8681’
GL_SHADING_LANGUAGE_VERSION: b’4.60 - Build 27.20.100.8681’
GL_MAX_GEOMETRY_OUTPUT_VERTICES: 36320
GL_MAX_GEOMETRY_OUTPUT_COMPONENTS: 37156
Surface Pro 6
Processor Intel(R) Core™ i5-8250U CPU @ 1.60GHz 1.80 GHz
Installed RAM 8.00 GB
System type 64-bit operating system, x64-based processor
Edition Windows 11 Home Version 21H2
OS build 22000.376
I really appreciate your help tracking down this bug. Even getting 512 vertices would be sufficient for my app, and the system supports 36,320 vertices. Only having 256 vertices is causing major headaches. I’m already using instancing to reduce the number of vertices needed.