[Mesa-dev] [v2 39/39] i965/miptree: Represent y-tiled stencil copies with isl
Topi Pohjolainen
topi.pohjolainen at gmail.com
Wed May 3 09:22:52 UTC 2017
Signed-off-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
---
src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 22 +++++++++-------------
1 file changed, 9 insertions(+), 13 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
index febe880..6280ec4 100644
--- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
@@ -2286,11 +2286,8 @@ intel_update_r8stencil(struct brw_context *brw,
assert(src->surf.size > 0);
if (!mt->r8stencil_mt) {
- const uint32_t r8stencil_flags =
- MIPTREE_LAYOUT_ACCELERATED_UPLOAD | MIPTREE_LAYOUT_TILING_Y |
- MIPTREE_LAYOUT_DISABLE_AUX;
assert(brw->gen > 6); /* Handle MIPTREE_LAYOUT_FORCE_ALL_SLICE_AT_LOD */
- mt->r8stencil_mt = intel_miptree_create(
+ mt->r8stencil_mt = make_surface(
brw,
src->target,
MESA_FORMAT_R_UINT8,
@@ -2301,7 +2298,9 @@ intel_update_r8stencil(struct brw_context *brw,
src->surf.logical_level0_px.depth :
src->surf.logical_level0_px.array_len,
src->surf.samples,
- r8stencil_flags);
+ ISL_TILING_Y0,
+ ISL_SURF_USAGE_TEXTURE_BIT,
+ BO_ALLOC_FOR_RENDER);
assert(mt->r8stencil_mt);
}
@@ -2312,16 +2311,11 @@ intel_update_r8stencil(struct brw_context *brw,
minify(src->surf.logical_level0_px.depth, level) :
src->surf.logical_level0_px.array_len;
- const int layers_per_blit =
- (dst->msaa_layout == INTEL_MSAA_LAYOUT_UMS ||
- dst->msaa_layout == INTEL_MSAA_LAYOUT_CMS) ?
- dst->num_samples : 1;
-
for (unsigned layer = 0; layer < depth; layer++) {
brw_blorp_blit_miptrees(brw,
src, level, layer,
src->format, SWIZZLE_X,
- dst, level, layers_per_blit * layer,
+ dst, level, layer,
MESA_FORMAT_R_UNORM8,
0, 0,
minify(src->surf.logical_level0_px.width,
@@ -2329,8 +2323,10 @@ intel_update_r8stencil(struct brw_context *brw,
minify(src->surf.logical_level0_px.height,
level),
0, 0,
- minify(dst->logical_width0, level),
- minify(dst->logical_height0, level),
+ minify(dst->surf.logical_level0_px.width,
+ level),
+ minify(dst->surf.logical_level0_px.height,
+ level),
GL_NEAREST, false, false /*mirror x, y*/,
false, false /* decode/encode srgb */);
}
--
2.9.3
More information about the mesa-dev
mailing list