anv: finish the binding_table_pool on destroyDevice when use_softpin
authorJose Maria Casanova Crespo <jmcasanova@igalia.com>
Thu, 28 Jun 2018 13:36:12 +0000 (15:36 +0200)
committerJose Maria Casanova Crespo <jmcasanova@igalia.com>
Fri, 29 Jun 2018 19:49:31 +0000 (21:49 +0200)
commita99c9e63a07477634ab73945e5da5b9f580e5828
treeb144a3bfba18487fa7aef386278c1c43aa9cb3ac
parentea8b55b49f2a2dd155fc0acb2fdd92795d5c548f
anv: finish the binding_table_pool on destroyDevice when use_softpin

Running VK-CTS in batch execution mode was raising the
VK_ERROR_INITIALIZATION_FAILED error in multiple tests. But when the
same failing tests were run isolated they always passed.

createDevice and destroyDevice were called before and after every
tests. Because the binding_table_pool was never closed, we reached the
maximum number of open file descriptors (ulimit -n) and when that
happened every call to createDevice implied a
VK_ERROR_INITIALIZATION_FAILED error.

Fixes: c7db0ed4e94dce563d722e1b098684fbd7315d51
      ("anv: Use a separate pool for binding tables when soft pinning")

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/intel/vulkan/anv_device.c