diff options
author | Jason Ekstrand <[email protected]> | 2017-08-02 11:07:36 -0700 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2017-08-11 20:57:36 +0100 |
commit | ac04187e3389b0202fbfe92ba26ef32878542353 (patch) | |
tree | c37f86708b9fc4b99f554cce1617ae207aacc4dc | |
parent | b1514579c2a1325db0e10f685ae63ba462aacde6 (diff) |
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 <[email protected]>
Cc: "17.2" <[email protected]>
(cherry picked from commit 8e5808fc0c9d9da19a0c7f683c156386d4648842)
[Emil Velikov: resolve trivial conflicts]
Signed-off-by: Emil Velikov <[email protected]>
Conflicts:
src/mesa/drivers/dri/i965/intel_mipmap_tree.c
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c index ed7cb8e2152..877ef79b0fe 100644 --- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c +++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c @@ -847,9 +847,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; } @@ -979,11 +985,6 @@ intel_miptree_create_for_dri_image(struct brw_context *brw, } } - if (!intel_miptree_alloc_aux(brw, mt)) { - intel_miptree_release(&mt); - return NULL; - } - return mt; } |