Commit 5c680dc0 authored by Sagar Ghuge's avatar Sagar Ghuge
Browse files

intel/blorp: Align 16bpp surfaces to 8x8 while doing HZ_OP on Gen12+



For depth and HZ resolve passes, we need to align surface to 8x8 pixels
on Gen12+, which might improve performance.
Signed-off-by: Sagar Ghuge's avatarSagar Ghuge <sagar.ghuge@intel.com>
Suggested-by: Nanley Chery's avatarNanley Chery <nanley.g.chery@intel.com>
parent 472a20c5
Pipeline #205274 waiting for manual action with stages
......@@ -349,8 +349,27 @@ blorp_hiz_op(struct blorp_batch *batch, struct blorp_surf *surf,
params.depth.view.base_level);
params.y1 = minify(params.depth.surf.logical_level0_px.height,
params.depth.view.base_level);
params.x1 = ALIGN(params.x1, 8);
params.y1 = ALIGN(params.y1, 4);
/* From Bspec 3DSTATE_WM_HZ_OP_BODY -> Clear Rectangle Y Max and Clear
* Rectangle X Max field :
*
* The final X and Y Max values, after LOD adjustment described above,
* have to be manually 8x4 or 8x8 aligned for Depth and HZ Resolve
* passes only.
*
* For multisample set to 1X together with Z format set to 16bpp, need
* to aligned to 8x8 and for rest of the cases it should be aligned to
* 8x4 pixels.
*/
if (batch->blorp->isl_dev->info->gen >= 12 &&
surf->surf->format == ISL_FORMAT_R16_UNORM &&
params.depth.surf.samples == 1) {
params.x1 = ALIGN(params.x1, 8);
params.y1 = ALIGN(params.y1, 8);
} else {
params.x1 = ALIGN(params.x1, 8);
params.y1 = ALIGN(params.y1, 4);
}
if (params.depth.view.base_level == 0) {
/* TODO: What about MSAA? */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment