} else {
*offset = intel_miptree_get_aligned_offset(mt,
mt->level[lod].level_x,
- mt->level[lod].level_y,
- false);
+ mt->level[lod].level_y);
}
surf->logical_level0_px.width = minify(surf->logical_level0_px.width, lod);
brw->depthstencil.depth_offset =
intel_miptree_get_aligned_offset(depth_mt,
depth_irb->draw_x & ~tile_mask_x,
- depth_irb->draw_y & ~tile_mask_y,
- false);
+ depth_irb->draw_y & ~tile_mask_y);
if (intel_renderbuffer_has_hiz(depth_irb)) {
brw->depthstencil.hiz_offset =
intel_miptree_get_aligned_offset(depth_mt,
depth_irb->draw_x & ~tile_mask_x,
- (depth_irb->draw_y & ~tile_mask_y) / 2,
- false);
+ (depth_irb->draw_y & ~tile_mask_y) / 2);
}
}
if (stencil_irb) {
offset = intel_miptree_get_aligned_offset(
hiz_mt,
hiz_mt->level[lod].level_x,
- hiz_mt->level[lod].level_y,
- false);
+ hiz_mt->level[lod].level_y);
}
BEGIN_BATCH(3);
offset = intel_miptree_get_aligned_offset(
stencil_mt,
stencil_mt->level[lod].level_x,
- stencil_mt->level[lod].level_y,
- false);
+ stencil_mt->level[lod].level_y);
}
}
*/
uint32_t
intel_miptree_get_aligned_offset(const struct intel_mipmap_tree *mt,
- uint32_t x, uint32_t y,
- bool map_stencil_as_y_tiled)
+ uint32_t x, uint32_t y)
{
int cpp = mt->cpp;
uint32_t pitch = mt->pitch;
uint32_t tiling = mt->tiling;
- if (map_stencil_as_y_tiled) {
- tiling = I915_TILING_Y;
-
- /* When mapping a W-tiled stencil buffer as Y-tiled, each 64-high W-tile
- * gets transformed into a 32-high Y-tile. Accordingly, the pitch of
- * the resulting surface is twice the pitch of the original miptree,
- * since each row in the Y-tiled view corresponds to two rows in the
- * actual W-tiled surface. So we need to correct the pitch before
- * computing the offsets.
- */
- pitch *= 2;
- }
-
switch (tiling) {
default:
unreachable("not reached");
*tile_x = x & mask_x;
*tile_y = y & mask_y;
- return intel_miptree_get_aligned_offset(mt, x & ~mask_x, y & ~mask_y, false);
+ return intel_miptree_get_aligned_offset(mt, x & ~mask_x, y & ~mask_y);
}
static void
uint32_t *tile_y);
uint32_t
intel_miptree_get_aligned_offset(const struct intel_mipmap_tree *mt,
- uint32_t x, uint32_t y,
- bool map_stencil_as_y_tiled);
+ uint32_t x, uint32_t y);
void intel_miptree_set_level_info(struct intel_mipmap_tree *mt,
GLuint level,