Latest gpu drivers 32.7.x cause some flickering and unstable under vita3k Emulator

You can use the prebuild binary here

See the video Initial test aarch64 dynarmic linux vita3k - vita emulator - YouTube

This not happen under jetpack 32.6.1 blobs

The only differences from 32.6. to 32.7.x
It now supports memory mapping by VK_EXT_external_memory
The emulator it’s use memory mapping when supported

What can be wrong here for the nvidia l4t driver? Thank you.
It completely breaks the graphics when we use this extension on this device.

Hi _Diablo,

Thanks for reporting this issue.
I will forward this issue to our internal team to do further investigating to see if can have the fix.

hi We are testing another alternative using page table for drivers not supported or oldest without VK_EXT_external_memory

Edit For drivers without VK_EXT_external_memory we can fixed it with latest commit
however latest drivers 32.7.x with VK_EXT_external_memory unusual behavior keeps happening.
We haven’t found a solution yet .

Since it works without using VK_EXT_external_memory, is it possible not to use it as a quick solution?

With 32.6.x blobs it’s fast solution though not perfect in fews things it keeps flickering They do opposite behaviors with or without.

With 32.7 it will would block not loading the VK_EXT_external_memory implementation
But it would be nice to understand why it flickers as this issue does not happen on other hardware that we have tested in our internal tests and users have reported to us.

We will have found the limitation it’s happn on nintendo switch too.
it’s does not have a memory type that is both coherent and cached, so performance is kind of bad with the pagetable implementation
and it explains the flickering with external host buffer too!!!
for now it’s very low priority for us due hard pain work on this maybe in the futur will rework.

Or What alternative is here? If something occurs to you let me know.

We will check this on Orin. On Jetson Nano, please not to use the extension as a quick solution.

Hi _Diablo,

Are you got below errors when build the project from sources?
$ cmake --build build/linux-ninja-clang

[85/756] Building CXX object external/dynarmic/src/dynarmic/CMakeFiles/dynarmic.dir/Debug/cmake_pch.hxx.pch
FAILED: external/dynarmic/src/dynarmic/CMakeFiles/dynarmic.dir/Debug/cmake_pch.hxx.pch 
/usr/bin/clang++ -DDYNARMIC_ENABLE_CPU_FEATURE_DETECTION=1 -DFMT_USE_USER_DEFINED_LITERALS=1 -DCMAKE_INTDIR=\"Debug\" -I/home/nvidia/Bug3999516/Soruces-0309/Vita3K/external/dynarmic/src/dynarmic/.. -I/home/nvidia/Bug3999516/Soruces-0309/Vita3K/external/dynarmic/externals/oaknut/include -I/home/nvidia/Bug3999516/Soruces-0309/Vita3K/external/fmt/include -I/home/nvidia/Bug3999516/Soruces-0309/Vita3K/external/dynarmic/externals/mcl/src/../include -I/home/nvidia/Bug3999516/Soruces-0309/Vita3K/external/dynarmic/externals/robin-map/include -g -std=c++2a -Wall -Wextra -Wcast-qual -pedantic -pedantic-errors -Wno-missing-braces -fbracket-depth=1024 -Winvalid-pch -Xclang -emit-pch -Xclang -include -Xclang /home/nvidia/Bug3999516/Soruces-0309/Vita3K/build/linux-ninja-clang/external/dynarmic/src/dynarmic/CMakeFiles/dynarmic.dir/Debug/cmake_pch.hxx -x c++-header -MD -MT external/dynarmic/src/dynarmic/CMakeFiles/dynarmic.dir/Debug/cmake_pch.hxx.pch -MF external/dynarmic/src/dynarmic/CMakeFiles/dynarmic.dir/Debug/cmake_pch.hxx.pch.d -o external/dynarmic/src/dynarmic/CMakeFiles/dynarmic.dir/Debug/cmake_pch.hxx.pch -c /home/nvidia/Bug3999516/Soruces-0309/Vita3K/build/linux-ninja-clang/external/dynarmic/src/dynarmic/CMakeFiles/dynarmic.dir/cmake_pch.hxx.cxx
In file included from <built-in>:1:
In file included from /home/nvidia/Bug3999516/Soruces-0309/Vita3K/build/linux-ninja-clang/external/dynarmic/src/dynarmic/CMakeFiles/dynarmic.dir/Debug/cmake_pch.hxx:5:
/home/nvidia/Bug3999516/Soruces-0309/Vita3K/external/dynarmic/externals/oaknut/include/oaknut/oaknut.hpp:6:10: fatal error: 'bit' file not found
#include <bit>
1 error generated.
[90/756] Building C object external/unicorn/CMakeFiles/armeb-softmmu.dir/Debug/qemu/target-arm/translate.c.o
ninja: build stopped: subcommand failed.

Reference link: Vita3K/ at master · Vita3K/Vita3K · GitHub

With what clang version?
seems to be using an old clang
We recommended using clang-14
If you have under bionic will needed add this ppa sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update

chmod +x
sudo ./ 14

Also will be needed install libstdc+±10-dev due not installed by default under bionic/focal ubuntu when install clang.

And try

cmake --preset linux-ninja-clang14
cmake --build build/linux-ninja-clang14 --config Release

the --config flags is optional for perfomance speed.
Only use Debug if you need it.

Ah you will needed rebuild ffmpeg files or apply this Add support for aarch64 linux by mrcmunir · Pull Request #4 · Vita3K/ffmpeg-core · GitHub
and rebuild libtomcrypt GitHub - KorewaWatchful/libtomcrypt at f7518374b9bdc7f43c8f60d82ed16f0d5af53a19
and copy libtomcrypt.a into build/lib/

Tell me that helped you solve your problem when building



Hi _Diablo,

I got below errors this time:

$ cmake --build build/linux-ninja-clang --config Release
[0/2] Re-checking globbed directories...
ninja: error: '/home/nvidia/Bug3999516/Sources-0320/Vita3K/external/ffmpeg/linux/aarch64/libavcodec.a', needed by 'bin/Release/Vita3K', missing and no known rule to make it

My steps:

  1. Build libtomcrypt from:
    GitHub - KorewaWatchful/libtomcrypt at f7518374b9bdc7f43c8f60d82ed16f0d5af53a19
  2. Download the Vita3K:
    $ git clone --recursive GitHub - Vita3K/Vita3K: Experimental PlayStation Vita emulator
    $ cd Vita3K/external/ffmpeg
  3. Reference this page to apply change and add script
    $ vim CMakeLists.txt
    $ vim
    $ cp libtomcrypt/libtomcrypt.a ./external/psvpfstools/libtomcrypt/build/lib/libtomcrypt.a
  4. Run below command to building:
    $ cmake --preset linux-ninja-clang
    $ cmake --build build/linux-ninja-clang --config Release

Do I missing what steps?
or can you provide the Vita3K that can run on Jetson Nano for us directly?

Hi please check the script ffmpeg create some extra folders we not needed it you only needed it the *.a files in linux/aarch64/