mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 11:28:05 +02:00
anv: Use different logic to isolate lowest flag in anv_foreach_vk_stage
Silences many ubsan errors like: src/intel/vulkan/anv_shader_compile.c:609:4: runtime error: shift exponent -1 is negative Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40230>
This commit is contained in:
parent
ea731cda12
commit
4cbf2ee3f0
1 changed files with 2 additions and 1 deletions
|
|
@ -5304,7 +5304,8 @@ struct anv_event {
|
|||
#define anv_foreach_vk_stage(stage, stage_bits) \
|
||||
for (VkShaderStageFlags stage, \
|
||||
__tmp = (stage_bits & ANV_VK_STAGE_MASK); \
|
||||
stage = BITFIELD_BIT(__builtin_ffs(__tmp) - 1), __tmp; \
|
||||
/* See util_bitcount in bitscan.h. */ \
|
||||
stage = __tmp & -__tmp, __tmp; \
|
||||
__tmp &= ~(stage))
|
||||
|
||||
struct anv_shader_upload_params {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue