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>
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 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>
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>
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>
... 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>
This commit updates vk.xml and code generator to make them backward
compatible. The updates in code generator includes:
1. Parse "protect" properly.
2. Ignore "optional" if the "optional" was added in newer vk.xml.
- This is done by having an extra table for related fields.
3. Parse latexmath properly.
4. Parse "supported" properly.
5. Skip parameters and members if they are not for Vulkan API.
6. VkNativeBufferANDROID diverged from upstream, keep the old one.
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 need separate virtio-gpu capabilities for this features, for
separate versioning. As of right now, versioning is done via
rcGetHostExtensionsString, which calls rcGetGLString host side.
We should probably aim for separate versioning for GLES, Vulkan,
Magma -- with the possibilty of a common decoder agnostic values
for ASG.
The benefit of the virtio-gpu capabilities is they are also cached
per VM instance, so probably a bit faster than the
rcGetHostExtensionsString method.
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>
After the move, various fixes are needed.
- Need to re-order directories in top-level meson file
- Need to add certain include dirs
- Use internal Vulkan headers. These unforunately define
Android extensions even on Linux guests, so we need a
(LINUX_GUEST_BUILD) guard until we can fix 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>