As descriptors are essentially pointers/references to resources, set host-side (CPU conceptually) in order to tell the device (GPU) what each descriptor points to (device-local/GPU) buffers/memory, how does this actually happen? The reason I ask this is because usually the programmer knows exactly when the transfer of data is done from host to device because it's recorded into a command buffer and then submitted to a queue. vkUpdateDescriptorSets is not a command buffer command, and people say that the descriptor sets are updated instantly. How does this actually work?
The descriptor sets are allocated in descriptor pools, which like command buffer pools reside host-side. So essentially when recording commands you're writing into host-side memory until you submit the command buffer. Does vkUpdateDescriptorSets work the same way, in that it's writing to host-side memory, and then when a command buffer is submitted it transfers the data to the GPU? Or does it do a transfer to the GPU immediately then and there? In the case of a descriptor which is an array and I write descriptor binding array element [1] and element[4091] does Vulkan need to transfer the entire array over to the GPU or will this result in two small transfers?
Please explain to me if my conception of this is correct. Written descriptors need to be written to the GPU because this is where the resource pointers are.