aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-02-12Snap for 11438001 from 71f22b2fd1c27fc9cb83f822b0aeab771dabc40e to ↵emu-34-releaseAndroid Build Coastguard Worker
emu-34-release Change-Id: If2effa04c2e7f7ec10383d2ed746a7a31917554a
2024-01-31Try not to use nullptr in vsnprintf for %semu-34-devYahan Zhou
It could trigger undefined behavior on Windows. Bug: 323071431 Test: open chrome and play videos Change-Id: I7736053459c3f749b713699145e063bc95f74271
2024-01-29Skip snapshot when using unsupported EGLImage targetYahan Zhou
It queries the GL texture object of the said EGL image and crashes if the object does not exist. Thus we will have to skip snapshot in such situation. Also reformat neighbouring code to change tab to spaces. Bug: 320561043 Test: presubmit Change-Id: I20160e2a11b563caaecf0caa5b4137cb5b216500 (cherry picked from commit d8ba7faf2a710d48f6c915d04d884b6883df83b8)
2024-01-29Report unsupported format in crash reportYahan Zhou
We have a crash report that some unsupported format was created with Android hardware buffer. Let's report the format name so that we could fix it later. Bug: 322858149 Change-Id: If4cd10a62eed0a56df82b4af68a348d52b82288d (cherry picked from commit 3c041cc256eb8d750e2f6eff5b50bf41593d8c62)
2024-01-24Merge "Declare AHB blob unsupported in Vulkan" into emu-34-devTreehugger Robot
2024-01-24Merge "Use safer getter for fenceSync" into emu-34-devTreehugger Robot
2024-01-24Merge "Add VK_EXT_fragment_density_map for Chrome" into emu-34-devTreehugger Robot
2024-01-24Fix recusion and thread safety of EGL context setupIgor Chernyshev
Bug: 320319509 Bug: 316936776 Change-Id: I2f07370817b281969c0b35110d9887b416c42609 (cherry picked from commit 9348922de0bf43fad18c547f773e2568684000e2)
2024-01-23Declare AHB blob unsupported in VulkanYahan Zhou
It diverged between old gralloc and minigbm. Test: dEQP-VK.api.external.memory.android_hardware_buffer.* Bug: 299520213 Merged-In: If0c1896c6acef97db9ec3ae3abfe88eea333b42f Change-Id: I029cfb0765b0265409c71d4a6732275b385a4901 (cherry picked from commit 79ab57ae3c380a1aef8f3c216e162a2947f027fa)
2024-01-23Use safer getter for fenceSyncYahan Zhou
rcClientWaitSyncKHR casts raw pointers from the guest which is unsafe. Use EmulatedEglFenceSync::getFromHandle which checks if the fenceSync has been registered and is still alive. Bug: 320559580 Change-Id: Iaa26cd71409802d597145b62dd0eff099a0b2541 (cherry picked from commit c2ec5a6be8103f7e3e815cee11c3c3b8478c8c94)
2024-01-23Add VK_EXT_fragment_density_map for ChromeYahan Zhou
Bug: 320855472 Test: media_unittests from rvc_car_release Change-Id: I7af3265fc24d0a2265fac59e0041c318f75be99d (cherry picked from commit b01fc5ab1beea740167176268cbde3d64bb6edb4)
2024-01-23Snap for 11342487 from 256fdbd6be2077df5b64ac4610a3a3cd9e7b49ba to ↵Android Build Coastguard Worker
emu-34-release Change-Id: I5e300ec74ed48ce35b2856cc87614d71a147cdcc
2024-01-08Snap for 11286485 from 8996f9715c19b63d2bb4525f5ad6edf3cae0b8c1 to ↵Android Build Coastguard Worker
emu-34-release Change-Id: Id326c7aaf19ef0d87177a3d623e2ce96cc110c8d
2024-01-06Merge "Support surface- and config-less EGL contexts" into mainIgor Chernyshev
2024-01-06Merge "Improve logging of missing attachments" into mainIgor Chernyshev
2024-01-05Improve logging of missing attachmentsIgor Chernyshev
Bug: 318885144 Bug: 316936776 Change-Id: I4f4f4e153abe3cbf5b2dd9c942bfefeec2de438c
2024-01-05Support surface- and config-less EGL contextsIgor Chernyshev
Bug: 318885144 Bug: 316936776 Change-Id: Ia15aab0f246769bdb3bc11fa87e9af9a9aec497f
2024-01-04genvk: options.filename --> args.targetGurchetan Singh
Previously, for gfxstream the filename was "CMakeLists.txt", but that was changed with the prior commit. Not having a filename doesn't affect codegen, but does throw an error afterwards when timing statistics are thrown out. Luckily, args.target and options.filename are more or less synonymous in genvk.py, so use that. This should be fairly upstreamable too if we choose to do so. BUG=296903491 TEST=run genvk.py Change-Id: Ib90b64ea2e6ed5860239b0ac3e644454f94d2778
2024-01-04gfxstream: use absolute path for some codeGurchetan Singh
Some code may be auto-generated, some may not be. Eventually we want to move autogenerated code into specialized directories, so it be generated but not necessarily checked in [for certain cases]. Also, nuke codegen for CMakeLists.txt: we have multiple other build systems now (Blueprint, meson), and it doesn't make sense codegen one anymore. BUG=296903491 TEST=compile Change-Id: I63beff1726074268188694fbfeb803429ee96478
2024-01-04Snap for 11271302 from 3e45436a0fdbef6f7c44ea04656cced583d1bf76 to ↵Android Build Coastguard Worker
emu-34-2-release Change-Id: I0cf8d74f6cdf5ef78cfac234503fae80fbd44b20
2024-01-03Merge "Fix crash on exit" into mainKaiyi Li
2024-01-02gfxstream: nuke goldfish_vk_unboxGurchetan Singh
Not used. BUG=296903491 TEST-trybots Change-Id: Ia449742391dc1de9d0b043eeb5c75b2ddfec9ce9
2024-01-02gfxstream: nuke goldfish_vk_handlemapGurchetan Singh
Not used. BUG=296903491 TEST=trybots Change-Id: Ibce1a36a1933f21e4c88ec6a544e8903fa5d96ce
2024-01-02Fix crash on exitKaiyi Li
In RendererImpl::~RendererImpl, we have the following indirect call stack: * teardownGlobalVkEmulation * FrameBuffer::~FrameBuffer * FrameBuffer::finalize * RenderWindow::~RenderWindow Triggers FrameBuffer::finalize indirectly by sending the finalize command * RendererImpl::~RendererImpl However, teardownGlobalVkEmulation shouldn't be called until mCleanupThread has exited, because we may have queued Vulkan objects cleanups on that thread by calling FrameBuffer::registerProcessCleanupCallback in on_vkCreateInstance, and the clean up may depend on the global Vulkan emulation object. Test: build Change-Id: I667f2685dd9dc5749244844a3259e51a3250de7b
2024-01-02Snap for 11243315 from 5ef37b16f4777f6052903ffcdf96ad0bb87e1572 to ↵Android Build Coastguard Worker
emu-34-release Change-Id: If47758b82adf08292e295e381fffe3814809fbac
2023-12-27Merge "gfxstream: add CONFIG_AEMU to logger statements" into mainTreehugger Robot
2023-12-27Snap for 11254987 from d3925845dfbf5ae60dc6d1904b5785f18554d713 to ↵Android Build Coastguard Worker
emu-34-2-release Change-Id: Ie43dab01a3d92dd1a20814fe45f7f95d0a631ddd
2023-12-27gfxstream: mega-change to support guest Linux WSI with gfxstreamGurchetan Singh
This is a mega-change to support Linux guest WSI with gfxstream. We tried to do a branch where every commit was buildable and runnable, but that quickly proved unworkable. So we squashed the branch into a mega-change. Zink provides the GL implementation for Linux guests, so we just needed to implement the proper Vulkan Wayland/X11 WSI entrypoints. The overall strategy to support this is to use Mesa's WSI functions. The Vulkan WSI layer was also considered: https://gitlab.freedesktop.org/mesa/vulkan-wsi-layer But it was less maintained compared to Mesa. The way Mesa common layers communicate with drivers is the through base objects embedded in driver and a common dispatch layer: https://gitlab.freedesktop.org/mesa/mesa/-/blob/main/docs/vulkan/dispatch.rst https://gitlab.freedesktop.org/mesa/mesa/-/blob/main/docs/vulkan/base-objs.rst Our objects are defined in gfxstream_vk_private.h. Currently, Mesa-derived Vulkan objects just serve as shim to gfxstream Vulkan’s internal handle mapping. Long-term, we can use Mesa-derived objects inside gfxstream guest Vulkan exclusively. The flow is typically inside a Vulkan entrypoint is: - VK_FROM_HANDLE(vk-object) to convert to a gfxstream_vk_obj object - Call ResourceTracker::func(gfxstream_vk_obj->internal) or VkEncoder::func(gfxstream_vk_obj>internal) - Return result A good follow-up cleanup would be to delete older gfxstream objects. For example, we now have struct gfxstream_vk_device and info_VkDevice in ResourceTracker. Most of this logic was auto-generated and included in func_table.cpp. Some vulkan functions were too difficult to auto-generate or required special logic, and these are included in gfxstream_vk_device.cpp. For example, anything that needs to setup the HostConnection requires special handling. Android Blueprint support is added to the parts of Mesa needed to build the Vulkan runtime. One thing to call out it's required to build the guest/vulkan_enc and guest/vulkan files in the same shared library now, when previously have libvulkan_enc.so and libvulkan_ranchu.so was sufficient [otherwise, some weak pointer logic wouldn't work]. A side effect of this is libOpenglSystem must also be a static lib, and so should libandroid_aemu too. That conceptually makes sense and the Meson build had been doing this all a long. We can probably transition everything besides libGLESv1_emulation.so, libGLESv2_emulation.so and libvulkan_ranchu.so to be static. This requires changes in the end2end tests, because since each HostConnection is separate and internal to it's constituent library. Lifetimes need to be managed separately: for example the HostConnection instance created by the end2end tests would not be visible inside libvulkan_ranchu.so anymore. Probably the best solution would be improve the testing facade so a HostConnection represents one virtio-gpu context, while some other entity represents a virtio-gpu device (client-server would work). vk.xml was modified, but change sent to Khronos: https://gitlab.khronos.org/vulkan/vulkan/-/merge_requests/6325 Fuchsia builds still need to be migrated, but they already have Fuchsia Mesa with all the build rules so that shouldn't be too bad. Just need to copy them over the gfxstream/Mesa hybrid. The new command for building Linux guests is: meson amd64-build/ -Dvulkan-drivers="gfxstream" -Dgallium-drivers="" -Dvk-no-nir=true -Dopengl=false Big shout-out to Aaron Ruby, who did most of the gnarly codegen needed to get the function table logic to work. BUG=313466265 BUG=298679844 TEST= * Run Weston/vkcube on Linux and automotive platform * launch_cvd --gpu_mode=gfxstream vkcube * launch_cvd --gpu_mod=gfxstream_guest_angle * vkcube + 3D Mark Slingshot extreme work with guest ANGLE and GL-VK interop * GfxstreamEnd2EndTests * Some select dEQP tests Aaron Ruby (46): gfxstream: function table: remove entry points that are hand-written. gfxstream: function table: more changes gfxstream: function table: scope internal_arrays to encoder gfxstream: function table: autogenerate compoundType params gfxstream: add handwritten EnumeratePhysicalDeviceGroup entrypoint. gfxstream: function table: handle nested handle arrays gfxstream: function table: adding some handwritten implementations gfxstream: revert some unnecessary changes gfxstream: use vk_object_zalloc/free instead of vk_zalloc/free. gfxstream: revert most gfxstream objects to use vk_object_base gfxstream: function table: handwritten commmand-buffers/pools gfxstream: codegen functionality to handle special param gfxstream: function table: random fixes gfxstream: add vk_command_buffer_ops handlers gfxstream: func_table.py: Codegen support for nested compound type gfxstream: remove handwritten/add autogen entry points gfxstream: add gfxstream_vk_device.cpp gfxstream: query device and instance extensions early gfxstream: func_table: explicit allocation for nested arrays/compound types gfxstream: goldfish_vulkan: fix commandBuffer allocation. gfxstream: meson: Raise api_version in ICD config to 1.1. gfxstream: function table: add more handwritten entries gfxstream: goldfish_vulkan: update VkDescriptorSetAllocateInfo logic gfxstream: function table: NULL check on internal_object dereference gfxstream: function table: Remove POSTPROCESSES handling from functable gfxstream: mesa: Add 'gfxstream' as a -Dvulkan-drivers gfxstream: ResourceTracker: add some allowedExtensions gfxstream: gfxstream_vk_device: add wsi_common_entrypoints gfxstream: Move instance handling into gfxstream_vk_device.cpp gfxstream: ResourceTracker: Enable Linux WSI-related extensions gfxstream: wsi: add wsi_device initialization gfxstream: gfxstream_vk_device: use Mesa common physical device management gfxstream: ResourceTracker: translate mesa objects in user buffer gfxstream: exclude VkSampler and VkDescriptorSet objects from translation gfxstream: Add guest-side external memory support with colorBuffers. gfxstream: function table: Modify semaphoreList inputs to no-op semaphores gfxstream: function table: Allow VK_NULL_HANDLE for free/destroy APIs. gfxstream: cereal: Add VK_EXT_depth_clip_enable as supported feature. gfxstream: vulkan_enc: un-namespace vk_util.h and vk_struct_id.h gfxstream: gfxstream_vk_device.cpp: Support VK_KHR_surface and VK_*_surface gfxstream: vulkan_enc: Add support for Mesa-only extensions. gfxstream: ResourceTracker: Use DEVICE_TYPE_VIRTUAL_GPU always gfxstream: platform: add dma-buf export support with dedicatedBuffer. gfxstream: ResourceTracker: add VK_EXT_depth_clip_enable allowed extension gfxstream: ResourceTracker: external memory via QNX_screen_buffer extension gfxstream: Add VK_QNX_external_memory_screen_buffer to VulkanDispatch Gurchetan Singh (18): gfxstream: mesa: write Android.bp files gfxstream: generate gfxstream_vk_entrypoints.{c, h} gfxstream: vulkan_enc: add gfxstream_vk_private.h (objects) gfxstream: function table: modify function table to use gfxstream_vk_* gfxstream: compiles gfxstream: build system improvements gfxstream: ResourceTracker: don't crash without VkBindImageMemorySwapchainInfoKHR gfxstream: vk.xml: make some vkAcquireImageANDROID params optional gfxstream_vk_device: filter out swapchain maintenance guest side gfxstream: end2end: fixes for End2End tests gfxstream: func_table: custom vkEnumerateInstanceLayerProperties gfxstream: add VK_EXT_DEBUG_UTILS_EXTENSION_NAME into Mesa list gfxstream: clang-format guest code gfxstream: libandroid AEMU static gfxstream: vkEnumerateInstanceVersion gfxstream: vkCreateComputePipeLines gfxstream: make end2end tests happy gfxstream: delete prior vk.xml, vk_icd_gen.py Change-Id: Ic4cc50d5098dddd77c9265afa8f432a2fdea8845
2023-12-27gfxstream: mesa: import MesaGurchetan Singh
Mesa has Linux WSI implementations that can be used for gfxstream. We have to first import the parts of Mesa that we find useful. Just modified - guest/src/mesa/meson.build to remove extra project args. - guest/src/mesa/src/meson.build to not automatically call subdir in all directories. This also requires the VK_NO_NIR and Android build patches, which are fairly upstreamable. The strategy would be to merge all changes required in the source code. Generally, if you want to modify the Mesa subdir, you generally will want to have a plan for upstreaming the change. For example, here's the Mesa VK_NIR patches. https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26574 [not upstreamed yet; but do have a plan ;-)] BUG=313466265 TEST=compile Change-Id: Ib5a7546e3f8832ddba4de8e62afc80c669692444
2023-12-26gfxstream: add CONFIG_AEMU to logger statementsGurchetan Singh
Not necessary for crosvm or upstream QEMU: STREAM_RENDERER_PARAM_DEBUG_CALLBACK is already well-integrated into respective VMMs. BUG=317816825 TEST=meson build still works with older AEMU lib Change-Id: I95599e6fb0c75a8856f29b78cc6963bf71b17ba1
2023-12-26Merge "Provide error message on unhandled VK structs" into mainYahan Zhou
2023-12-21Snap for 11244230 from 5ef37b16f4777f6052903ffcdf96ad0bb87e1572 to ↵Android Build Coastguard Worker
emu-34-2-release Change-Id: I9b858e4da9fe422152d4998689b38a4dc42f8b83
2023-12-21Provide error message on unhandled VK structsLars Harrison
This change provides more explicit error messages and a proper abort in situations where an unhandled VK structure is attempting to be used, based purely on calls to the size functions. This should enable better capture and debugging of these failures in the future (rather than hitting a segfault and having to diagnose). Bug: 317276564 Test: built with changes and ran locally Change-Id: Ib00af771886823efa31e83fa0e1a557216557569
2023-12-19Add VK_EXT_debug_utils and VK_EXT_scalar_block_layoutIgor Chernyshev
Bug: 317131873 Bug: 316936776 Change-Id: I60b48b31ada43ca7295d2ff84762817e2f640ede
2023-12-19Merge "Add VK_EXT_vertex_attribute_divisor support for guest ANGLE" into mainTreehugger Robot
2023-12-19Add VK_EXT_vertex_attribute_divisor support for guest ANGLEYahan Zhou
Bug: 236282567 Test: boot AEMU with -guest-angle Change-Id: I20ac7ccf9d4d3f24e9c31d4e05fda1bc18832940
2023-12-18Supress spurious vkResetFences() validation errorsIgor Chernyshev
Bug: 316963039 Bug: 316936776 TEST=Manual with emulator Change-Id: I9e3b0f41e7885ac53ea5e1a11af09935841a6fd9
2023-12-17Snap for 11228863 from 7170c217ead8e899793a61cb571a9f17182450d9 to ↵Android Build Coastguard Worker
emu-34-release Change-Id: If4d9f70fea6c2e89e17adce73d5dacf326ff3b8c
2023-12-15Merge "Re-enable logger setup" into mainTreehugger Robot
2023-12-14Merge "Handle SOLID_COLOR layers in CompositorVk" into mainJason Macnak
2023-12-13gfxstream: nuke unused BUILD.gnGurchetan Singh
Not used. BUG=296903491 TEST=presubmit Change-Id: Ide369f6468dd41ad8efd18e11893dfcc8aa71d43
2023-12-13Merge changes Id043315c,I3f2bc097,Id380ea00,Ie5a9fbb1 into mainGurchetan Singh
* changes: gfxstream: nuke build-host.sh gfxstream: nuke Android.mk gfxstream: nuke METADATA gfxstream: nuke profiler
2023-12-13Handle SOLID_COLOR layers in CompositorVkJason Macnak
Bug: b/315817323 Test: cvd start --gpu_mode=gfxstream_guest_angle Test: cvd start --gpu_mode=gfxstream_guest_angle_host_swiftshader Test: atest --host gfxstream_compositorvk_test Change-Id: I5eeaef8ef421104b91434b73b6fdeab714c43fcf
2023-12-11Merge "Skip solid color layers in CompositorVk" into mainTreehugger Robot
2023-12-11Merge "Add notes on how to run dEQP with Gfxstream ICD" into mainJason Macnak
2023-12-11Skip solid color layers in CompositorVkJason Macnak
... as a quick fix to avoid aborting. Bug: b/315817323 Test: untested Change-Id: Ia036c464fe75add459b63c5770011ad76746f783
2023-12-11Merge changes I684b6aee,I7202379d,I58ae6655 into mainJason Macnak
* changes: Sort and dedup physical device extensions Use a nested Vulkan Loader when GFXSTREAM_VK_ env var found Reorganize Vulkan Loader library finding
2023-12-11gfxstream: nuke build-host.shGurchetan Singh
Not used. BUG=296903491 TEST=presubmit Change-Id: Id043315ca07f9b11532b862f1c04623732d7df5e
2023-12-11gfxstream: nuke Android.mkGurchetan Singh
Not used. BUG=296903491 TEST=presubmit Change-Id: I3f2bc097c6d84510be9e7a632b1179eb9269d3ac
2023-12-11gfxstream: nuke METADATAGurchetan Singh
ANGLE is no longer in third-party. BUG=296903491 TEST=presubmit Change-Id: Id380ea003716ebe24e79f4ed7bae6660390cb490