<div dir="ltr">Reviewed-by: Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Mar 11, 2019 at 12:34 PM Juan A. Suarez Romero <<a href="mailto:jasuarez@igalia.com">jasuarez@igalia.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">As stated in Vulkan spec:<br>
"Resetting a descriptor pool recycles all of the resources from all<br>
of the descriptor sets allocated from the descriptor pool back to<br>
the descriptor pool, and the descriptor sets are implicitly freed."<br>
<br>
This fixes dEQP-VK.api.descriptor_pool.*<br>
<br>
Fixes: 14f6275c92f1 ("anv/descriptor_set: add reference counting for descriptor set layouts")<br>
CC: Tapani Pälli <<a href="mailto:tapani.palli@intel.com" target="_blank">tapani.palli@intel.com</a>><br>
CC: Lionel Landwerlin <<a href="mailto:lionel.g.landwerlin@intel.com" target="_blank">lionel.g.landwerlin@intel.com</a>><br>
CC: Jason Ekstrand <<a href="mailto:jason@jlekstrand.net" target="_blank">jason@jlekstrand.net</a>><br>
---<br>
src/intel/vulkan/anv_descriptor_set.c | 6 ++++++<br>
1 file changed, 6 insertions(+)<br>
<br>
diff --git a/src/intel/vulkan/anv_descriptor_set.c b/src/intel/vulkan/anv_descriptor_set.c<br>
index f293cf469ee..f34a44aefd7 100644<br>
--- a/src/intel/vulkan/anv_descriptor_set.c<br>
+++ b/src/intel/vulkan/anv_descriptor_set.c<br>
@@ -636,6 +636,12 @@ VkResult anv_ResetDescriptorPool(<br>
}<br>
<br>
anv_state_stream_finish(&pool->surface_state_stream);<br>
+<br>
+ list_for_each_entry_safe(struct anv_descriptor_set, set,<br>
+ &pool->desc_sets, pool_link) {<br>
+ anv_descriptor_set_destroy(device, pool, set);<br>
+ }<br>
+<br>
anv_state_stream_init(&pool->surface_state_stream,<br>
&device->surface_state_pool, 4096);<br>
pool->surface_state_free_list = NULL;<br>
-- <br>
2.20.1<br>
<br>
</blockquote></div>