I am developing an application where a rendering API (Vulkan) renders into image which is then fetched into NVENC.
One thing bugs me is the expected vs real usage of nvEncMapInputResource and nvEncUnmapInputResource
functions. From the NVENC docs I understand that unmapping should be done each time output bitstream buffer is acquired. Or when the resource must be accessible by another party (like Vulkan rendering side).
But from my tests I can’t see anything wrong leaving the resource mapped through the whole encoding sessions.
Vulkan uses the resource with no issues and the encoder seems not to have any problems here either. Of course,I am talking about a single encoding surface here.