Add patch-vk
for vulkan limit bypass support
#872
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 patchlibnvidia-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
to565.57.01
(all use the same patch, so other versions might also be patched).Essential steps taken
Check 35d33fb 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
It will take either
is_auth==true
if inauth
orfalse
when releasing.It will return either
true
for success orfalse
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