[igt-dev] [PATCH i-g-t 10/17] Add test where both src and dest are protected

Teres Alexis, Alan Previn alan.previn.teres.alexis at intel.com
Sat Jun 5 01:38:15 UTC 2021


On Fri, 2021-06-04 at 09:31 -0400, Rodrigo Vivi wrote:
> On Tue, May 18, 2021 at 03:33:37AM -0700, Alan Previn wrote:
> > -static void assert_bo_content_check(int i915, uint32_t bo, int
> > compare_op,
> > -				    uint32_t size, uint32_t color)
> > +static void assert_bo_content_check(int i915, uint32_t bo, int
> > compare_op, uint32_t size,
> > +				    uint32_t color, uint32_t *auxptr,
> > int auxsize)
> >  {
> > -	uint32_t *ptr, *ptrtmp;
> > +	uint32_t *ptr, *ptrtmp, *auxtmp;
> >  	int loop = 0, num_matches = 0;
> >  	uint32_t value;
> > -	bool op_readible = (compare_op == COMPARE_COLOR_READIBLE);
> > +	bool op_readible = ((compare_op == COMPARE_COLOR_READIBLE) ||
> > +		 (compare_op == COMPARE_BUFFER_READIBLE));
> > +	bool chk_buff = ((compare_op == COMPARE_BUFFER_READIBLE) ||
> > +		 (compare_op == COMPARE_BUFFER_UNREADIBLE));
> 
> why do we need to differentiate between color and buffer if they
> are doing the same thing everywhere?
> 
> well, I'm assuming this is a future case, so anyway:
> 
Yes, depending on the subtest, we're comparing rendered buffers against
a constant color value or we're comparing rendered buffers against an
auxiliary buffer to compare against. In some subtests, they need to
match and in other subtests they need to fail. that's why mirrored op
definitions. Thanks.

> 
> Reviewed-by: Rodrigo Vivi <rodrigo.vivi at intel.com>
> 
> 
> 


More information about the igt-dev mailing list