Wrappers are used to generate host and guest variants of
modules. Thus, modules allow differentiation between guest
and host codegen, which wrappers do not.
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
It would be great if we could get the moduleName from
a moduleType, but couldn't determine how it's done.
So just create a tuple.
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
We accidentially changed the xml definition for
vkQueueSignalReleaseImageANDROID. As a result it changed its encoding
and decoding, which breaks Android emulator when launching old system
images (API level 29~32).
To fix this, we overwrite it with the old definition so that it keeps
using the old encoding/decoding.
Note that API 33+ uses vkQueueSignalReleaseImageANDROIDAsyncGOOGLE which
does not have this problem.
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
Major changes:
- remove QemuPipeStreamFuchsia
- reinstate processPipeDoInit() for initSeqno(), but skip the rest
- revamp the .gn build file
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
... which helps to enable building a Gfxstream VK ICD which runs
the host server in-process and can be used for testing with
regular apps (so things outside of the End2End tests). This also
helps to minimize the amount of the things that the End2End tests
are configuring.
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
Partial revert of 650c0c033aceede8f1eb6088c9fe7fbceba1c34b.
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
Probably "Make GL header lib and update libs to explicitly
depend on it" broke the meson build.
In file included from ../renderControl_enc/renderControl_types.h:19,
from ../renderControl_enc/renderControl_client_proc.h:8,
from ../renderControl_enc/renderControl_client_context.h:6,
from ../renderControl_enc/renderControl_enc.h:9,
from ../vulkan_enc/../OpenglSystemCommon/HostConnection.h:25,
from ../vulkan_enc/ResourceTracker.cpp:19:
../OpenglCodecCommon/glUtils.h:46:10: fatal error: GLES/gl.h: No such file or directory
Long term, we should nuke renderControl and GL dependencies through
compile options (GOLDFISH_NO_GL) for example.
ninja -C amd64-build
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
This modifies gfxstream to use standard Vulkan headers,
and updates to 1.3.269.
Previously, the headers were mostly standard, but added in
vk_android_native_buffer into vulkan_core.h. That breaks down
when using auto-gen scripts from outside gfxstream, which will
happen in a subsequent patchset.
For vk_native_buffer_android, we can simply provide a
vk_android_native_buffer_gfxstream.h.
Long-term, vk_native_buffer_android.h should be deprecated in
favor of VK_ANDROID_external_memory_android_hardware_buffer, in
Android's libvulkan and elsewhere.
For the Vulkan headers, the new procedure is generate them in the
directions found here in the following repos:
https://github.com/KhronosGroup/Vulkan-Headershttps://github.com/KhronosGroup/Vulkan-Hpp
Those headers can be copied over using cp. For gfxstream encoder
+ decoders, that's still generated via ./generate-gfxstream-vulkan.sh
The only catch is you must use the same vk.xml for Vulkan-Headers,
Vulkan-Hpp, and for the cereal generator. The recommended flow
is use whatever the xml is in Vulkan-Headers ToT and copy to
Vulkan-Hpp and cerealgenerator.py before running those scripts.
The End2End tests that relied on vk_android_native_buffer were
also modified. Long-term, the AHB extension could be used
instead of ANB for tests.
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
In newer versions of vk.xml, VK_EXT_host_image_copy also
provides vkGetImageSubresourceLayout2EXT. Autogen for
VK_EXT_host_image_copy fails without VK_KHR_maintainance5.
For some reason, onGenCmd(..) for vkGetImageSubresourceLayout2EXT
is requires VK_EXT_host_image_copy. This goes back into reg.py
in vulkan-docs.
Interestingly, the Android's libvulkan doesn't use
vkGetImageSubresourceLayout2EXT, nor does it check for
VK_EXT_image_compression_control before using it.
https://android-review.googlesource.com/c/platform/frameworks/native/+/2016419
Thus, we can have VK_EXT_host_image_copy provide the function.
Maybe we can revert this if the function isn't used by libvulkan
aswell.
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
Simpler version of the generate-vulkan-sources.sh
script.
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
We shouldn't autogenerate this header, since it's a forked header
specific to gfxstream.
Plus, this particular extension is disabled in the Vulkan anyways,
and used between Android libvulkan <--> ICD only.
We should just call it "vk_android_native_buffer_gfxstream.h" to
avoid namespace conflicts.
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
This adds custom the cereal generator as an option to genvk.py
gfxstream specific options like "-registryGfxstream" are also
added.
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
The newest version of Vulkan docs doesn't have this, and it
needs to be patched in.
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
This imports the cereal generator into the next gen
Vulkan docs.
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
This is based on 463f8c ("Change log for October
20, 2023 Vulkan 1.3.269 spec update").
Right now, the current version of vulkan-docs seems to
be 2021. Need to update. Import here without
modifications so we can track the changes that were
needed to support cereal.
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
This reverts commit e5040938cd3947d0efaa287b2a509b879bee56bb.
Add special handling for kCapsetNone: return a device that was created
with any capset.
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
This reverts commit e08334cde39bbb8142caf42e716a5e11f772ce1a.
Reason for revert: breaks dEQP testing b/309836674
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
This allows complex process names such as "com.android.systemui"
and "android.hardware.graphics.composer3-service.ranchu" to be
be the debug name via the virtio-gpu interface.
This uses the CONTEXT_INIT ioctl to pass through the name. Due
to TASK_COMM_LEN and the fact we initialize many times using
"RenderThread", the process name wasn't always propagated through
before.
This is useful for debugging and a host composition flow as well.
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
- There is a bug in the wait implementation.
- We should not send VK_IMAGE_LAYOUT_MAX_ENUM to host.
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
dEQP-VK.wsi.android.maintenance1.* becomes flaky (instead of hard
failure) after the fix.
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
We shouldn't have been trying to run the tests in the first place
but vkGetPhysicalDevice*Properties was returning true for these
handles even on Android.
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
Note: nVidia has a driver bug with vkGetPrivateData. But swiftshader
works fine.
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
- Fix aemu_logging pkg-config dependency after
aosp/2754786
- Fix path to virtio-gpu-gfxstream-renderer.h after
aosp/2755688
- Fix dependencies on <GL/gl.h> in both guest and host
builds.
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
The big giant Vulkan singleton might have an underlying
implementation. However, it's unlikely we'll have more than
impl since it it's pretty giant. Nuke ResourceTracker::Impl
to reduce the number of layers one must traverse to modify
things.
Since this was mega-change, clang-format was also applied.
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
... upcoming changes will add promote the emulated virtio gpu
stack as a proper platform backend which will include the
SyncHelper.
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
Try to do most of the work in SetupInstance.
vulkaninfo Linux guest
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
Use the previously mentioned GetRingParamsFromCapset function.
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
Every capset provides ASG ring metadata. Have a function for
that.
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
In case the guest starts asking for them. Will likely be added in
the future.
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
We couple everything as one giant gfxstream capset, and also have
a renderControl path for versioning.
Long term, it makes sense to nuke renderControl path (which controls
many legacy GLES bits) and rely on a virtgpu-style versioning scheme
[each context type gets it's one capset].
Some capability sets are experimental. For example, GFXSTREAM_COMPOSER.
However, Fuchsia for example does rip out parts of HostConnection
and use in it's display controller. Probably have a cross-platform
API that performs that functions would a long-term clean solution.
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
This commit rewrites vkQueueSubmit as a template so that the
implementation can be used by vkQueueSubmit and vkQueueSubmit2.
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
... so that upcoming end2end tests can mock out AHBs.
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
... so that upcoming end2end tests can use the GL/VK ICDs.
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
... to avoid conflicts with
hardware/google/gfxstream/include/render-utils/IOStream.h
when the guest is built for the host
for end2end tests.
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
... to avoid conflicts when the guest is built for the host
for end2end tests.
In the future, the differences between libandroidemu and
hardware/google/aemu/base/ should be consolidated and there
should be a single shared library as there isn't really
anything guest/host specific about either of these copies.
cvd start --gpu_mode=gfxstream_guest_angle_host_swiftshader
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
... so that upcoming end2end tests can set up a mock impl for
emulating sync fds in single process tests.
cvd start --gpu_mode=gfxstream_guest_angle_host_swiftshader
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>