anv: Add FIXME for vkResetCommandPool
authorChad Versace <chad.versace@intel.com>
Thu, 14 Jan 2016 20:58:46 +0000 (12:58 -0800)
committerChad Versace <chad.versace@intel.com>
Thu, 14 Jan 2016 21:14:40 +0000 (13:14 -0800)
vkResetCommandPool currently destroys its command buffers. The Vulkan
1.0 spec requires that it only reset them:

    Resetting a command pool recycles all of the resources from all of
    the command buffers allocated from the command pool back to the
    command pool. All command buffers that have been allocated from the
    command pool are put in the initial state.

src/vulkan/anv_cmd_buffer.c

index 8cf4dc7202cee8401c99d7751aae5d23a03f3450..a888a5427519fc2c542591a03260eec987dd2b29 100644 (file)
@@ -1074,6 +1074,14 @@ VkResult anv_ResetCommandPool(
 {
    ANV_FROM_HANDLE(anv_cmd_pool, pool, commandPool);
 
+   /* FIXME: vkResetCommandPool must not destroy its command buffers. The
+    * Vulkan 1.0 spec requires that it only reset them:
+    *
+    *    Resetting a command pool recycles all of the resources from all of
+    *    the command buffers allocated from the command pool back to the
+    *    command pool. All command buffers that have been allocated from the
+    *    command pool are put in the initial state.
+    */
    list_for_each_entry_safe(struct anv_cmd_buffer, cmd_buffer,
                             &pool->cmd_buffers, pool_link) {
       anv_cmd_buffer_destroy(cmd_buffer);