diff --git a/groups/graphics/auto/auto_hal.in b/groups/graphics/auto/auto_hal.in index 100215e00..458e1970d 100755 --- a/groups/graphics/auto/auto_hal.in +++ b/groups/graphics/auto/auto_hal.in @@ -34,7 +34,12 @@ has_virgl() { update_graphics_driver_prop() { if [ "$(has_intel_gpu)" = "1" ]; then echo "Use Intel GPU for rendering" +{{#use_vulkan}} + setprop vendor.egl.set angle +{{/use_vulkan}} +{{^use_vulkan}} setprop vendor.egl.set mesa +{{/use_vulkan}} setprop vendor.vulkan.set intel elif [ "$(has_virgl)" = "1" ]; then echo "Use virtio-GPU for rendering" diff --git a/groups/graphics/auto/init.rc b/groups/graphics/auto/init.rc index a155ec47f..bd69cb662 100755 --- a/groups/graphics/auto/init.rc +++ b/groups/graphics/auto/init.rc @@ -2,6 +2,9 @@ on init chown system system /sys/class/backlight/intel_backlight/brightness chown system system /sys/class/backlight/acpi_video0/brightness export INTEL_DEBUG heur32 +{{#use_vulkan}} + setprop vendor.mesa.anv.queue.override gc=2 +{{/use_vulkan}} on post-fs-data #setprop debug.sf.nobootanimation 1 diff --git a/groups/graphics/auto/option.spec b/groups/graphics/auto/option.spec index dfa09679f..c5f25c69c 100644 --- a/groups/graphics/auto/option.spec +++ b/groups/graphics/auto/option.spec @@ -5,3 +5,4 @@ mesa_acrn_sepolicy = false enable_guc = true acrn-guest = false opencl_sepolicy = true +use_vulkan = false diff --git a/groups/graphics/auto/product.mk b/groups/graphics/auto/product.mk index ab6ead894..a3c3c57e9 100755 --- a/groups/graphics/auto/product.mk +++ b/groups/graphics/auto/product.mk @@ -35,6 +35,18 @@ PRODUCT_PACKAGES += \ PRODUCT_PACKAGES += ufo_prebuilts +{{#use_vulkan}} +# Graphics config overrides to use vulkan +PRODUCT_VENDOR_PROPERTIES += \ + debug.renderengine.backend=skiavkthreaded \ + ro.hardware.egl=angle \ + persist.graphics.egl=angle \ + ro.gfx.angle.supported=true + +# Enable HWUI Vulkan backend +TARGET_USES_VULKAN = true +{{/use_vulkan}} + #Surface Flinger related Properties PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.max_frame_buffer_acquired_buffers=3