Add `patch-vk` for vulkan limit bypass support
Purpose of proposed changes
Vulkan recently added Video Encoding API Nvidia, and AMD started implementing support for this.
And for Nvidia cards, similar to NVENC API, there is a limit to consumer grade cards.
This PR adds a new patch script patch-vk to patch libnvidia-eglcore.so which contain the functionality controlling the encoding session and its restrictions.
In this PR as well I added patch support for versions from 555.42.02 to 565.57.01 (all use the same patch, so other versions might also be patched).
Essential steps taken
Check 35d33fb0 for details on the patch itself, but to summarize.
The function doing the restriction is 0xD7E780 (address in version 555.58.02).
The function signature is like this
// This is C++, but for `C` translation it will be something like this
bool auth_release(void* this, bool is_auth);
It will take either is_auth==true if in auth or false when releasing.
It will return either true for success or false for failure.
What we changed here is that we replaced this function implementation with just return true;.
So it won't do increment or decrement the "usage" counters
Hello @jailuthra , can this be reviewed?