Fatal error C9999 for geometry shader array copy


Not sure if this is the correct channel for bug reports, but I see others here, so I will add mine. I’ll also cross post this using the “Display Driver Feedback Form”.

I would like to report this error which is consistently reproducible when copying an array from geometry shader input to output, within a conditional. Copying the array element-by-element (e.g. using a for loop) works correctly, but using the array assignment operator to copy the entire array results in C9999 during shader compilation.

Below is a “simple” pass-through geometry shader that reproduces the issue.

#version 150

layout( triangles ) in;
layout( triangle_strip, max_vertices = 3 ) out;

in VertexData {
  vec4 data[ 1 ];

out VertexData {
  vec4 data[ 1 ];

bool testFunc() {
  return true;

void main() {
  if( testFunc() ) {
    data_out.data = data_in[ 0 ].data;                // ** Copying the whole array causes internal linker error
    // data_out.data[ 0 ] = data_in[ 0 ].data[ 0 ];   // ** Copying per element works fine
    gl_Position = gl_in[ 0 ].gl_Position;

    data_out.data = data_in[ 1 ].data;
    // data_out.data[ 0 ] = data_in[ 1 ].data[ 0 ];
    gl_Position = gl_in[ 1 ].gl_Position;

    data_out.data = data_in[ 2 ].data;
    // data_out.data[ 0 ] = data_in[ 2 ].data[ 0 ];
    gl_Position = gl_in[ 2 ].gl_Position;


Note that without the if statement the array copy works fine.


  • RTX 2080 Ti
  • Latest game ready driver (511.65), was present before this driver version too.
  • On Windows 10 and Ubuntu 20.04 (note: in the case of Linux it crashes the entire application, on Windows it just reports the C9999 error)

I can provide the full source on request, but the vertex and fragment shader are very trivial.

Thanks for your time.

Hello Neil and welcome to the NVIDIA developer forums!

Thank you for reporting this issue to us! I found a problem report very similar to yours already in our internal issue tracker and it is being worked on. From what I can tell it also looks like engineering already found the root cause. Unfortunately with rolling driver releases I cannot tell you when the potential fix will be included in a future driver release.

I hope this issue does not prevent you from doing amazing work with OpenGL!