this cuts cpu usage by ~2% in sourcemark due to not reallocating the array
on every draw
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11499>
void
zink_fb_clear_reset(struct zink_context *ctx, unsigned i)
{
- util_dynarray_fini(&ctx->fb_clears[i].clears);
+ util_dynarray_clear(&ctx->fb_clears[i].clears);
if (i == PIPE_MAX_COLOR_BUFS) {
ctx->clears_enabled &= ~PIPE_CLEAR_DEPTHSTENCIL;
ctx->rp_clears_enabled &= ~PIPE_CLEAR_DEPTHSTENCIL;