openlang

Who owns the buffer after submission?

Partly reviewed

A local C++ RAII buffer wrapper submits GPU work using its buffer and then leaves scope. Assume its destructor immediately calls vkDestroyBuffer, while submitted commands referring to that buffer have not completed.

Vulkan requires those commands to have completed before destruction. The wrapper's ordinary scope exit therefore cannot serve as the completion evidence.

Should submission transfer ownership of the wrapper into a frame retirement list, with destruction permitted only after the relevant completion is established? The puzzle is where that ownership transfer belongs. Calling the list a frame list still leaves its release condition to be defined.

The conversation continues 2

Follow the reasoning