aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri
diff options
context:
space:
mode:
authorChad Versace <[email protected]>2017-01-04 12:33:56 -0800
committerChad Versace <[email protected]>2017-01-19 13:47:57 -0800
commitde0b0a3a9cfd25ac5082223322002710a23da8ab (patch)
treea5fab5a4caa1db5fec89c72d6acc2a8bc4f7106c /src/mesa/drivers/dri
parente0674e740bf84085dec898ffd87bdeb2027e620f (diff)
i965: Delete pending CCS and HiZ ops in intel_miptree_make_shareable()
Fixes crash in piglit `egl_khr_gl_renderbuffer_image-clear-shared-image GL_DEPTH_COMPONENT24` on Skylake. The crash happened because blorp attempted to execute a pending hiz clear after the hiz buffer was deleted. Deleting the pending hiz ops when the hiz buffer gets deleted fixes the crash. For good measure, this patch also deletes all pending CCS/MCS ops when the CCS/MCS buffer gets deleted. I'm now aware of any bugs caused by the dangling ops, but deleting them is clearly the right thing to do. Cc: Ben Widawsky <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99265
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r--src/mesa/drivers/dri/i965/intel_mipmap_tree.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
index 25f8f391456..ed514239e21 100644
--- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
@@ -2338,6 +2338,12 @@ intel_miptree_make_shareable(struct brw_context *brw,
drm_intel_bo_unreference(mt->mcs_buf->bo);
free(mt->mcs_buf);
mt->mcs_buf = NULL;
+
+ /* Any pending MCS/CCS operations are no longer needed. Trying to
+ * execute any will likely crash due to the missing aux buffer. So let's
+ * delete all pending ops.
+ */
+ exec_list_make_empty(&mt->color_resolve_map);
}
if (mt->hiz_buf) {
@@ -2345,6 +2351,16 @@ intel_miptree_make_shareable(struct brw_context *brw,
intel_miptree_all_slices_resolve_depth(brw, mt);
intel_miptree_hiz_buffer_free(mt->hiz_buf);
mt->hiz_buf = NULL;
+
+ for (uint32_t l = mt->first_level; l <= mt->last_level; ++l) {
+ mt->level[l].has_hiz = false;
+ }
+
+ /* Any pending HiZ operations are no longer needed. Trying to execute
+ * any will likely crash due to the missing aux buffer. So let's delete
+ * all pending ops.
+ */
+ exec_list_make_empty(&mt->hiz_map);
}
}