From ca99fe8a603b08883493c786037ca872c00df145 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Fri, 31 Jan 2020 20:32:05 -0500 Subject: [PATCH] vbo: add/update unlikely statements in ATTR_UNION MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reviewed-by: Mathias Fröhlich Part-of: --- src/mesa/vbo/vbo_exec_api.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mesa/vbo/vbo_exec_api.c b/src/mesa/vbo/vbo_exec_api.c index a9a20ed66a5..597f07c0212 100644 --- a/src/mesa/vbo/vbo_exec_api.c +++ b/src/mesa/vbo/vbo_exec_api.c @@ -481,8 +481,8 @@ do { \ assert(sz == 1 || sz == 2); \ \ /* check if attribute size or type is changing */ \ - if (unlikely(exec->vtx.attr[A].active_size != N * sz) || \ - unlikely(exec->vtx.attr[A].type != T)) { \ + if (unlikely(exec->vtx.attr[A].active_size != N * sz || \ + exec->vtx.attr[A].type != T)) { \ vbo_exec_fixup_vertex(ctx, A, N * sz, T); \ } \ \ @@ -531,7 +531,7 @@ do { \ /* Current.Attrib[VBO_ATTRIB_POS] is never used. */ \ ctx->Driver.NeedFlush |= FLUSH_STORED_VERTICES; \ \ - if (++exec->vtx.vert_count >= exec->vtx.max_vert) \ + if (unlikely(++exec->vtx.vert_count >= exec->vtx.max_vert)) \ vbo_exec_vtx_wrap(exec); \ } else { \ /* we now have accumulated per-vertex attributes */ \ -- 2.30.2