http://bugs.winehq.org/show_bug.cgi?id=15644
--- Comment #38 from H. Verbeet hverbeet@gmail.com 2008-10-28 16:56:20 --- (In reply to comment #37)
(In reply to comment #36)
Those GL errors are caused by the debug patch. You should first check the object type (GL_OBJECT_SUBTYPE_ARB) before trying to get the shader source, since obj can be a program as well.
Hmm, don't you mean calling glGetObjectParameterARBiv with GL_OBJECT_TYPE_ARB and checking whether it is GL_SHADER_OBJECT_ARB or GL_PROGRAM_OBJECT_ARB?
Probably :-)
I'm also not quite sure how to deal with the case when it's a program object (and not a shader object, I think the shader ones can be dumped correctly with my current code). Do I need to get the attached shader objects and dump them as well?
You probably don't need to do anything for program objects.
Or is this functionality already implemented somewhere else in the code?
+d3d_shader will show the source as it's being generated. Finding the source for a program is then a matter of searching back in the log for the shader objects that are linked into a program.