I'm working a bit on performance of my OpenGL engine; since latest AMD drivers introduced also GL_ARB_shader_draw_parameters extension, I wanted to try it!
I made all the components needed for it to give me some performance gain in current state of my engine and it actually give me few percent.
Right now I'm using BaseInstance to pass the parameter to vertex shader than I'm using gl_BaseInstanceARB inside shader code to access the value.
It works well with my simple shader code that does not work with skinning (veb_phong_BI.xml) this program compile well and everything works even giving me performance gain coz I avoided passing parameter through glUniform.
However; I got strange error in my skinning code. It uses completely same approach just adding skinning matrices.
The shader in "veb_skin_phong_BI.xml" does not compile at all! Strange part is that it does fail to link program with this error: "Vertex link error: The number of attributes used exceeded the maximum." (Compilation of both vertex and fragment succeeded)
(Well I'm using XML files that contain both Vertex and Fragment shader code)
SW: x64 driver Catalyst 14.4 (OpenGL 184.108.40.20674)
HW: AMD Radeon R9 200 Series (I think R9 X260)
Well I'm using OpenGL Core/Debug/Forward compatible context on Windows 8.1
OpenGL Version: 4.4.12874 Core Profile Forward-Compatible/Debug Context 220.127.116.11 / Vendor: ATI Technologies Inc. / Renderer: AMD Radeon R9 200 Series / Shading: 4.30
PS: My guess is that it is some kind of "mistake/bug/feature" in AMD OpenGL driver because it did work on NVidia well and there's no reason not to! It also works well until I add skinning (two more attributes); but does "GL_ARB_shader_draw_parameters" add so many other "attributes" that 5 attributes is too much to link?
Someone can check this out; there may also be mistake in my code but as I said it work well with 3 attributes; it works well on NVidia so my guess is that error is not on my side; does anyone else faced this problem? (I also guess because GL_ARB_shader_draw_parameters is new feature from latest version so may also not be well tested..)