- /* _NEW_VIEWPORT
- */
- GLfloat x = ctx->Viewport.X;
- GLfloat y = ctx->Viewport.Y;
- GLfloat z = ctx->Viewport.Near;
- GLfloat half_width = ctx->Viewport.Width / 2.0;
- GLfloat half_height = ctx->Viewport.Height / 2.0;
- GLfloat half_depth = (ctx->Viewport.Far - ctx->Viewport.Near) / 2.0;
-
- struct softpipe_viewport vp;
-
- vp.scale[0] = half_width;
- vp.scale[1] = half_height * yScale;
- vp.scale[2] = half_depth;
- vp.scale[3] = 1.0;
+ float scale[3], translate[3];
+ _mesa_get_viewport_xform(ctx, i, scale, translate);