Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-67807

QOpenGLFunctions_4_5_Core has wrong prototypes for *NamedBuffer* functions

    XMLWordPrintable

Details

    • 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

        Activity

          People

            lagocs Laszlo Agocs
            xylosper Byoung-young Lee
            Votes:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There is 1 open Gerrit change