[Piglit] [PATCH 2/2] gles2: new glReadPixels unit test

Chad Versace chad.versace at linux.intel.com
Thu Nov 29 09:34:00 PST 2012


On 11/28/2012 12:13 PM, Eric Anholt wrote:
> Tom Gall <tom.gall at linaro.org> writes:

>> +	/* check that the triangle was rendered correctly */
>> +	for (i=148;i>49;i--) {
>> +		linestart=159;
>> +		lineend=160;
>> +		for(j=linestart;j<=lineend;j++) {
>> +			p888=(pixel_f888 *)(((GLubyte *)buffer)+(((i*WIDTH)+j)*3));
>> +			if (p888->red!=0xff && p888->green!=0x00 && p888->blue!=0x00)
>> +				return PIGLIT_FAIL;
>> +		}
>> +	linestart--;
>> +	lineend++;
>> +	}
> 
> What is up with this triangle probing?  Render nice rectangles for sanity.

Tom, in tests/util/piglit-util-gles.c there are utility functions for drawing
and probing rectangles and pixels. File tests/util/piglit-util-gl.c has a
more extensive set of draw and probe functions, but not all of them have
been ported to gles.



More information about the Piglit mailing list