anv: fix build errors on android
authorTapani Pälli <tapani.palli@intel.com>
Thu, 31 Aug 2017 05:52:27 +0000 (08:52 +0300)
committerTapani Pälli <tapani.palli@intel.com>
Thu, 31 Aug 2017 15:05:50 +0000 (18:05 +0300)
error: incompatible pointer to integer conversion initializing 'VkFence'
   (aka 'unsigned long long') with an expression of type 'void *' [-Werror,-Wint-conversion]

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/intel/vulkan/anv_queue.c

index 429bac9739eaeba164cdb8534e01b47d0bb0d047..21ca66757e6e8e736fd766b90669ffb9d6815cd5 100644 (file)
@@ -169,7 +169,7 @@ VkResult anv_QueueSubmit(
 
    for (uint32_t i = 0; i < submitCount; i++) {
       /* Fence for this submit.  NULL for all but the last one */
-      VkFence submit_fence = (i == submitCount - 1) ? fence : NULL;
+      VkFence submit_fence = (i == submitCount - 1) ? fence : VK_NULL_HANDLE;
 
       if (pSubmits[i].commandBufferCount == 0) {
          /* If we don't have any command buffers, we need to submit a dummy
@@ -197,7 +197,8 @@ VkResult anv_QueueSubmit(
 
          /* Fence for this execbuf.  NULL for all but the last one */
          VkFence execbuf_fence =
-            (j == pSubmits[i].commandBufferCount - 1) ? submit_fence : NULL;
+            (j == pSubmits[i].commandBufferCount - 1) ?
+            submit_fence : VK_NULL_HANDLE;
 
          const VkSemaphore *in_semaphores = NULL, *out_semaphores = NULL;
          uint32_t num_in_semaphores = 0, num_out_semaphores = 0;