From 0806bf88158cb3ac865762285f11082114520c48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Fonseca?= Date: Mon, 1 Dec 2014 20:24:06 +0000 Subject: graw: Avoid 'near'/'far' variables. They are defined by windows.h, which got included slightly more frequently than before with u_atomic.h --- src/gallium/tests/graw/fs-test.c | 6 +++--- src/gallium/tests/graw/graw_util.h | 6 +++--- src/gallium/tests/graw/gs-test.c | 6 +++--- src/gallium/tests/graw/quad-sample.c | 6 +++--- src/gallium/tests/graw/shader-leak.c | 6 +++--- src/gallium/tests/graw/tri-gs.c | 6 +++--- src/gallium/tests/graw/tri-instanced.c | 6 +++--- src/gallium/tests/graw/vs-test.c | 6 +++--- 8 files changed, 24 insertions(+), 24 deletions(-) (limited to 'src/gallium/tests') diff --git a/src/gallium/tests/graw/fs-test.c b/src/gallium/tests/graw/fs-test.c index 97306c4..fc5803f 100644 --- a/src/gallium/tests/graw/fs-test.c +++ b/src/gallium/tests/graw/fs-test.c @@ -132,12 +132,12 @@ static void init_fs_constbuf( void ) static void set_viewport( float x, float y, float width, float height, - float near, float far) + float zNear, float zFar) { - float z = far; + float z = zFar; float half_width = (float)width / 2.0f; float half_height = (float)height / 2.0f; - float half_depth = ((float)far - (float)near) / 2.0f; + float half_depth = ((float)zFar - (float)zNear) / 2.0f; struct pipe_viewport_state vp; vp.scale[0] = half_width; diff --git a/src/gallium/tests/graw/graw_util.h b/src/gallium/tests/graw/graw_util.h index 72b6bc6..afcc584 100644 --- a/src/gallium/tests/graw/graw_util.h +++ b/src/gallium/tests/graw/graw_util.h @@ -185,12 +185,12 @@ static INLINE void graw_util_viewport(struct graw_info *info, float x, float y, float width, float height, - float near, float far) + float zNear, float zFar) { - float z = near; + float z = zNear; float half_width = width / 2.0f; float half_height = height / 2.0f; - float half_depth = (far - near) / 2.0f; + float half_depth = (zFar - zNear) / 2.0f; struct pipe_viewport_state vp; vp.scale[0] = half_width; diff --git a/src/gallium/tests/graw/gs-test.c b/src/gallium/tests/graw/gs-test.c index 9200685..b685323 100644 --- a/src/gallium/tests/graw/gs-test.c +++ b/src/gallium/tests/graw/gs-test.c @@ -207,12 +207,12 @@ static void init_fs_constbuf( void ) static void set_viewport( float x, float y, float width, float height, - float near, float far) + float zNear, float zFar) { - float z = far; + float z = zFar; float half_width = (float)width / 2.0f; float half_height = (float)height / 2.0f; - float half_depth = ((float)far - (float)near) / 2.0f; + float half_depth = ((float)zFar - (float)zNear) / 2.0f; struct pipe_viewport_state vp; vp.scale[0] = half_width; diff --git a/src/gallium/tests/graw/quad-sample.c b/src/gallium/tests/graw/quad-sample.c index 787d811..2953fe1 100644 --- a/src/gallium/tests/graw/quad-sample.c +++ b/src/gallium/tests/graw/quad-sample.c @@ -60,12 +60,12 @@ static struct vertex vertices[] = static void set_viewport( float x, float y, float width, float height, - float near, float far) + float zNear, float zFar) { - float z = far; + float z = zFar; float half_width = (float)width / 2.0f; float half_height = (float)height / 2.0f; - float half_depth = ((float)far - (float)near) / 2.0f; + float half_depth = ((float)zFar - (float)zNear) / 2.0f; struct pipe_viewport_state vp; vp.scale[0] = half_width; diff --git a/src/gallium/tests/graw/shader-leak.c b/src/gallium/tests/graw/shader-leak.c index 90704a3..3c585c0 100644 --- a/src/gallium/tests/graw/shader-leak.c +++ b/src/gallium/tests/graw/shader-leak.c @@ -50,12 +50,12 @@ static struct vertex vertices[1] = static void set_viewport( float x, float y, float width, float height, - float near, float far) + float zNear, float zFar) { - float z = far; + float z = zFar; float half_width = (float)width / 2.0f; float half_height = (float)height / 2.0f; - float half_depth = ((float)far - (float)near) / 2.0f; + float half_depth = ((float)zFar - (float)zNear) / 2.0f; struct pipe_viewport_state vp; vp.scale[0] = half_width; diff --git a/src/gallium/tests/graw/tri-gs.c b/src/gallium/tests/graw/tri-gs.c index 7fe340d..5c6f426 100644 --- a/src/gallium/tests/graw/tri-gs.c +++ b/src/gallium/tests/graw/tri-gs.c @@ -51,12 +51,12 @@ static struct vertex vertices[4] = static void set_viewport( float x, float y, float width, float height, - float near, float far) + float zNear, float zFar) { - float z = far; + float z = zFar; float half_width = (float)width / 2.0f; float half_height = (float)height / 2.0f; - float half_depth = ((float)far - (float)near) / 2.0f; + float half_depth = ((float)zFar - (float)zNear) / 2.0f; struct pipe_viewport_state vp; vp.scale[0] = half_width; diff --git a/src/gallium/tests/graw/tri-instanced.c b/src/gallium/tests/graw/tri-instanced.c index 65c5936..a71bf71 100644 --- a/src/gallium/tests/graw/tri-instanced.c +++ b/src/gallium/tests/graw/tri-instanced.c @@ -80,12 +80,12 @@ static ushort indices[3] = { 0, 2, 1 }; static void set_viewport( float x, float y, float width, float height, - float near, float far) + float zNear, float zFar) { - float z = far; + float z = zFar; float half_width = (float)width / 2.0f; float half_height = (float)height / 2.0f; - float half_depth = ((float)far - (float)near) / 2.0f; + float half_depth = ((float)zFar - (float)zNear) / 2.0f; struct pipe_viewport_state vp; vp.scale[0] = half_width; diff --git a/src/gallium/tests/graw/vs-test.c b/src/gallium/tests/graw/vs-test.c index cac432e..5189d81 100644 --- a/src/gallium/tests/graw/vs-test.c +++ b/src/gallium/tests/graw/vs-test.c @@ -118,12 +118,12 @@ static void init_fs_constbuf( void ) static void set_viewport( float x, float y, float width, float height, - float near, float far) + float zNear, float zFar) { - float z = far; + float z = zFar; float half_width = (float)width / 2.0f; float half_height = (float)height / 2.0f; - float half_depth = ((float)far - (float)near) / 2.0f; + float half_depth = ((float)zFar - (float)zNear) / 2.0f; struct pipe_viewport_state vp; vp.scale[0] = half_width; -- cgit v1.1