[Piglit] [PATCH v3] pbo: delete unmapping the GL_PIXEL_UNPACK_BUFFER before using it and correct the data expected form glGetMapusv This fixes tests/spec/gl-2.1/pbo on Windows Intel driver. According to OpenGL Core spec 4.5, section 6.3.1 (Unmapping Buffers), page 75 "Unmapping a mapped buffer object invalidates the pointers to its data store" and to section 8.11.4 (Texture Image Queries) of the same spec on page 34 "If a pixel pack buffer is bound (as indicated by a non-zero value of PIXEL PACK BUFFER BINDING), data is an offset into the pixel pack buffer; otherwise,data is a pointer to client memory".
joseph.kucia at gmail.com
Thu May 25 14:55:17 UTC 2017
On Thu, May 25, 2017 at 4:38 PM, sandra koroniewska
<sandra.koroniewska at gmail.com> wrote:
> Hi Józef,
> sorry for responding here, but I didn't manage to send the corrections in
> response to your previous mail. Thanks for your answer. The fragment of your
> previous mail is:
> When it comes to unmapping the buffer, I don't know if I'm thinking right,
> but I read in OpenGL 4.5 spec that "Unmapping a mapped buffer object
> invalidates the pointer to its data store" and glUnmapBuffer is using a
> pointer to GL_PIXEL_UNPACK_BUFFER.
In this case, glUnmapBuffer() invalidates the "pbo_mem" pointer which
was returned by the previous call to glMapBuffer(). After the call to
glUnmapBuffer() the "pbo_mem" pointer is not used so I don't see a
reason to remove this glUnmapBuffer() call. The glPixelMapusv() calls
in the test use a buffer bound to GL_PIXEL_UNPACK_BUFFER, but the
buffer doesn't have to be mapped.
Does your change fix a real problem for you?
More information about the Piglit