Also are we allowed to end the recording of a command buffer without having recorded any operations in it? Does the return value ofindicate anything about the state of the command buffer? Thank you in advance.Code :vkBeginCommandBuffer()
Also are we allowed to end the recording of a command buffer without having recorded any operations in it? Does the return value ofindicate anything about the state of the command buffer? Thank you in advance.Code :vkBeginCommandBuffer()
You created it and you either did or did not start recording into it. Vulkan is an API for grownups; it is up to you to keep track of the stuff that you yourself do.How do we know if a command buffer is being recorded or not?
If your program's structure is not such that this information is obvious by its structure or contractually assumed, then you should keep track of it yourself. But it's better to structure your program so that the question never needs to be asked.
Is there a Valid Usage statement on `vkEndCommandBuffer` that would prevent it? If not, then you're allowed to do it.Also are we allowed to end the recording of a command buffer without having recorded any operations in it?
What would it need to "indicate" "about the state of the command buffer"? Recording can either begin successfully or emit one of the error codes listed in the specification/documentation.Does the return value of `vkBeginCommandBuffer` indicate anything about the state of the command buffer?
Yeah, I get that. I did take a look at the registry to see what it said about this as well. I only wanted to confirm that this was the case.
It is readily apparent in my code as to whether or not a command buffer is being recorded, so I don't think I will run into this problem.If your program's structure is not such that this information is obvious by its structure or contractually assumed, then you should keep track of it yourself. But it's better to structure your program so that the question never needs to be asked.
Thank you for the advice.
Use the validation layers, if your command buffer isn't in an appropriate state when you manage it, they will notify you. Just make sure that in the "release" version of your program, every scenario that could end in a warning from those layers is avoided.