libva icon indicating copy to clipboard operation
libva copied to clipboard

Add hint for map operation

Open XinfengZhang opened this issue 4 years ago • 8 comments

add hint for map operation

read/write hint represent the purpose of mapping operation
backend could optimize vaMapBuffer basing on these hint

XinfengZhang avatar Oct 25 '21 06:10 XinfengZhang

As we discussed offline we also have a feature request to control access time. I.e. to have something like vaMapBuffer3 which accepts timeout option to give user control on how much time user can wait until GPU resource will be free (timeout 0 will mean non blocking call). We can't use two different functions to check it, because between check and use GPU may acquire resource. consider it as pure feature request, fine to have at least access flags for now

mgonchar avatar Oct 27 '21 10:10 mgonchar

@dvrogozh , can you please review?

dmitryermilov avatar Nov 02 '21 13:11 dmitryermilov

@XinfengZhang please update this PR

mgonchar avatar Nov 11 '21 13:11 mgonchar

@dvrogozh could you please look again at this one?

mgonchar avatar Nov 17 '21 07:11 mgonchar

@dvrogozh your turn :)

mgonchar avatar Nov 29 '21 10:11 mgonchar

@XinfengZhang , it seems no concerns anymore. Can you please merge?

dmitryermilov avatar Dec 01 '21 09:12 dmitryermilov

need implementation in place. thanks

XinfengZhang avatar Dec 01 '21 12:12 XinfengZhang

How does an application know if a driver supports vaMapBuffer2()? In the current implementation, invoking vaMapBuffer2(), getting error and then falling back to vaMapBuffer()? It seems to be inefficient. Shall we develop a better way, e.g., querying?

rosetta-jpn avatar Feb 06 '24 01:02 rosetta-jpn