OSDN Git Service

Add experimental Vulkan support
authorChih-Wei Huang <cwhuang@linux.org.tw>
Fri, 11 Jan 2019 03:06:11 +0000 (11:06 +0800)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Fri, 11 Jan 2019 03:06:11 +0000 (11:06 +0800)
The Vulkan support is enabled if gbm_gralloc is used.

init.sh

diff --git a/init.sh b/init.sh
index 0054aad..3670a08 100644 (file)
--- a/init.sh
+++ b/init.sh
@@ -140,17 +140,19 @@ function init_uvesafb()
 
 function init_hal_gralloc()
 {
+       [ "$VULKAN" = "1" ] && GRALLOC=gbm
+
        case "$(cat /proc/fb | head -1)" in
                *virtiodrmfb)
                        if [ "$HWACCEL" != "0" ]; then
-                               set_property ro.hardware.hwcomposer drm
-                               set_property ro.hardware.gralloc gbm
+                               set_property ro.hardware.hwcomposer ${HWC:-drm}
+                               set_property ro.hardware.gralloc ${GRALLOC:-gbm}
                                set_property debug.drm.mode.force ${video:-1280x800}
                        fi
                        ;;
                0*inteldrmfb|0*radeondrmfb|0*nouveaufb|0*svgadrmfb|0*amdgpudrmfb)
                        if [ "$HWACCEL" != "0" ]; then
-                               set_property ro.hardware.gralloc drm
+                               set_property ro.hardware.gralloc ${GRALLOC:-drm}
                                set_drm_mode
                        fi
                        ;;