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

Ben Widawsky ben at bwidawsk.net
Mon Sep 26 22:30:23 PDT 2011


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


More information about the Piglit mailing list