[Mesa-dev] [Piglit] [PATCH] Add a simple testcase to test that GL_ELEMENT_ARRAY_BUFFER is per vao
Yuanhan Liu
yuanhan.liu at linux.intel.com
Sun Nov 27 19:30:08 PST 2011
On Thu, Nov 24, 2011 at 11:25:23AM -0800, Eric Anholt wrote:
> On Wed, 23 Nov 2011 12:24:37 -0700, Brian Paul <brianp at vmware.com> wrote:
> > On 11/23/2011 12:12 PM, Eric Anholt wrote:
> > > On Wed, 23 Nov 2011 17:34:30 +0800, Yuanhan Liu<yuanhan.liu at linux.intel.com> wrote:
> > >> From 9a1da8748f0faa23f34398213ff7ee45fda6bf36 Mon Sep 17 00:00:00 2001
> > >> From: Yuanhan Liu<yuanhan.liu at linux.intel.com>
> > >> Date: Wed, 23 Nov 2011 17:37:33 +0800
> > >> Subject: [PATCH] Add a simple testcase to test that GL_ELEMENT_ARRAY_BUFFER
> > >> is per vao
> > >>
> > >> According opengl spec 4.2.pdf table 6.12 (Vertex Array Object State) at
> > >> page 515: the element buffer object is listed in vertex array object.
> > >>
> > >> Add a testcase to test that.
> > >>
> > >> v2: fix n careless 'always-return-PIGLIT_PASS' fault.
> > >>
> > >> Signed-off-by: Yuanhan Liu<yuanhan.liu at linux.intel.com>
> > >
> > >> diff --git a/tests/general/vao-element-array-buffer.c b/tests/general/vao-element-array-buffer.c
> > >> new file mode 100644
> > >> index 0000000..8803bff
> > >> --- /dev/null
> > >> +++ b/tests/general/vao-element-array-buffer.c
> > >> @@ -0,0 +1,94 @@
> > >> +/*
> > >> + * Copyright (C) 2011 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:
> > >> + * Yuanhan Liu<yuanhan.liu at linux.intel.com>
> > >> + */
> > >
> > > Generally, the style I advocate is to not include the Authors line in
> > > copyright messages. git records who the author was already, and will
> > > provide a more accurate view of who wrote the current code if someone
> > > wants to know some time down the line. I don't know how many times, 5
> > > years later, I've had emails from someone asking about some code I'd
> > > "written" that just had my name in the header and nothing else really of
> > > mine, from back when we were including Authors lines in the CVS days.
> > >
> > >> + glutSwapBuffers();
> > >
> > > If you switched this to piglit_present_results, this test could be an
> > > add_concurrent_test() instead.
> >
> > Under what circumstances can't glutSwapBuffers() be replaced by
> > piglit_present_results()?
> >
> > I'm guessing many/most of the tests that use the former could be
> > changed to use the later. That might be a good project for someone
> > who wants to contribute.
>
> I guess everything using the framework could be trivially converted to
> it. Doesn't mean all of those are ready to be made concurrent (things
> explicitly using the window system framebuffer would still need work),
> but it might save a measurable amount of time to skip that many swaps.
Got it. Thanks.
More information about the mesa-dev
mailing list