mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 17:30:12 +01:00
nir/validate: Use unlikely for validate_assert
No apparent performance difference, but documents the intention. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com> Reviewed-by: Rhys Perry <pendingchaos02@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26084>
This commit is contained in:
parent
e9d185dccf
commit
d2b1e6bed0
1 changed files with 1 additions and 1 deletions
|
|
@ -112,7 +112,7 @@ static bool
|
|||
validate_assert_impl(validate_state *state, bool cond, const char *str,
|
||||
const char *file, unsigned line)
|
||||
{
|
||||
if (!cond)
|
||||
if (unlikely(!cond))
|
||||
log_error(state, str, file, line);
|
||||
return cond;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue