[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".

Józef Kucia joseph.kucia at gmail.com
Tue Jun 6 13:03:22 UTC 2017


On Thu, Jun 1, 2017 at 1:11 PM, sandra koroniewska
<sandra.koroniewska at gmail.com> wrote:
> Hi,
> this change fixes a real problem for me (a crash on an Intel driver).
> I don't know if I understand this right, but for glPixelMap there is written
> in a spec (core 2.1, page 117): "If a pixel unpack buffer is bound (as
> indicated by a non-zero value of PIXEL UNPACK BUFFER BINDING), values is an
> offset into the pixel unpack buffer; otherwise, values is a pointer to
> client memory"
>
> There is a call after glUnmapBuffer:
> glPixelMapusv(GL_PIXEL_MAP_R_TO_R, max, NULL);
>
> So I understand that this "NULL" is an offset into the pixel unpack buffer,
> because it doesn't look like a pointer to client memory. But when I unmap
> it, the pointer is invalid, so there is a crash in this function.
> Tell me if I'm wrong, but I'm not sure if pbo_mem is not used.

PIXEL UNPACK BUFFER BINDING is changed using glBindBuffer() command.
glUnmapBuffer() does not modify buffer bindings.


More information about the Piglit mailing list