mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-03 22:20:09 +01:00
mesa: Avoid flagging _NEW_VIEWPORT on redundant viewport updates.
Cuts the number of i965 color calculator viewport uploads by 100x (11017983 -> 113385) in 'x11perf -gc' with Glamor in Xephyr. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
This commit is contained in:
parent
0a1730200e
commit
95073a2dca
1 changed files with 6 additions and 0 deletions
|
|
@ -58,6 +58,12 @@ set_viewport_no_notify(struct gl_context *ctx, unsigned idx,
|
|||
ctx->Const.ViewportBounds.Min, ctx->Const.ViewportBounds.Max);
|
||||
}
|
||||
|
||||
if (ctx->ViewportArray[idx].X == x &&
|
||||
ctx->ViewportArray[idx].Width == width &&
|
||||
ctx->ViewportArray[idx].Y == y &&
|
||||
ctx->ViewportArray[idx].Height == height)
|
||||
return;
|
||||
|
||||
ctx->ViewportArray[idx].X = x;
|
||||
ctx->ViewportArray[idx].Width = width;
|
||||
ctx->ViewportArray[idx].Y = y;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue