浏览代码

i965/miptree: Move CCS allocation into create_for_dri_image

Any form of CCS on gen9+ only works on Y-tiled images.  The only caller
of create_for_bo which uses Y-tiled BOs is create_for_dri_image.

Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Chad Versace <chadversary@chromium.org>
tags/17.2-branchpoint
Jason Ekstrand 8 年前
父节点
当前提交
06c95f1282
共有 1 个文件被更改,包括 12 次插入13 次删除
  1. 12
    13
      src/mesa/drivers/dri/i965/intel_mipmap_tree.c

+ 12
- 13
src/mesa/drivers/dri/i965/intel_mipmap_tree.c 查看文件

@@ -979,21 +979,9 @@ intel_miptree_create_for_bo(struct brw_context *brw,
mt->offset = offset;
mt->tiling = tiling;

if (!(layout_flags & MIPTREE_LAYOUT_DISABLE_AUX)) {
if (!(layout_flags & MIPTREE_LAYOUT_DISABLE_AUX))
intel_miptree_choose_aux_usage(brw, mt);

/* Since CCS_E can compress more than just clear color, we create the
* CCS for it up-front. For CCS_D which only compresses clears, we
* create the CCS on-demand when a clear occurs that wants one.
*/
if (mt->aux_usage == ISL_AUX_USAGE_CCS_E) {
if (!intel_miptree_alloc_ccs(brw, mt)) {
intel_miptree_release(&mt);
return NULL;
}
}
}

return mt;
}

@@ -1129,6 +1117,17 @@ intel_miptree_create_for_dri_image(struct brw_context *brw,
}
}

/* Since CCS_E can compress more than just clear color, we create the CCS
* for it up-front. For CCS_D which only compresses clears, we create the
* CCS on-demand when a clear occurs that wants one.
*/
if (mt->aux_usage == ISL_AUX_USAGE_CCS_E) {
if (!intel_miptree_alloc_ccs(brw, mt)) {
intel_miptree_release(&mt);
return NULL;
}
}

return mt;
}


正在加载...
取消
保存