i915g: Set total_nblocksy in from_handle
authorJakob Bornecrantz <wallbraker@gmail.com>
Fri, 23 Jul 2010 03:03:29 +0000 (20:03 -0700)
committerJakob Bornecrantz <wallbraker@gmail.com>
Fri, 23 Jul 2010 03:26:35 +0000 (20:26 -0700)
src/gallium/drivers/i915/i915_resource_texture.c

index 825288160cf39867c08ae70895e66c537e9e60cd..752ddaae7b1571719a2e788ab238867ff7cb6548 100644 (file)
@@ -845,6 +845,7 @@ i915_texture_from_handle(struct pipe_screen * screen,
    tex->b.b.screen = screen;
 
    tex->stride = stride;
+   tex->total_nblocksy = align_nblocksy(tex->b.b.format, tex->b.b.height0, 8);
 
    i915_texture_set_level_info(tex, 0, 1);
    i915_texture_set_image_offset(tex, 0, 0, 0, 0);