diff options
author | Jason Ekstrand <[email protected]> | 2017-06-16 10:31:31 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2017-07-12 21:15:46 -0700 |
commit | 06c95f1282bcad14f44aff42c21a7ae46b435cf9 (patch) | |
tree | a7cf43e00c125336beb486707db8b589b8fcdb57 /src | |
parent | b3a44ae7a4168677ae855563d80723895e87966b (diff) |
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 <[email protected]>
Reviewed-by: Chad Versace <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 25 |
1 files changed, 12 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 3c37fe3bf09..575f04f8648 100644 --- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c +++ b/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; } |