Some of the vkCmd*
functions specify when some parameters are consumed or not. For example, in the documentation of vkCmdBindDescriptorSets
:
The contents of pDynamicOffsets are consumed immediately during execution of vkCmdBindDescriptorSets.
However most of them do not clarify. Are all parameters consumed during the the vkCmd*
call? For example, in the following code:
void copyHelper() {
VkBufferCopy copy_region = {...};
vkCmdCopyBuffer(cmd_buffer, from_buffer, to_buffer, 1, ©_region);
}
after calling copyHelper()
, copy_region
is not in scope anymore although cmd_buffer
hasn't been submitted yet. Do I need to store copy_region
somewhere so that it stays valid? Or is it immediately consumed when calling vkCmdCopyBuffer
? What about the rest of the vkCmd*
functions?
Thanks.