summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/nouveau
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2017-06-09 22:19:33 +0200
committerMarek Olšák <[email protected]>2017-06-22 01:51:02 +0200
commit585c5cf8a514783d9ed31dba3aa432797dd5f0e8 (patch)
tree498d2a9bf82c35ab7caf86fe09ab9b8a97fc0ecf /src/mesa/drivers/dri/nouveau
parentab784e0feeaa6af46afc5ee6ce3527324de29dea (diff)
mesa: don't update draw buffer bounds in _mesa_update_state
st/mesa doesn't need the draw bounds for draw calls. I've added the call where it's necessary in core Mesa and drivers, but I suspect that most drivers can just move the call to the right places. The core Mesa places aren't hot paths, so the call overhead doesn't matter there. For now, only st/mesa is made such that this function is invoked very rarely. Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/nouveau')
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_state.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_state.c b/src/mesa/drivers/dri/nouveau/nouveau_state.c
index 6d998fca832..1aa26e955bf 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_state.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_state.c
@@ -32,6 +32,7 @@
#include "swrast/swrast.h"
#include "tnl/tnl.h"
#include "util/bitscan.h"
+#include "main/framebuffer.h"
static void
nouveau_alpha_func(struct gl_context *ctx, GLenum func, GLfloat ref)
@@ -456,6 +457,9 @@ nouveau_update_state(struct gl_context *ctx)
GLbitfield new_state = ctx->NewState;
int i;
+ if (new_state & (_NEW_SCISSOR | _NEW_BUFFERS | _NEW_VIEWPORT))
+ _mesa_update_draw_buffer_bounds(ctx, ctx->DrawBuffer);
+
if (new_state & (_NEW_PROJECTION | _NEW_MODELVIEW))
context_dirty(ctx, PROJECTION);