mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-06 06:40:08 +01:00
graw: Avoid 'near'/'far' variables.
They are defined by windows.h, which got included slightly more frequently than before with u_atomic.h
This commit is contained in:
parent
120426b13d
commit
0806bf8815
8 changed files with 24 additions and 24 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue