Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 8 of 8

Thread: AMD glVertexAttribPointer() invalid op

  1. #1
    Junior Member Regular Contributor tksuoran's Avatar
    Join Date
    Mar 2008
    Location
    Cambridge, UK
    Posts
    224

    AMD glVertexAttribPointer() invalid op

    I already posted this on AMD developer forums but just in case anyone else is having this issue:

    glVertexAttribPointer() always fails for me on AMD (not on NVidia) if I do not use vertex array object in forward compatible context.

    The specification text says:

    "An INVALID_OPERATION error is generated under any of the following conditions:
    ...
    * any of the *Pointer commands specifying the location and organization of vertex array data are called while zero is bound to the ARRAY_BUFFER buffer object binding point (see section 2.9.6), and the pointer argument is not NULL."

    I have a proper VBO bound to ARRAY_BUFFER with glBindBuffer().

    If I remove the forward compatible flag from the context, my application works fine. To me, this looks like a driver bug: The checks added into forward compatible config incorrectly checks if VAO is bound, instead of checking that VBO is bound.

    Note that GL_ARRAY_BUFFER is VBO buffer, not VAO buffer.

  2. #2
    Advanced Member Frequent Contributor
    Join Date
    Apr 2003
    Posts
    665

    Re: AMD glVertexAttribPointer() invalid op


  3. #3
    Junior Member Regular Contributor tksuoran's Avatar
    Join Date
    Mar 2008
    Location
    Cambridge, UK
    Posts
    224

    Re: AMD glVertexAttribPointer() invalid op

    Edit: Oops, I didn't read it quite well enough. Checking..

    Second edit: The specification contradicts itself. E.2 mentions invalid operation which is not in 2.8.

  4. #4
    Senior Member OpenGL Guru
    Join Date
    May 2009
    Posts
    4,948

    Re: AMD glVertexAttribPointer() invalid op

    I read it, but I still think that the specification text I quoted clearly (well, after reading it very carefully several times) is about VBO and not about VAO.
    Yes it is. But it's not the only text in the spec on this subject.

    Does the specification somewhere explicitly say that default vertex array object (0) is deprecated?
    No. The core GL specification clearly says that there is no VAO number 0:

    Quote Originally Posted by The Spec
    Calling VertexAttribPointer when no buffer object or no vertex array object is bound will generate an INVALID_OPERATION error, as will calling any array drawing command when no vertex array object is bound.
    Deprecated means "marked for removal"; deprecated functionality still exists, but may not in later versions. Removed means removed. Things were deprecated in GL 3.0. They were removed in 3.1.

  5. #5
    Junior Member Regular Contributor tksuoran's Avatar
    Join Date
    Mar 2008
    Location
    Cambridge, UK
    Posts
    224

    Re: AMD glVertexAttribPointer() invalid op

    Apologies for editing my post while people were already quoting it.

    Still I think the deprecation and removing and specifically the invalid operation - if really intended - should be mentioned in 2.8 and not only in E.2. Also, 'vertex array object' could be interpreted to mean VBO vertex array buffer object as in 2.8.

  6. #6
    Senior Member OpenGL Guru
    Join Date
    May 2009
    Posts
    4,948

    Re: AMD glVertexAttribPointer() invalid op

    Still I think the deprecation and removing and specifically the invalid operation - if really intended - should be mentioned in 2.8 and not only in E.2.
    I agree, but the GL drivers forum probably isn't the best place to mention this

    Also, 'vertex array object' could be interpreted to mean VBO vertex array buffer object as in 2.8.
    There's no such thing as a "vertex array buffer object". There is a such thing as a "vertex array object." So clearly that's what they're talking about.

  7. #7
    Junior Member Regular Contributor tksuoran's Avatar
    Join Date
    Mar 2008
    Location
    Cambridge, UK
    Posts
    224

    Re: AMD glVertexAttribPointer() invalid op

    Well this started when I investigated why my test program didn't render anything on AMD, and after reading 2.8 I figured maybe it was a driver thing.

    There is "2.9.6 Vertex Arrays in Buffer Objects" ...

  8. #8
    Junior Member Regular Contributor tksuoran's Avatar
    Join Date
    Mar 2008
    Location
    Cambridge, UK
    Posts
    224

    Re: AMD glVertexAttribPointer() invalid op

    Okay, after reading the specifications again I*have to admit that the specification seems to be fine, as well as AMD*implementation.

    Apparently the body of the specification does not really cover the forward compatible context. If you want to use the forward compatible context you have to carefully read both the body text and the appendix E. I*kind of wish that the main text had at least footnotes in the places that are affected by forward compatibility.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •