Details
-
Bug
-
Resolution: Fixed
-
P3: Somewhat important
-
5.10.1, 6.6.1
-
7aaa6a604 (dev), 4553b20f5 (6.7)
Description
glClearNamedBufferSubData() glCopyNamedBufferSubData() glFlushMappedNamedBufferRange() glGetNamedBufferSubData() glMapNamedBufferRange() glNamedBufferData() glNamedBufferStorage() glNamedBufferSubData()
Above function in QOpenGLFunctions_4_5_Core use GLsizei type for size parameter.
However, from the OpenGL 4.5 specification (https://www.khronos.org/registry/OpenGL/specs/gl/glspec45.core.pdf), the type of every size parameter is GLsizeiptr.
On most 64bit platform, GLsizei is 32bit integer and GLsizeiptr is 64bit integer and these wrong prototypes make large named buffer(>2GB) unusable.
FYI, the references from web (for instance, https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glMapBufferRange.xhtml) depict wrong size type(GLsizei) instead of GLsizeiptr and I think the web pages are wrong.
I've checked some OpenGL drivers and they all uses GLsizeiptr for NamedBuffer functions.
For instance, you can see the parameter types in MESA here:
https://github.com/anholt/mesa/blob/ac86c72523d356f5ce954cd3b397c1f324d54920/src/mapi/glapi/gen/ARB_direct_state_access.xml#L110
Attachments
For Gerrit Dashboard: QTBUG-67807 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
557410,1 | Correct the internal signatures in the GL 4.5 func wrappers | tqtc/lts-6.5 | qt/tqtc-qtbase | Status: NEW | +2 | 0 |