mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 09:08:10 +02:00
vbo: add/update unlikely statements in ATTR_UNION
Reviewed-by: Mathias Fröhlich <mathias.froehlich@web.de> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3766>
This commit is contained in:
parent
a5f72c91e5
commit
ca99fe8a60
1 changed files with 3 additions and 3 deletions
|
|
@ -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 */ \
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue