vulkan_gfxstream.h contains custom protocols not found
in vk.xml (vk_gfxstream.xml).
gfxstream_vk_entrypoints.h is codegen by Mesa common code,
and it does not accept the custom XML.
So avoid generating implementations for them:
guest/vulkan_enc/gfxstream_guest_vk_autogen_impl/gen/func_table.cpp:5321:1:
note: declare 'static' if the function is not intended to be
used outside of this translation unit
5321 | void gfxstream_vk_CollectDescriptorPoolIdsGOOGLE(
| ^
| static
fatal error: too many errors emitted, stopping now [-ferror-limit=]
Reviewed-by: David Gilhooley <djgilhooley.gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38632>
The root cause is "Add initial Vulkan Base support", which refactors
Vulkan versions into smaller features (base + graphics + compute).
Not sure if this is the cleanest solution, but someone needs to
refactor gfxstream codegen anyways.
There's also can issue with VkRenderingArea.
Fixes: 61c71733c8 ("vulkan: update spec to 1.4.330")
TEST=libgfxstream_vulkan.so + gfxstream_backend.so (host) commpiles
with new changes
Reviewed-by: David Gilhooley <djgilhooley.gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38153>
... to allow sharing perfetto global flow ids between guest and host
so that combined traces can have an arrow between the guest and host
render threads to aid debugging.
Test: Capture guest and host trace and inspect in perfetto UI
Reviewed-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37410>
vk dispatch in mesa provides the redirection for this. Also, other
recent changes have increment the minimium host requirement for
gfxstream-vk to VK_VERSION_1_1, anyways.
Reviewed-by: Gurchetan Singh <gurchetansingh@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36942>
... and defer getDeviceQueue impl to vk_common and trim down impls in
gfxstream.
gfxstream advertises, and selects queues/queueFamilies from what the
real device on the host advertises. During createDevice(), it needs to
allocate the queue objects to support this.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36227>
When `VkFramebufferCreateInfo::flags` has
`VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT`,
`VkFramebufferCreateInfo::pAttachments` should be ignored.
Test: cvd create \
--gpu_mode=gfxstream_guest_angle_host_swiftshader \
--gpu_renderer_features="VulkanSnapshots:enabled"
Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35580>
... as VkSnapshotApiCallInfo* is a pointer into a
std::vector<VkSnapshotApiCallInfo> which can be invalidated during
multi threaded VK usage when the std::vector<> is resized.
Test: bazel test common/end2end:gfxstream_end2end_tests \
--graphics_drivers=gles_angle_vulkan_swiftshader \
--test_arg="--gtest_filter=*MultiThreadedResetCommandBuffer*VulkanSnapshots*" \
--test_arg="--gtest_repeat=100" \
--test_output=streamed
Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35416>
The logic is implemented on the guest side as we need special handling
for swapchain and device memory handle types.
Memory handles for coherent memory allocations on the guest can map into
a single handle on the host side, which makes it infeasible to pass
through the extension functions with handle remapping. Swapchain handles
are not passed to the host driver, so we need to keep a separate table
for them as well. Instead of separating the logic based on the handle
type, we manage all the private data set/get calls on the guest side
without encoding the commands to the host.
Test: dEQP-VK.api.object_management.private_data.*
Test: dEQP-VK.wsi.android.swapchain.private_data.*
Reviewed-by: Marcin Radomski <dextero@google.com>
Reviewed-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35323>
vkGetDeviceImageMemoryRequirements can be used to get memory
requirements without creating an actual image and we should apply the
same image modifications based on the create info when returning the
memory requirements.
Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35323>
Sparse resources are not commonly available on Android devices
and overriding the functions enables the host to disable the
feature support when needed.
Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35323>
Add conditioning before making driver calls to be
able to workaround some of the fatal errors, such
as unboxing issues during or after snapshot load.
This enables invalidating a host dispatcher based
on the application state. A default error will be
returned for vulkan calls.
Builtin expectation function is used to reduce
performance cost of the checks.
Reviewed-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34418>