Thanks a lot to Tapani and you!
I will have a look at the sources and libraries dependencies.
Unfortunately I can be active and participate to irc chats only during
the evenings in wowrking days (CET timezone)
and in the weekends, when I'm not too busy up till late hours with my
daily Telco Engineering job,
but I perform quasi-daily access to email.
Mauro
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Considering that vulkan.$(TARGET_BOARD_PLATFORM) module
built by src/intel/Android.vulkan.mk makefile implements Vulkan HAL,
without requiring external Vulkan HAL wrapper/stub
It's (about) time to try if it works with oreo-x86
With attached patch to device/generic/common vulkan.android-x86 can be built
and be selected as vulkan HAL
Test: "Hardware CapsViewer for Vulkan" app shows apiVersion 1.0.57
Not very easy to find a specific vulkan demo/benchmark apps ready to install in Playstore
Sascha Willems vulkanGears demo (apk for arm) crashes with SIGSEGV MAPERR
due access to address 0x0 (NULL pointer dereference)
Still to be retested, with proper x86 binaries.
I plan to try building Sascha Willems demos for x86 in the next days
Enabling hwc1 (or hwc2 handle-rework of robherring) was necessary for the gralloc handle be passed from one process to another (HIDL interface)
In the attachment the necessary changes with specific commits, workin with HWCOMP=1 boot cmdline variable.
There is not yet a vulkan stub able to dlopen automatically the proper vulkan.<driver> automatically so I'm using anv as the default (vulkan.android-x86) and radv is selected via VULKAN=radv boot cmdline variable
vulkan anv and radv are working and task is completed
gbm_gralloc required GRALLOC_USAGE_HW_COMPOSER flag implementation
drm_hwcomposer (hwc1) requires "take connection state into account (v2)"
llvm 5.0 or later is required to build amdgpu and radv (llvm70 "side build" was used)
amdgpu and nouveau require changes in frameworks/native surfaceflinger for BGRA in hwc1 path
The necessary changes in device/generic/common including init_hal_vulkan() are here [1]
with all dependecies scripted in the attached file.
Updated mesa 18.1.3 has all radv building rules [2],
but on i965 to see hwc boot and anv working the latest mesa [3] is required,
most probably solved by 3f7bca4 "egl/android: #ifdef out flink name support"
patch to use libLLVM70 in mesa is in the second attachment
Results are very good with vulkan anv with many benchmarks and games working
V1 Benchmark (Vulkan API), 3Dmark Slingshot extreeme (Vulkan API)
Sascha Willems Vulkan demos, PPSSPP emulator, Olympus Rising
radv crashes with SIGSEGV MAPERR with some benchmarks e.g. 3Dmark Slingshot extreeme (Vulkan API), but games seem ok
Having hwcomposer.drm + gralloc.gbm working with i965 gifted us vulkan anv (impressively stable) together with amdgpu (amd dc) & vulkan radv
Android O seem more "vulkan ready" than Android N
Mauro, Intel Tpalli and Emil are discussing Vulkan building issue at Freenode #android-ia channel. If you can join, that would be great.
WIP branch:
https://cgit.freedesktop.org/~tpalli/mesa/log/?h=vulkan_android
and build error log:
http://koti.kapsi.fi/tpalli/build_log.txt
Thanks a lot to Tapani and you!
I will have a look at the sources and libraries dependencies.
Unfortunately I can be active and participate to irc chats only during
the evenings in wowrking days (CET timezone)
and in the weekends, when I'm not too busy up till late hours with my
daily Telco Engineering job,
but I perform quasi-daily access to email.
Mauro
I suggest you use screen + irssi to always stay on the IRC channel.
This is what I did.
sudo apt-get install irssi screen
and see man screen, man irssi for details.
Hi,
I've sent some patches to fix anv build
Considering that vulkan.$(TARGET_BOARD_PLATFORM) module
built by src/intel/Android.vulkan.mk makefile implements Vulkan HAL,
without requiring external Vulkan HAL wrapper/stub
It's (about) time to try if it works with oreo-x86
With attached patch to device/generic/common vulkan.android-x86 can be built
and be selected as vulkan HAL
Test: "Hardware CapsViewer for Vulkan" app shows apiVersion 1.0.57
Not very easy to find a specific vulkan demo/benchmark apps ready to install in Playstore
Sascha Willems vulkanGears demo (apk for arm) crashes with SIGSEGV MAPERR
due access to address 0x0 (NULL pointer dereference)
Still to be retested, with proper x86 binaries.
I plan to try building Sascha Willems demos for x86 in the next days
Mauro
Sorry, please consider that an entry is missing in PRODUCT_COPY_FILES
frameworks/native/data/etc/android.hardware.vulkan.version-1_0_3.xml:system/etc/permissions/android.hardware.vulkan.version.xml
I'll proceed further in testing in both oreo-x86 and nougat-x86
KR
Update: vulkan HAL build is ok for anv and radv
Enabling hwc1 (or hwc2 handle-rework of robherring) was necessary for the gralloc handle be passed from one process to another (HIDL interface)
In the attachment the necessary changes with specific commits, workin with HWCOMP=1 boot cmdline variable.
There is not yet a vulkan stub able to dlopen automatically the proper vulkan.<driver> automatically so I'm using anv as the default (vulkan.android-x86) and radv is selected via VULKAN=radv boot cmdline variable
Android CTS results for dEQP-VK_* tests are here:
https://drive.google.com/drive/folders/0B_OFHiIqgpSFejI4blJ0VlZvdTg
vulkan anv and radv are working and task is completed
gbm_gralloc required GRALLOC_USAGE_HW_COMPOSER flag implementation
drm_hwcomposer (hwc1) requires "take connection state into account (v2)"
llvm 5.0 or later is required to build amdgpu and radv (llvm70 "side build" was used)
amdgpu and nouveau require changes in frameworks/native surfaceflinger for BGRA in hwc1 path
The necessary changes in device/generic/common including init_hal_vulkan() are here [1]
with all dependecies scripted in the attached file.
Updated mesa 18.1.3 has all radv building rules [2],
but on i965 to see hwc boot and anv working the latest mesa [3] is required,
most probably solved by 3f7bca4 "egl/android: #ifdef out flink name support"
patch to use libLLVM70 in mesa is in the second attachment
Results are very good with vulkan anv with many benchmarks and games working
V1 Benchmark (Vulkan API), 3Dmark Slingshot extreeme (Vulkan API)
Sascha Willems Vulkan demos, PPSSPP emulator, Olympus Rising
radv crashes with SIGSEGV MAPERR with some benchmarks e.g. 3Dmark Slingshot extreeme (Vulkan API), but games seem ok
Android CTS results for dEQP-VK_* tests are here:
https://drive.google.com/drive/folders/0B_OFHiIqgpSFejI4blJ0VlZvdTg
[1] https://github.com/maurossi/device_generic_common/commits/oreo-x86_vulkan
[2] https://github.com/maurossi/mesa/commits/18.1.3_oreo-x86
[3] https://github.com/maurossi/mesa/commits/18.2.0-devel_w26
Last edit: Mauro Rossi 2018-07-01
Final report with results
Having hwcomposer.drm + gralloc.gbm working with i965 gifted us vulkan anv (impressively stable) together with amdgpu (amd dc) & vulkan radv
Android O seem more "vulkan ready" than Android N
https://drive.google.com/drive/folders/0B_OFHiIqgpSFTFpkQWc1eXV3ME0
[working apps]
V1 Benchmark (Vulkan API) - should work
3D Bench (Slinghshot extreeme with Vulkan API) - should work
PPSSPP - should work
Toy Zombies: Lite - should work (I cannot understand the commands with mouse cursor I always get killed)
Olympus Rising - should work (very nice)
https://github.com/googlesamples/android-vulkan-tutorials - working
VulkanCapsViewer - use 1.6 apk for x86 from http://vulkan.gpuinfo.org/download.php
Most of SaschaWillems Vulkan examples http://vulkan.gpuinfo.org/downloads/examples/vulkan_examples_android.7z
[crashing apps - in anv and maybe also in radv - but to be verified]
Following SaschaWillems Vulkan examples
adb connect [IP address]
adb install -r ~/Downloads/vulkan_examples_android/vulkanDeferredmulitsampling.apk
adb install -r ~/Downloads/vulkan_examples_android/vulkanIndirectdraw.apk
adb install -r ~/Downloads/vulkan_examples_android/vulkanInstancing.apk
adb install -r ~/Downloads/vulkan_examples_android/vulkanTerraintessellation.apk
Mauro