mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 03:08:05 +02:00
i965/miptree: Call alloc_aux in create_for_bo
Originally, I had moved it to the caller to make some things easier when adding the CCS modifier. However, this broke DRI2 because intel_process_dri2_buffer calls intel_miptree_create_for_bo but never calls intel_miptree_alloc_aux. Also, in hindsight, it should be pretty easy to make the CCS modifier stuff work even if create_for_bo allocates the CCS when DISABLE_AUX is not set. Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Cc: "17.2" <mesa-stable@lists.freedesktop.org>
This commit is contained in:
parent
a5a673dfa7
commit
8e5808fc0c
1 changed files with 7 additions and 6 deletions
|
|
@ -839,9 +839,15 @@ intel_miptree_create_for_bo(struct brw_context *brw,
|
|||
mt->bo = bo;
|
||||
mt->offset = offset;
|
||||
|
||||
if (!(layout_flags & MIPTREE_LAYOUT_DISABLE_AUX))
|
||||
if (!(layout_flags & MIPTREE_LAYOUT_DISABLE_AUX)) {
|
||||
intel_miptree_choose_aux_usage(brw, mt);
|
||||
|
||||
if (!intel_miptree_alloc_aux(brw, mt)) {
|
||||
intel_miptree_release(&mt);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
return mt;
|
||||
}
|
||||
|
||||
|
|
@ -978,11 +984,6 @@ intel_miptree_create_for_dri_image(struct brw_context *brw,
|
|||
if (is_winsys_image)
|
||||
image->bo->cache_coherent = false;
|
||||
|
||||
if (!intel_miptree_alloc_aux(brw, mt)) {
|
||||
intel_miptree_release(&mt);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return mt;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue