mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-07 19:30:12 +01:00
vulkan: optimize vk_dynamic_graphics_state_any_dirty
For drivers using the new state tracking, __bitset_test_range can be surprisingly hot because we have a lot of dirty bits and __bitset_test_range has to handle lots of special cases. __bitset_is_empty does not have to worry about those special cases so can be much faster. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com> Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29008>
This commit is contained in:
parent
602c62a273
commit
0549649bcf
1 changed files with 1 additions and 2 deletions
|
|
@ -1187,8 +1187,7 @@ vk_dynamic_graphics_state_clear_dirty(struct vk_dynamic_graphics_state *d)
|
|||
static inline bool
|
||||
vk_dynamic_graphics_state_any_dirty(const struct vk_dynamic_graphics_state *d)
|
||||
{
|
||||
return BITSET_TEST_RANGE(d->dirty,
|
||||
0, MESA_VK_DYNAMIC_GRAPHICS_STATE_ENUM_MAX - 1);
|
||||
return !BITSET_IS_EMPTY(d->dirty);
|
||||
}
|
||||
|
||||
/** Copies all set state from src to dst
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue