i965: Delete pending CCS and HiZ ops in intel_miptree_make_shareable()
authorChad Versace <chadversary@chromium.org>
Wed, 4 Jan 2017 20:33:56 +0000 (12:33 -0800)
committerChad Versace <chadversary@chromium.org>
Thu, 19 Jan 2017 21:47:57 +0000 (13:47 -0800)
commitde0b0a3a9cfd25ac5082223322002710a23da8ab
treea5fab5a4caa1db5fec89c72d6acc2a8bc4f7106c
parente0674e740bf84085dec898ffd87bdeb2027e620f
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 <ben@bwidawsk.net>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99265
src/mesa/drivers/dri/i965/intel_mipmap_tree.c