anv: fix assert in wsi image code.
authorDave Airlie <airlied@redhat.com>
Tue, 10 Oct 2017 23:45:44 +0000 (09:45 +1000)
committerDave Airlie <airlied@redhat.com>
Tue, 10 Oct 2017 23:52:57 +0000 (09:52 +1000)
This assert was firing just running demos.

Jason said it should be this.

Fixes: 6c7720ed78 (anv/wsi: Allocate enough memory for the entire image)
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/intel/vulkan/anv_wsi.c

index fc0c2889d3d3b68ae043fdca805283f8e3bc6dcd..08d83cd7f7d38e1efa24ac30c0d46cd5c1137fea 100644 (file)
@@ -239,7 +239,7 @@ anv_wsi_image_create(VkDevice device_h,
    memory->bo->flags |= EXEC_OBJECT_WRITE;
 
    anv_BindImageMemory(device_h, image_h, memory_h, 0);
-   assert(image->size == 0);
+   assert(image->planes[0].offset == 0);
 
    struct anv_surface *surface = &image->planes[0].surface;
    assert(surface->isl.tiling == ISL_TILING_X);