format << BRW_SURFACE_FORMAT_SHIFT);
/* reloc */
+ assert(mt->offset % mt->cpp == 0);
surf[1] = (intel_renderbuffer_get_tile_offsets(irb, &tile_x, &tile_y) +
- mt->bo->offset64);
+ mt->bo->offset64 + mt->offset);
surf[2] = ((rb->Width - 1) << BRW_SURFACE_WIDTH_SHIFT |
(rb->Height - 1) << BRW_SURFACE_HEIGHT_SHIFT);
SET_FIELD(format, BRW_SURFACE_FORMAT);
/* reloc */
- surf[1] = mt->bo->offset64;
+ assert(mt->offset % mt->cpp == 0);
+ surf[1] = mt->bo->offset64 + mt->offset;
/* In the gen6 PRM Volume 1 Part 1: Graphics Core, Section 7.18.3.7.1
* (Surface Arrays For all surfaces other than separate stencil buffer):
surf[0] |= GEN7_SURFACE_IS_ARRAY;
}
- surf[1] = mt->bo->offset64;
+ assert(mt->offset % mt->cpp == 0);
+ surf[1] = mt->bo->offset64 + mt->offset;
assert(brw->has_surface_tile_offset);
SET_FIELD(HSW_SCS_BLUE, GEN7_SURFACE_SCS_B) |
SET_FIELD(HSW_SCS_ALPHA, GEN7_SURFACE_SCS_A);
- *((uint64_t *) &surf[8]) = mt->bo->offset64; /* reloc */
+ assert(mt->offset % mt->cpp == 0);
+ *((uint64_t *) &surf[8]) = mt->bo->offset64 + mt->offset; /* reloc */
if (aux_mt) {
*((uint64_t *) &surf[10]) = aux_mt->bo->offset64;