[Piglit] [PATCH 1/3] Move test that checks deletion of mapped buffer object from bugs/ to spec/arb_vertex_buffer_object/

Guy-Daniel Tiku guydany37 at gmail.com
Fri Apr 3 23:42:17 PDT 2015


Hi Dylan,

Based on the advice from Brian Paul on the location of the first patch I
submitted, I looked into fdo14575.c to get the appropriate location for
this test.

Best Wishes.
Guy-Daniel Tiku.

On Fri, Apr 3, 2015 at 11:04 PM, Dylan Baker <baker.dylan.c at gmail.com>
wrote:

> I'm also assuming that you've looked through all.py and made sure that
> these tests are in the appropriate location?
>
> On Thu, Apr 02, 2015 at 07:50:28PM -0400, Ilia Mirkin wrote:
> > Ideally you'd give it a more descriptive name than "fdo14575". What is
> > it testing? Some sort of create/delete sequence?
> >
> > On Thu, Apr 2, 2015 at 7:43 PM, Guy-Daniel Tiku <guydany37 at gmail.com>
> wrote:
> > > ---
> > >  tests/bugs/CMakeLists.gl.txt                       |  1 -
> > >  tests/bugs/fdo14575.c                              | 88
> ----------------------
> > >  .../arb_vertex_buffer_object/CMakeLists.gl.txt     |  1 +
> > >  tests/spec/arb_vertex_buffer_object/fdo14575.c     | 88
> ++++++++++++++++++++++
> > >  4 files changed, 89 insertions(+), 89 deletions(-)
> > >  delete mode 100644 tests/bugs/fdo14575.c
> > >  create mode 100644 tests/spec/arb_vertex_buffer_object/fdo14575.c
> > >
> > > diff --git a/tests/bugs/CMakeLists.gl.txt
> b/tests/bugs/CMakeLists.gl.txt
> > > index e24ec6b..78bc2d3 100644
> > > --- a/tests/bugs/CMakeLists.gl.txt
> > > +++ b/tests/bugs/CMakeLists.gl.txt
> > > @@ -15,7 +15,6 @@ piglit_add_executable (crash-cubemap-order
> crash-cubemap-order.c)
> > >  piglit_add_executable (crash-texparameter-before-teximage
> crash-texparameter-before-teximage.c)
> > >  piglit_add_executable (drawbuffer-modes drawbuffer-modes.c)
> > >  piglit_add_executable (fdo10370 fdo10370.c)
> > > -piglit_add_executable (fdo14575 fdo14575.c)
> > >  piglit_add_executable (r300-readcache r300-readcache.c)
> > >  piglit_add_executable (tex1d-2dborder tex1d-2dborder.c)
> > >  piglit_add_executable (fdo20701 fdo20701.c)
> > > diff --git a/tests/bugs/fdo14575.c b/tests/bugs/fdo14575.c
> > > deleted file mode 100644
> > > index a6125dc..0000000
> > > --- a/tests/bugs/fdo14575.c
> > > +++ /dev/null
> > > @@ -1,88 +0,0 @@
> > > -/*
> > > - * Copyright © 2007 Intel Corporation
> > > - *
> > > - * Permission is hereby granted, free of charge, to any person
> obtaining a
> > > - * copy of this software and associated documentation files (the
> "Software"),
> > > - * to deal in the Software without restriction, including without
> limitation
> > > - * the rights to use, copy, modify, merge, publish, distribute,
> sublicense,
> > > - * and/or sell copies of the Software, and to permit persons to whom
> the
> > > - * Software is furnished to do so, subject to the following
> conditions:
> > > - *
> > > - * The above copyright notice and this permission notice (including
> the next
> > > - * paragraph) shall be included in all copies or substantial portions
> of the
> > > - * Software.
> > > - *
> > > - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
> EXPRESS OR
> > > - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
> MERCHANTABILITY,
> > > - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT
> SHALL
> > > - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES
> OR OTHER
> > > - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
> ARISING
> > > - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
> OTHER DEALINGS
> > > - * IN THE SOFTWARE.
> > > - *
> > > - * Authors:
> > > - *    Eric Anholt <eric at anholt.net>
> > > - *
> > > - */
> > > -
> > > -/**
> > > - * @file fdo14575.c
> > > - *
> > > - * Tests that the driver doesn't fail when deleting a mapped buffer
> object.
> > > - */
> > > -#include "piglit-util-gl.h"
> > > -
> > > -PIGLIT_GL_TEST_CONFIG_BEGIN
> > > -
> > > -       config.supports_gl_compat_version = 10;
> > > -
> > > -       config.window_visual = PIGLIT_GL_VISUAL_RGB;
> > > -
> > > -PIGLIT_GL_TEST_CONFIG_END
> > > -
> > > -void
> > > -piglit_init(int argc, char**argv)
> > > -{
> > > -       GLfloat data = 1.0;
> > > -       GLfloat *v;
> > > -       GLuint buf;
> > > -
> > > -       piglit_require_extension("GL_ARB_vertex_buffer_object");
> > > -
> > > -       glGenBuffersARB(1, &buf);
> > > -
> > > -       /* First, do a normal buffer create/data/delete */
> > > -       glBindBufferARB(GL_ARRAY_BUFFER_ARB, buf);
> > > -       glBufferDataARB(GL_ARRAY_BUFFER_ARB, 4, &data,
> GL_STATIC_DRAW_ARB);
> > > -       glDeleteBuffersARB(1, &buf);
> > > -       if (!piglit_check_gl_error(GL_NO_ERROR))
> > > -               piglit_report_result(PIGLIT_FAIL);
> > > -
> > > -       /* Then, another normal path: create, map, write, unmap,
> delete */
> > > -       glBindBufferARB(GL_ARRAY_BUFFER_ARB, buf);
> > > -       glBufferDataARB(GL_ARRAY_BUFFER_ARB, 4, NULL,
> GL_STATIC_DRAW_ARB);
> > > -       v = (GLfloat *) glMapBufferARB(GL_ARRAY_BUFFER_ARB,
> GL_WRITE_ONLY_ARB);
> > > -       *v = data;
> > > -       glUnmapBufferARB(GL_ARRAY_BUFFER_ARB);
> > > -       glDeleteBuffersARB(1, &buf);
> > > -       if (!piglit_check_gl_error(GL_NO_ERROR))
> > > -               piglit_report_result(PIGLIT_FAIL);
> > > -
> > > -       /* Then, do the failing path: create, map, delete */
> > > -       glBindBufferARB(GL_ARRAY_BUFFER_ARB, buf);
> > > -       glBufferDataARB(GL_ARRAY_BUFFER_ARB, 4, NULL,
> GL_STATIC_DRAW_ARB);
> > > -       v = (GLfloat *) glMapBufferARB(GL_ARRAY_BUFFER_ARB,
> GL_WRITE_ONLY_ARB);
> > > -       *v = data;
> > > -       glDeleteBuffersARB(1, &buf);
> > > -       if (!piglit_check_gl_error(GL_NO_ERROR))
> > > -               piglit_report_result(PIGLIT_FAIL);
> > > -
> > > -       piglit_report_result(PIGLIT_PASS);
> > > -}
> > > -
> > > -enum piglit_result
> > > -piglit_display(void)
> > > -{
> > > -       /* Should never be reached */
> > > -       return PIGLIT_FAIL;
> > > -}
> > > diff --git a/tests/spec/arb_vertex_buffer_object/CMakeLists.gl.txt
> b/tests/spec/arb_vertex_buffer_object/CMakeLists.gl.txt
> > > index 6baaa19..a1c4c8e 100644
> > > --- a/tests/spec/arb_vertex_buffer_object/CMakeLists.gl.txt
> > > +++ b/tests/spec/arb_vertex_buffer_object/CMakeLists.gl.txt
> > > @@ -14,5 +14,6 @@ piglit_add_executable
> (arb_vertex_buffer_object-mixed-immediate-and-vbo mixed-im
> > >  piglit_add_executable (arb_vertex_buffer_object-ib-data-sync
> ib-data-sync.c)
> > >  piglit_add_executable (arb_vertex_buffer_object-ib-subdata-sync
> ib-subdata-sync.c)
> > >  piglit_add_executable (arb_vertex_buffer_object-vbo-subdata-many
> vbo-subdata-many.c)
> > > +piglit_add_executable (fdo14575 fdo14575.c)
> > >
> > >  # vim: ft=cmake:
> > > diff --git a/tests/spec/arb_vertex_buffer_object/fdo14575.c
> b/tests/spec/arb_vertex_buffer_object/fdo14575.c
> > > new file mode 100644
> > > index 0000000..a6125dc
> > > --- /dev/null
> > > +++ b/tests/spec/arb_vertex_buffer_object/fdo14575.c
> > > @@ -0,0 +1,88 @@
> > > +/*
> > > + * Copyright © 2007 Intel Corporation
> > > + *
> > > + * Permission is hereby granted, free of charge, to any person
> obtaining a
> > > + * copy of this software and associated documentation files (the
> "Software"),
> > > + * to deal in the Software without restriction, including without
> limitation
> > > + * the rights to use, copy, modify, merge, publish, distribute,
> sublicense,
> > > + * and/or sell copies of the Software, and to permit persons to whom
> the
> > > + * Software is furnished to do so, subject to the following
> conditions:
> > > + *
> > > + * The above copyright notice and this permission notice (including
> the next
> > > + * paragraph) shall be included in all copies or substantial portions
> of the
> > > + * Software.
> > > + *
> > > + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
> EXPRESS OR
> > > + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
> MERCHANTABILITY,
> > > + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT
> SHALL
> > > + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES
> OR OTHER
> > > + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
> ARISING
> > > + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
> OTHER DEALINGS
> > > + * IN THE SOFTWARE.
> > > + *
> > > + * Authors:
> > > + *    Eric Anholt <eric at anholt.net>
> > > + *
> > > + */
> > > +
> > > +/**
> > > + * @file fdo14575.c
> > > + *
> > > + * Tests that the driver doesn't fail when deleting a mapped buffer
> object.
> > > + */
> > > +#include "piglit-util-gl.h"
> > > +
> > > +PIGLIT_GL_TEST_CONFIG_BEGIN
> > > +
> > > +       config.supports_gl_compat_version = 10;
> > > +
> > > +       config.window_visual = PIGLIT_GL_VISUAL_RGB;
> > > +
> > > +PIGLIT_GL_TEST_CONFIG_END
> > > +
> > > +void
> > > +piglit_init(int argc, char**argv)
> > > +{
> > > +       GLfloat data = 1.0;
> > > +       GLfloat *v;
> > > +       GLuint buf;
> > > +
> > > +       piglit_require_extension("GL_ARB_vertex_buffer_object");
> > > +
> > > +       glGenBuffersARB(1, &buf);
> > > +
> > > +       /* First, do a normal buffer create/data/delete */
> > > +       glBindBufferARB(GL_ARRAY_BUFFER_ARB, buf);
> > > +       glBufferDataARB(GL_ARRAY_BUFFER_ARB, 4, &data,
> GL_STATIC_DRAW_ARB);
> > > +       glDeleteBuffersARB(1, &buf);
> > > +       if (!piglit_check_gl_error(GL_NO_ERROR))
> > > +               piglit_report_result(PIGLIT_FAIL);
> > > +
> > > +       /* Then, another normal path: create, map, write, unmap,
> delete */
> > > +       glBindBufferARB(GL_ARRAY_BUFFER_ARB, buf);
> > > +       glBufferDataARB(GL_ARRAY_BUFFER_ARB, 4, NULL,
> GL_STATIC_DRAW_ARB);
> > > +       v = (GLfloat *) glMapBufferARB(GL_ARRAY_BUFFER_ARB,
> GL_WRITE_ONLY_ARB);
> > > +       *v = data;
> > > +       glUnmapBufferARB(GL_ARRAY_BUFFER_ARB);
> > > +       glDeleteBuffersARB(1, &buf);
> > > +       if (!piglit_check_gl_error(GL_NO_ERROR))
> > > +               piglit_report_result(PIGLIT_FAIL);
> > > +
> > > +       /* Then, do the failing path: create, map, delete */
> > > +       glBindBufferARB(GL_ARRAY_BUFFER_ARB, buf);
> > > +       glBufferDataARB(GL_ARRAY_BUFFER_ARB, 4, NULL,
> GL_STATIC_DRAW_ARB);
> > > +       v = (GLfloat *) glMapBufferARB(GL_ARRAY_BUFFER_ARB,
> GL_WRITE_ONLY_ARB);
> > > +       *v = data;
> > > +       glDeleteBuffersARB(1, &buf);
> > > +       if (!piglit_check_gl_error(GL_NO_ERROR))
> > > +               piglit_report_result(PIGLIT_FAIL);
> > > +
> > > +       piglit_report_result(PIGLIT_PASS);
> > > +}
> > > +
> > > +enum piglit_result
> > > +piglit_display(void)
> > > +{
> > > +       /* Should never be reached */
> > > +       return PIGLIT_FAIL;
> > > +}
> > > --
> > > 2.1.0
> > >
> > > _______________________________________________
> > > Piglit mailing list
> > > Piglit at lists.freedesktop.org
> > > http://lists.freedesktop.org/mailman/listinfo/piglit
> > _______________________________________________
> > Piglit mailing list
> > Piglit at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/piglit
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20150404/f6e32436/attachment.html>


More information about the Piglit mailing list