anv: fix segfault in anv_BindImageMemory
authorDave Airlie <airlied@redhat.com>
Wed, 23 Nov 2016 06:05:34 +0000 (16:05 +1000)
committerDave Airlie <airlied@redhat.com>
Wed, 23 Nov 2016 06:11:03 +0000 (16:11 +1000)
Since bind image memory started memsetting surfaces, the
device node can't be NULL, since we lookup device->info.has_llc.

Not sure why it ever was NULL before.

Fixes some things on my Ivybridge.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/intel/vulkan/anv_wsi.c

index c504658..669eacc 100644 (file)
@@ -200,7 +200,7 @@ x11_anv_wsi_image_create(VkDevice device_h,
    memory = anv_device_memory_from_handle(memory_h);
    memory->bo.is_winsys_bo = true;
 
-   anv_BindImageMemory(VK_NULL_HANDLE, image_h, memory_h, 0);
+   anv_BindImageMemory(device_h, image_h, memory_h, 0);
 
    struct anv_surface *surface = &image->color_surface;
    assert(surface->isl.tiling == ISL_TILING_X);