[Piglit] [PATCH] pbo: delete unmapping the GL_PIXEL_UNPACK_BUFFER before using it and correct the data expected form glGetMapusv

sandra koroniewska sandra.koroniewska at gmail.com
Mon May 15 15:01:54 UTC 2017


Hi,
is this patch alright? I'm asking because nobody commented this yet and I
don't see the patch pushed to Piglit.

Thanks,
Sandra

On Fri, May 5, 2017 at 1:45 PM, Sandra Koroniewska <
sandra.koroniewska at gmail.com> wrote:

> This fixes tests/spec/gl-2.1/pbo on Windows Intel driver. According to
> OpenGL 2.1 spec, page 38 "Unmapping a mapped buffer
> object invalidates the pointers to its data store and sets the object’s
> BUFFER MAPPED state to FALSE and its BUFFER MAP POINTER state to NULL."
> and to page 251 about GetPixelMap "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".
> ---
>  tests/spec/gl-2.1/pbo.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/tests/spec/gl-2.1/pbo.c b/tests/spec/gl-2.1/pbo.c
> index bb4c0352c..1b561f7cb 100644
> --- a/tests/spec/gl-2.1/pbo.c
> +++ b/tests/spec/gl-2.1/pbo.c
> @@ -305,7 +305,6 @@ test_pixel_map(void)
>                                 pbo_mem[i] = max - i - 1;
>
>                         if (use_unpack) {
> -                               glUnmapBufferARB(GL_PIXEL_
> UNPACK_BUFFER_ARB);
>                                 glPixelMapusv(GL_PIXEL_MAP_R_TO_R, max,
> NULL);
>                                 glPixelMapusv(GL_PIXEL_MAP_G_TO_G, max,
> NULL);
>                                 glPixelMapusv(GL_PIXEL_MAP_B_TO_B, max,
> NULL);
> @@ -353,7 +352,7 @@ test_pixel_map(void)
>                         }
>
>                         for (i = 0; i < max; i++) {
> -                               if (pbo_mem[i] != (255 - i)) {
> +                if (pbo_mem[i] != (max - i - 1)) {
>                                         REPORT_FAILURE("get PixelMap
> failed");
>                                         return PIGLIT_FAIL;
>                                 }
> --
> 2.11.0.windows.1
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/piglit/attachments/20170515/9dc01983/attachment.html>


More information about the Piglit mailing list