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

Ben Widawsky ben at bwidawsk.net
Tue Oct 4 22:28:20 PDT 2011


On Tue, 4 Oct 2011 21:25:11 -0700
Ben Widawsky <ben at bwidawsk.net> 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:
> 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

Never mind. Update mesa and all is well. Kudos to someoe (probably
Yuanhan) for fixing it.


More information about the Piglit mailing list