From 5b84226c31e941219422f6d60c31524081b7a188 Mon Sep 17 00:00:00 2001 From: Courtney Goeltzenleuchter Date: Wed, 13 Nov 2013 16:24:56 -0700 Subject: 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 Signed-off-by: Ian Romanick Reviewed-by: Kenneth Graunke --- src/mesa/state_tracker/st_atom_viewport.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/mesa/state_tracker') 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; -- cgit v1.2.3