cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

dennis2
Journeyman III

glGetProgramResourceiv() not working in OpenGL 4.3 / 4.4

Dear AMD developers,

I have recently come across a problem with the function mentioned above.

After successfully compiling and linking my shaders I want to get the corresponding information to them.

Now to do this, I call glGetProgramResourceiv() with the arguments saved in the following array:

   GLenum InputValues[]   = { GL_NAME_LENGTH, GL_TYPE, GL_ARRAY_SIZE, GL_LOCATION,

GL_IS_PER_PATCH, GL_LOCATION_COMPONENT };

(All values are correctly predefined)

As glGetProgramResourceiv() uses a result array to print results to, I checked the output array before and after the call of the function, only to see that nothing changes.

(See https://www.opengl.org/wiki/Program_Introspection#Interface_query for further information on the process)

I have already tried it out on other machines and the problem only seems to occur when using AMD, the required OpenGL extension ARB_program_interface_query is still shown as supported however.

I am using a 64-Bit Windows with an AMD Radeon HD 7700 Series, Driver Version 14.10.1006-140417a-171098C.

Thanks in advance for everyone who can help me with this issue,

Dennis

0 Likes
1 Reply
deberly
Journeyman III

Although the question is almost a year old, I discovered it in a Google search for glGetProgramResourceiv and thought I'd post a response in case others search and find this page.  I had run into the same problem on my AMD 7970 with an earlier driver.  With a call to glGetError, I got GL_INVALID_ENUM.  The offending item was GL_LOCATION_COMPONENT.  The same code worked on an NVIDIA card.  I repeated the test now with

vendor = ATI Technologies Inc.

renderer = AMD Radeon HD 7900 Series

version = 4.4.13283 Compatibility Profile Context 14.501.1003.0

and the call succeeds with GL_LOCATION_COMPONENT.  However, I get a similar error on AMD with my current driver (but not on NVIDIA) with glGetProgramInterfaceiv(handle, GL_TRANSFORM_FEEDBACK_BUFFER, GL_ACTIVE_RESOURCES, &numResource).  The error is GL_INVALID_ENUM.

0 Likes