fred_em

Local variable vec4[256] driving my shader crazy?

Discussion created by fred_em on Nov 1, 2010
Latest reply on Nov 2, 2010 by frali

Hi,

I have the following code in my application:

#version 120
#extension GL_EXT_geometry_shader4 : enable

void calculate()
{
  vec4[200] points;

  // [...]

  // The code below runs in a loop, which I have omitted here
  vec4 px;
  // The code runs fine with the line below
  px = vec4(pt.x / a, pt.y / b, pt.z / c, 1.0);

  // The code crashes when I attempt to write data into points[]
  // If I remove this line, there is no crash. I do stay within the bounds of the array.
  points[n] = px;
}

void main(void)
{
  calculate();
}

Apparently the points[n] assignment statement makes the driver crash. What is wrong with this line? Is my array too big?

Thanks,
Fred

Radeon Mobility HD5470
Catalyst 10.8
Windows 7 x64

Outcomes