anv: initialise and increment send_sbc
authorDave Airlie <airlied@redhat.com>
Mon, 29 Aug 2016 23:46:29 +0000 (09:46 +1000)
committerDave Airlie <airlied@redhat.com>
Thu, 13 Oct 2016 18:45:00 +0000 (04:45 +1000)
At least set this to not be uninitialised memory.

Cc: "12.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/intel/vulkan/anv_wsi_x11.c

index 25c585f22c2ce6d8116bf7dd968d5f421ecd8498..010c86c4f262046cc8c4f19986ec0c6f8d9e6006 100644 (file)
@@ -611,6 +611,7 @@ x11_queue_present(struct anv_swapchain *anv_chain,
 
    xshmfence_reset(image->shm_fence);
 
+   ++chain->send_sbc;
    xcb_void_cookie_t cookie =
       xcb_present_pixmap(chain->conn,
                          chain->window,
@@ -843,6 +844,7 @@ x11_surface_create_swapchain(VkIcdSurfaceBase *icd_surface,
    chain->window = x11_surface_get_window(icd_surface);
    chain->extent = pCreateInfo->imageExtent;
    chain->image_count = num_images;
+   chain->send_sbc = 0;
 
    chain->event_id = xcb_generate_id(chain->conn);
    xcb_present_select_input(chain->conn, chain->event_id, chain->window,