[Piglit] New case for intel_swap_event

Zhao, Jian J jian.j.zhao at intel.com
Wed Oct 13 02:00:36 PDT 2010


>-----Original Message-----
>From: Ian Romanick [mailto:idr at freedesktop.org]
>Sent: 2010年10月12日 2:05
>To: Zhao, Jian J
>Cc: dri-devel at lists.sourceforge.net; Barnes, Jesse
>Subject: Re: New case for intel_swap_event
>
>-----BEGIN PGP SIGNED MESSAGE-----
>Hash: SHA1
>
>Zhao, Jian J wrote:
>> Hi,
>>
>>  Recently I have made a piglit case that can test the behaviors of
>> buffer swap, they are 1) test whether we can get swap events. 2) verify
>> whether the swap is asynchronous 3) verify the swap frequency of swap
>> interval being 0 is larger than interval being 1. Jesse has helped me
>> have brief look on it and give me some advice. I have modified it. Can
>> you help to add it into piglit tests? Thanks for help and comments!
>
>Please send tests as patches using git-send-email.  This enables people
>to put review comments in-line.
>
> - Fix the comment and license at the top of the file.
>
> - Re-wrap lines to 80 columns.
>
> - Fix broken whitespace usage
>
>   }else{
>
>should be
>
>   } else {
>
>and
>
>   if(foo){
>
>should be
>
>   if (foo) {
>
>etc.
>
> - piglit_report_result already calls exit, so the calls to exit in the
>code after calls to piglit_report_result are not necessary.
>
> - Use the utility routines in piglit-glx-util.c instead of open-coding
>them.

Hi Ian,
I have fixed the comment and license on top of the file, re-wraped lines to 80 columns, fixed the broken white space usage and cleaned some redundant code after calls to piglit_report_result per your kindly guidance. But it seems have some difficulty on your last suggestion that use the utility routines instead of open-coding, because if use the utility routines(some functions in piglit-glx-util.c) there, it will also use piglit-framework.c which will use glut to initialize the program, and I can't get the swap event from glut which only support some events' callback(like mouse, keyboard) that used frequently. Maybe we can use open-coding here? What's your opinion? Thanks! 

Best regards,
Zhao Jian

>-----BEGIN PGP SIGNATURE-----
>Version: GnuPG v1.4.10 (GNU/Linux)
>Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
>iEYEARECAAYFAkyzUcYACgkQX1gOwKyEAw+6zQCgkYPvU/Da9bzczyMxzl5EZ
>x4y
>ougAoJtpcsfVsB7l3jM+HvA+0jeE4opn
>=EiQk
>-----END PGP SIGNATURE-----


More information about the Piglit mailing list