summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/viewport.c
diff options
context:
space:
mode:
authorMathias Fröhlich <Mathias.Froehlich@gmx.net>2014-10-25 10:17:04 +0200
committerMathias Fröhlich <Mathias.Froehlich@gmx.net>2014-10-30 07:52:00 +0100
commit2c2ada67206326911a36368015b9501a023bbac8 (patch)
treeb14341643a611d297f1c94f51a72fd81ef540911 /src/mesa/main/viewport.c
parent600066af93fe60abbfff5be82527b529e1e44916 (diff)
downloadexternal_mesa3d-2c2ada67206326911a36368015b9501a023bbac8.zip
external_mesa3d-2c2ada67206326911a36368015b9501a023bbac8.tar.gz
external_mesa3d-2c2ada67206326911a36368015b9501a023bbac8.tar.bz2
mesa/gallium: Signal _NEW_TRANSFORM from glClipControl.
This removes the need for the gallium rasterizer state to listen to viewport changes. Thanks to Marek Olšák <maraeo@gmail.com>. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Signed-off-by: Mathias Froehlich <Mathias.Froehlich@web.de>
Diffstat (limited to 'src/mesa/main/viewport.c')
-rw-r--r--src/mesa/main/viewport.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/mesa/main/viewport.c b/src/mesa/main/viewport.c
index d6a9e29..0adce9c 100644
--- a/src/mesa/main/viewport.c
+++ b/src/mesa/main/viewport.c
@@ -459,15 +459,14 @@ _mesa_ClipControl(GLenum origin, GLenum depth)
ctx->Transform.ClipDepthMode == depth)
return;
- FLUSH_VERTICES(ctx, 0);
+ /* Affects transform state and the viewport transform */
+ FLUSH_VERTICES(ctx, _NEW_TRANSFORM | _NEW_VIEWPORT);
if (ctx->Transform.ClipOrigin != origin) {
ctx->Transform.ClipOrigin = origin;
/* Affects the winding order of the front face. */
ctx->NewState |= _NEW_POLYGON;
- /* Affects the y component of the viewport transform. */
- ctx->NewState |= _NEW_VIEWPORT;
if (ctx->Driver.FrontFace)
ctx->Driver.FrontFace(ctx, ctx->Polygon.FrontFace);
@@ -476,9 +475,6 @@ _mesa_ClipControl(GLenum origin, GLenum depth)
if (ctx->Transform.ClipDepthMode != depth) {
ctx->Transform.ClipDepthMode = depth;
- /* Affects the z part of the viewpoint transform. */
- ctx->NewState |= _NEW_VIEWPORT;
-
if (ctx->Driver.DepthRange)
ctx->Driver.DepthRange(ctx);
}