aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
authorCourtney Goeltzenleuchter <[email protected]>2013-11-13 16:24:56 -0700
committerIan Romanick <[email protected]>2014-01-20 11:31:53 -0800
commit5b84226c31e941219422f6d60c31524081b7a188 (patch)
treeddebed7b00cfdb732f4f252907998eea5c4202cf /src/mesa/state_tracker
parentd4dc359875126c432e46e3d1da8610a066d21302 (diff)
mesa: Converty gl_viewport_attrib::X, ::Y, ::Width, and ::Height to float
v4: Split out from a single megapatch. Suggested by Ken. Also make meta's save_state::ViewportX, ::ViewportY, ::ViewportW, and ::ViewportH to match gl_viewport_attrib. Signed-off-by: Courtney Goeltzenleuchter <[email protected]> Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r--src/mesa/state_tracker/st_atom_viewport.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mesa/state_tracker/st_atom_viewport.c b/src/mesa/state_tracker/st_atom_viewport.c
index 7a1a689b790..a88160fc876 100644
--- a/src/mesa/state_tracker/st_atom_viewport.c
+++ b/src/mesa/state_tracker/st_atom_viewport.c
@@ -62,11 +62,11 @@ update_viewport( struct st_context *st )
/* _NEW_VIEWPORT
*/
{
- GLfloat x = (GLfloat)ctx->Viewport.X;
- GLfloat y = (GLfloat)ctx->Viewport.Y;
+ GLfloat x = ctx->Viewport.X;
+ GLfloat y = ctx->Viewport.Y;
GLfloat z = ctx->Viewport.Near;
- GLfloat half_width = (GLfloat)ctx->Viewport.Width * 0.5f;
- GLfloat half_height = (GLfloat)ctx->Viewport.Height * 0.5f;
+ GLfloat half_width = ctx->Viewport.Width * 0.5f;
+ GLfloat half_height = ctx->Viewport.Height * 0.5f;
GLfloat half_depth = (GLfloat)(ctx->Viewport.Far - ctx->Viewport.Near) * 0.5f;
st->state.viewport.scale[0] = half_width;