Skip to content

vulkan/wsi/x11: Use atomic_int with sent_image_count

Without this being atomically incremented and decremented, I observed this assert triggering in debug builds:

src/vulkan/wsi/wsi_common_x11.c:x11_present_to_x11_dri3():

assert(chain->sent_image_count <= chain->base.image_count);

I think this was happening since,

src/vulkan/wsi/wsi_common_x11.c:x11_handle_dri3_present_event()

which decrements chain->sent_image_count may be run in a separate thread.

Merge request reports