Closed NicolBolas closed 4 years ago
Discussed briefly in the OpenGL/ES meeting today and we agree that "bufSize" is not a good name for this parameter for these functions. Perhaps "count" would be better.
We're happy to fix this. We need to come up with a list of functions that needs to be fixed. @NicolBolas do have a list in mind you can share? Thanks.
I believe the following is a complete list of functions where bufSize
is used and it pertains to an array count rather than a byte count:
glGetInternalformatSampleivNV
glGetInternalformati64v
glGetInternalformativ
glGetProgramResourcefvNV (also, this doesn't have a len
attribute in the gl.xml file)
glGetProgramResourceiv
glGetSynciv
glGetSyncivAPPLE
glQueryResourceNV
glVDPAUGetSurfaceivNV
Also, while parameter names are being changed, there were several functions in the gl.xml file that used the lowercase bufsize
rather than interCaps bufSize
:
glGetActiveSubroutineName glGetActiveSubroutineUniformName glGetCoverageModulationTableNV glGetDebugMessageLogAMD glGetTranslatedShaderSourceANGLE
I have made a PR with the XML changes here. However, that shouldn't be merged until the specs have also been updated with the new names. @oddhack Could you update the OpenGL and OpenGL ES specs with the parameter name changes to core functions above? Thanks.
Most parameters named
bufSize
specify the size of a buffer in bytes. However, a few parameters do not; they instead represent the count of items (typically integers) in a buffer. These functions include:glSynciv
glGetInternalformativ/i64v
glGetProgramResourceiv
(Name
is fine, since it is the size in bytes of the string's storage)There may be more.
The names of these
bufSize
parameters should be changed to make it clear that they are not buffer sizes, but are instead counts of items in the buffer. This misuse of terms even caused problems in the conformance test suites, where the CTS assumed that many of thesebufSize
uses were in bytes, not in values. The internal format query was fixed in the CTS, butglSynciv
remains broken.