Possible Memory Leak on ATI? (creation/deletion)

Hey everyone, I recently discovered a memory leak in a program that I am running. I tracked it down to creation and deletion of shader/programs.

I wrote a test case and narrowed it down to this: (note: test case, I know this isn’t a functional pass)

            static const char* TEST_SHADER = "void main ()

{
gl_FragColor = vec4(1.0, 0.0, 1.0, gl_Color.a);
}
\0";

GLhandleARB shader_program_handle = glCreateProgram ();
GLhandleARB fragment_shader_id = glCreateShader (GL_FRAGMENT_SHADER_ARB);

  glShaderSource (fragment_shader_id, 1, (const GLcharARB **) (&TEST_SHADER), 0);

// When we add the compileSource line, that is when the memory leak pops up
glCompileShader (fragment_shader_id);

  glDeleteShader (fragment_shader_id);
  glDeleteProgram (shader_program_handle);

Upon deletion of the program, the memory is not freed. If I remove the compile portion, then the memory is freed up.
Has anyone seen this before?

I wrote a test case and narrowed it down to this: (note: test case, I know this isn’t a functional pass)

Why are you using ARB_shader_objects? You should be using the core functionality by now.

Whoops (please don’t mind that), that was part of upgrading legacy code, both the versions boil down to the unsigned int anyway though.

We recently went on a leak hunt and found a few, particularly in the shader compiler. We think we’ve found them all. Expect this to be fixed in an upcoming driver release.

Thank you so much!

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.