i965: Fix offset-aligned-to-tile test in dma_buf import.
authorEric Anholt <eric@anholt.net>
Fri, 25 Apr 2014 18:17:41 +0000 (11:17 -0700)
committerEric Anholt <eric@anholt.net>
Thu, 1 May 2014 22:12:26 +0000 (15:12 -0700)
v1 of the patch got pushed, insted of the v2 that I had reviewed.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
src/mesa/drivers/dri/i965/intel_screen.c

index 4e1747f476f370e50cf8374cfc550cb5f7b96efe..0a82f1fa736521e1057f3e3603137fae4fe755e7 100644 (file)
@@ -637,7 +637,6 @@ intel_create_image_from_fds(__DRIscreen *screen,
 {
    struct intel_screen *intelScreen = screen->driverPrivate;
    struct intel_image_format *f;
-   uint32_t mask_x, mask_y;
    __DRIimage *image;
    int i, index;
 
@@ -673,8 +672,7 @@ intel_create_image_from_fds(__DRIscreen *screen,
 
    if (f->nplanes == 1) {
       image->offset = image->offsets[0];
-      intel_region_get_tile_masks(image->region, &mask_x, &mask_y, false);
-      if (image->offset & mask_x)
+      if (image->region->tiling != I915_TILING_NONE && (image->offset & 0xfff))
          _mesa_warning(NULL,
                        "intel_create_image_from_fds: offset not on tile boundary");
    }