summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2017-06-10 02:28:05 +0200
committerMarek Olšák <[email protected]>2017-06-22 01:51:02 +0200
commitc8363eb0276c863100a457b18fee5ef900cf6f74 (patch)
tree50b076cb9decbc9494148c1fbb3952ca8ae23a0f /src/mesa/main
parent86840d3f08ec1f3cf6f02979ef1875087aef2724 (diff)
mesa: flush vertices before changing viewports
Cc: 17.1 <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/viewport.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mesa/main/viewport.c b/src/mesa/main/viewport.c
index bd580446f76..6d3e57654cc 100644
--- a/src/mesa/main/viewport.c
+++ b/src/mesa/main/viewport.c
@@ -40,6 +40,8 @@ set_viewport_no_notify(struct gl_context *ctx, unsigned idx,
GLfloat x, GLfloat y,
GLfloat width, GLfloat height)
{
+ FLUSH_VERTICES(ctx, _NEW_VIEWPORT);
+
/* clamp width and height to the implementation dependent range */
width = MIN2(width, (GLfloat) ctx->Const.MaxViewportWidth);
height = MIN2(height, (GLfloat) ctx->Const.MaxViewportHeight);
@@ -71,7 +73,6 @@ set_viewport_no_notify(struct gl_context *ctx, unsigned idx,
ctx->ViewportArray[idx].Width = width;
ctx->ViewportArray[idx].Y = y;
ctx->ViewportArray[idx].Height = height;
- ctx->NewState |= _NEW_VIEWPORT;
}
struct gl_viewport_inputs {
@@ -240,9 +241,10 @@ set_depth_range_no_notify(struct gl_context *ctx, unsigned idx,
ctx->ViewportArray[idx].Far == farval)
return;
+ FLUSH_VERTICES(ctx, _NEW_VIEWPORT);
+
ctx->ViewportArray[idx].Near = CLAMP(nearval, 0.0, 1.0);
ctx->ViewportArray[idx].Far = CLAMP(farval, 0.0, 1.0);
- ctx->NewState |= _NEW_VIEWPORT;
}
void