diff options
author | Marek Olšák <[email protected]> | 2017-06-09 22:19:33 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-06-22 01:51:02 +0200 |
commit | 585c5cf8a514783d9ed31dba3aa432797dd5f0e8 (patch) | |
tree | 498d2a9bf82c35ab7caf86fe09ab9b8a97fc0ecf /src/mesa/drivers/x11 | |
parent | ab784e0feeaa6af46afc5ee6ce3527324de29dea (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/x11')
-rw-r--r-- | src/mesa/drivers/x11/xm_dd.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/drivers/x11/xm_dd.c b/src/mesa/drivers/x11/xm_dd.c index 61aa6c88aa3..27534da60c2 100644 --- a/src/mesa/drivers/x11/xm_dd.c +++ b/src/mesa/drivers/x11/xm_dd.c @@ -684,6 +684,9 @@ xmesa_update_state(struct gl_context *ctx) GLbitfield new_state = ctx->NewState; const XMesaContext xmesa = XMESA_CONTEXT(ctx); + if (new_state & (_NEW_SCISSOR | _NEW_BUFFERS | _NEW_VIEWPORT)) + _mesa_update_draw_buffer_bounds(ctx, ctx->DrawBuffer); + /* Propagate statechange information to swrast and swrast_setup * modules. The X11 driver has no internal GL-dependent state. */ |