[Piglit] [PATCH 3/6] Tidy glsl-arb-fragment-coord-conventions
Paul Berry
stereotype441 at gmail.com
Sun Aug 26 12:33:35 PDT 2012
On 25 August 2012 01:12, Chris Forbes <chrisf at ijw.co.nz> wrote:
>
> Signed-off-by: Chris Forbes <chrisf at ijw.co.nz>
>
Functionally I'm fine with this patch. But it's hard to follow the diff
because the patch contains both whitespace changes (fixing up indentation)
and non-whitespace changes (changing the if test to a call to
piglit_require_gl_version()). I would recommend separating into two
patches so that the diffs are easier to follow. Also, it would be nice to
put the indentation fixup before patch 2/6, so that when patch 2/6 modifies
the same file, it doesn't appear to be introducing indentation problems.
> ---
> tests/shaders/glsl-arb-fragment-coord-conventions.c | 19
> +++++++------------
> 1 file changed, 7 insertions(+), 12 deletions(-)
>
> diff --git a/tests/shaders/glsl-arb-fragment-coord-conventions.c
> b/tests/shaders/glsl-arb-fragment-coord-conventions.c
> index 3dbb81f..fd1a683 100644
> --- a/tests/shaders/glsl-arb-fragment-coord-conventions.c
> +++ b/tests/shaders/glsl-arb-fragment-coord-conventions.c
> @@ -217,19 +217,14 @@ static void key_func(unsigned char key, int x, int y)
> piglit_escape_exit_key(key, x, y);
> }
>
> -void
> -piglit_init(int argc, char **argv)
> +void piglit_init(int argc, char **argv)
> {
> - if (piglit_get_gl_version() < 20) {
> - printf("Requires OpenGL 2.0\n");
> - piglit_report_result(PIGLIT_SKIP);
> - }
> -
> - piglit_require_extension("GL_ARB_fragment_coord_conventions");
> + piglit_require_gl_version(20);
>
> - if (!piglit_automatic) {
> - printf("Press t to switch between subtests.\n");
> - glutKeyboardFunc(key_func);
> - }
> + piglit_require_extension("GL_ARB_fragment_coord_conventions");
>
> + if (!piglit_automatic) {
> + printf("Press t to switch between subtests.\n");
> + glutKeyboardFunc(key_func);
> + }
> }
> --
> 1.7.12
>
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20120826/43f330e1/attachment.html>
More information about the Piglit
mailing list