mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 13:48:06 +02:00
vulkan/util: Use util_bitcount
__builtin_popcount is not available on all compilers. Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com> Reviewed-by: Jesse Natalie <jenatali@microsoft.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10159>
This commit is contained in:
parent
80b96a2158
commit
d32512effc
1 changed files with 1 additions and 1 deletions
|
|
@ -245,7 +245,7 @@ struct vk_pipeline_cache_header {
|
|||
static inline gl_shader_stage
|
||||
vk_to_mesa_shader_stage(VkShaderStageFlagBits vk_stage)
|
||||
{
|
||||
assert(__builtin_popcount((uint32_t) vk_stage) == 1);
|
||||
assert(util_bitcount((uint32_t) vk_stage) == 1);
|
||||
return (gl_shader_stage) (ffs((uint32_t) vk_stage) - 1);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue