PDA

View Full Version : wglGetGPUInfoAMD crashing...



Mars_999
07-14-2010, 08:11 PM
I am having some issues with this code and not sure why... If I take out the wglGetGPUInfoAMD() calls the crash stops...



GLuint gpuIDs[16] = {0};
GLuint maxGpus = wglGetGPUIDsAMD(16, gpuIDs);
GLint freeMem[4] = {0};
glGetIntegerv(GL_TEXTURE_FREE_MEMORY_ATI, &freeMem[0]);
availableMemory = freeMem[0] / 1024;
if(wglGetGPUInfoAMD(gpuIDs[0], WGL_GPU_RAM_AMD, GL_UNSIGNED_INT, sizeof(GLuint), &totalMemory) != 1)
totalMemory = 0;
if(wglGetGPUInfoAMD(gpuIDs[0], WGL_GPU_CLOCK_AMD, GL_UNSIGNED_INT, sizeof(GLuint), &clockSpeed) != 1)
clockSpeed = 0;

carsten neumann
07-15-2010, 07:22 AM
I assume you have code that checks the extensions are actually available and you initialize them correctly.
Have you tried to just call wglGetGPUIdsAMD(0, NULL) to get only the number of available GPUs?

Mars_999
07-15-2010, 05:39 PM
Hello,
Yeah I am using GLEW 1.5.5.

I called it with (0,0) and I get a 1 for a returned value.

BTW AFAIK I don't need to use a GL3+ RC do I? I am using GL2 RC.

Thanks

Mars_999
07-16-2010, 12:57 PM
Argh from the looks of it WGL_ARB_create_context expects to setup a GL3.2 RC? If so then I am guessing this is the issue. Can anyone here please confirm that you need to use a GL3+ RC to use this function!



Thanks