VkSampler
objects definitely have data associated with them, so it would be wrong to call them "stateless". What they are is immutable. Like VkRenderPass
, VkPipeline
, and similar objects, once they are created, their contents cannot be changed.
Synchronization between accesses is (generally) needed only for cases when one of the accesses is a modification operation. Since VkSampler
s are immutable, there are no modification operations. So synchronization is not needed for cases where you're accessing a VkSampler
from different threads, commands, or whathaveyou.
The only exception is the obvious one: vkDestroySampler
, which requires that submitted commands that use the sampler have completed before calling the function.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…