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>
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;