[Piglit] [PATCH 2/2] spec: add a new arb_map_buffer_range test case

Yuanhan Liu yuanhan.liu at linux.intel.com
Fri Oct 7 18:15:51 PDT 2011


On Tue, Oct 04, 2011 at 09:25:11PM -0700, Ben Widawsky wrote:
> On Mon, 26 Sep 2011 22:30:23 -0700
> Ben Widawsky <ben at bwidawsk.net> wrote:
> 
> > On Fri, Sep 23, 2011 at 10:34:57AM +0800, Yuanhan Liu wrote:
> > > Currently, this patch contains one simple test case which just care the
> > > error handling check while calling glMapBufferRange function.
> > > 
> > > v2: suggested by Ian, replace the error check function the one provided
> > > by piglit util help function: piglit_check_gl_error
> > > 
> > > Signed-off-by: Yuanhan Liu <yuanhan.liu at linux.intel.com>
> > > +	/* for (c) case */
> > > +	ptr = glMapBufferRange(target, 0, 10, GL_MAP_READ_BIT |
> > > +					      GL_MAP_INVALIDATE_RANGE_BIT |
> > > +					      GL_MAP_INVALIDATE_BUFFER_BIT |
> > > +					      GL_MAP_UNSYNCHRONIZED_BIT);
> > > +	piglit_check_gl_error(GL_INVALID_OPERATION, PIGLIT_FAIL);
> > 
> > I think this should be broken out to test each bit individually with
> > READ, ie:
> > +	ptr = glMapBufferRange(target, 0, 10, GL_MAP_READ_BIT |
> > +					      GL_MAP_UNSYNCHRONIZED_BIT);
> > +	piglit_check_gl_error(GL_INVALID_OPERATION, PIGLIT_FAIL);
> > 
> > +	ptr = glMapBufferRange(target, 0, 10, GL_MAP_READ_BIT |
> > + 					      GL_MAP_INVALIDATE_RANGE_BIT);
> > +	piglit_check_gl_error(GL_INVALID_OPERATION, PIGLIT_FAIL);
> > 
> > +	ptr = glMapBufferRange(target, 0, 10, GL_MAP_READ_BIT |
> > + 					      GL_MAP_INVALIDATE_BUFFER_BIT);
> > +	piglit_check_gl_error(GL_INVALID_OPERATION, PIGLIT_FAIL);
> > 
> > If you do that, you have my r-b
> > Ben
> 
> I pushed this with my changes. The following occurs:

Thanks.

> Unexpected GL error: GL_INVALID_OPERATION 0x502
> Expected GL error: GL_INVALID_VALUE 0x501
> PIGLIT: {'result': 'fail' }
> 
> Since I don't know mesa very well, I'm procrastinating fixing this. It could be a bug in 
> my changes as well, the original test did not fail.
> 
> Ben


More information about the Piglit mailing list