anv: Fix anv_descriptor_set reference error on deletion
authorMark Janes <mark.a.janes@intel.com>
Tue, 2 Feb 2016 01:13:02 +0000 (17:13 -0800)
committerMark Janes <mark.a.janes@intel.com>
Tue, 2 Feb 2016 23:28:01 +0000 (15:28 -0800)
commitea8c2d118a8c9645bedc86259ba42968ac27c239
treee26c1e367cfbb367a988a54e6ac078b43374ead7
parent5a06bac4a06cfd4db8cc172083a72795ff5b07d8
anv: Fix anv_descriptor_set reference error on deletion

anv_descriptor_set_destroy uses the descriptor sets's set_layout member
to iterate the set's buffer views.  However, the set_layout reference
may have previously been freed.

On 64 bit builds, this bug generated valgrind errors but did not affect
CTS test results.  On 32 bit builds, it reliably produces assertions and
memory corruption.
src/vulkan/anv_descriptor_set.c
src/vulkan/anv_private.h