[Mesa-dev] [PATCH] anv: initialise and increment send_sbc

Dave Airlie airlied at gmail.com
Mon Aug 29 23:46:59 UTC 2016


From: Dave Airlie <airlied at redhat.com>

At least set this to not be uninitialised memory.

Signed-off-by: Dave Airlie <airlied at redhat.com>
---
 src/intel/vulkan/anv_wsi_x11.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/intel/vulkan/anv_wsi_x11.c b/src/intel/vulkan/anv_wsi_x11.c
index 7c6ef97..7e9ff7d 100644
--- a/src/intel/vulkan/anv_wsi_x11.c
+++ b/src/intel/vulkan/anv_wsi_x11.c
@@ -610,6 +610,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,
@@ -842,6 +843,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,
-- 
2.5.5



More information about the mesa-dev mailing list