Bug with glDrawArrays and layout location specifier on Titan

When using a shader and multiple render targets, the driver crashes if GL_NONE is used in between the definition of attached draw buffers.

GLenum targets[] = { GL_COLOR_ATTACHMENT0, GL_NONE, GL_NONE, GL_NONE, GL_NONE, GL_NONE, GL_NONE, GL_COLOR_ATTACHMENT7 };
glDrawBuffers(8, targets);

In the fragment shader, the following to layout specifiers are given:

layout(location = 0) out vec4 color;
layout(location = 7) out vec4 pickData;

The bound FBO is complete (two color attachments and matching depth buffer).

If pickData is written in the fragment shader, the driver crashes with the following message:
“The NVIDIA OpenGL driver lost connection with the display driver due to exceeding the Windows Time-Out limit and is unable to continue. Error Code 7”


Tested on GeForce GTX Titan, OpenGL 4.4 core, GLSL “#version 440 compatibility”
Drivers 337.88, 340.43, and 340.52.
Windows 7, SP1