Commit Graph

195222 Commits

Author SHA1 Message Date
Gurchetan Singh
d41987eaae gfxstream: connect to the specificied kumquat socket
An multi-threaded test might want:

 - launch multiple kumquats
 - connect each thread to a specific instance
   of kumquat.

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>
2024-09-19 20:06:02 +00:00
Gurchetan Singh
0f7101a5dc gfxstream: guest: plumb descriptor all the way through the HostConnection
A descriptor is an int32_t number.  Anything >= 0
is considered a valid descriptor.  It essentially like
a fd, but it will be used with kumquat testing.

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>
2024-09-19 20:06:02 +00:00
Gurchetan Singh
6785aae717 gfxstream: nuke libplatform stub
This was added for Fuchsia support, and now we have a
dedicated Fuchsia subdir.

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>
2024-09-19 20:06:02 +00:00
Gurchetan Singh
9356a87867 gfxstream: nuke set instance for testing
Not used.

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>
2024-09-19 20:06:02 +00:00
Jean-Francois Thibert
669b530c83 Provided supported formats through gfxstream caps
Includes more complete support for depth formats.

Bug=b:352091996
Test=Ran CTS deqp test cases with cuttlefish

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>
2024-09-19 20:06:02 +00:00
Serdar Kocdemir
7f9783c8f5 Add error messages for unhandled extensions
Print missing structure information before calling abort.

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>
2024-09-19 20:06:02 +00:00
Gurchetan Singh
eb6124d6bf gfxstream: guest: kumquat: fixes in preparation for AOSP Kumquat testing
- API for virtgpu_kumquat_init will change with
  crrev.com/c/5747430
- Better error reporting
- Use paths prefered by AOSP
- Handle emulated sync files via eventfd

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>
2024-09-19 20:06:02 +00:00
sergiuferentz
1befa2975c Adding support for VK_EXT_external_memory_host extension
Supports querying supported memory indexes for host allocations.

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>
2024-09-19 20:06:02 +00:00
Jason Macnak
9164e91ad4 Ensure mesa struct is translated to gfxstream struct on Android
... to avoid aborts due to unbox failures on the host as the
mesa layer was turned back on for Android in aosp/3066068.

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>
2024-09-19 20:06:02 +00:00
Jason Macnak
a883f65ab6 Disable device groups
... by silo'ing each physical device in its own device group.
This unblocks dEQP VK testing until the mesa layer has codegen
to fully translate structs in pNext chains.

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>
2024-09-19 20:06:02 +00:00
C Stout
90c80dc90a [guest] Fix Fuchsia 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>
2024-09-19 20:06:02 +00:00
Gurchetan Singh
c27e611dd9 gfxstream: guest: nuke more AEMU base stuff
Things that missed the last round of deletions.

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>
2024-09-19 20:06:02 +00:00
Gurchetan Singh
7da4dc42ca gfxstream: guest: use MESA_SCOPE_TRACE
- One less dependency on guest/android-emu/
- MESA_SCOPE_TRACE works on Linux guests or via Kumquat
  too, for better performance analysis

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>
2024-09-19 20:06:02 +00:00
Gurchetan Singh
a194a09444 gfxstream: guest: add support VK_FORMAT_A2R10G10B10_UNORM_PACK32 Wayland buffers
vkcube-wayland uses this format on Intel/Linux.

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>
2024-09-19 20:06:02 +00:00
Gurchetan Singh
a3f888d089 gfxstream: host: don't abort when unbox fails
Unboxing fails if a NULL handle is passed in, triggering an abort.

However for vkCmdBeginTransformFeedbackEXT, this is perfectly
valid:

"For each element of pCounterBuffers that is VK_NULL_HANDLE,
transform feedback will start capturing vertex data to byte zero
in the corresponding bound transform feedback buffer."

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>
2024-09-19 20:06:02 +00:00
Gurchetan Singh
b05f3f8e12 gfxstream: guest: vk_CmdBeginTransformFeedbackEXT fix
pCounterBuffers can be NULL, which crashes on the autogen path:

"For each element of pCounterBuffers that is VK_NULL_HANDLE,
transform feedback will start capturing vertex data to byte zero
in the corresponding bound transform feedback buffer."

Need to special case.

     Intel

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>
2024-09-19 20:06:02 +00:00
Gurchetan Singh
96cceac511 gfxstream: guest: make sure signalSemaphoreValueCount is correct
From the Vulkan 1.3.204 spec:

VUID-VkSubmitInfo-pNext-03240

"If the pNext chain of this structure includes a
 VkTimelineSemaphoreSubmitInfo structure and any element of
 pSignalSemaphores was created with a VkSemaphoreType of
 VK_SEMAPHORE_TYPE_TIMELINE, then its signalSemaphoreValueCount
 member must equal signalSemaphoreCount"

Internally, Mesa WSI creates placeholder semaphores/fences (see
transformVkSemaphore functions in in gfxstream_vk_private.cpp).
We don't want to forward that to the host, since there is no host
side Vulkan object associated with the placeholder sync objects.

The way to test this behavior is Zink + glxgears, on Linux hosts.
It should fail without this check.

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>
2024-09-19 20:06:02 +00:00
Gurchetan Singh
97304dffdf gfxstream: guest: nuke unused functions
These functions are not used.

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>
2024-09-19 20:06:02 +00:00
Gurchetan Singh
84941bcbc5 gfxstream: guest: nuke aemu/base/Optional.h
Only seems to be used in the Fuchsia 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>
2024-09-19 20:06:02 +00:00
Gurchetan Singh
109a7b8d54 gfxstream: guest: nuke AndroidLock
Removes dependency on gfxstream::guest's AEMU lock classes.

Mostly consists on Autolock<RecursiveMutex> to
std::lock_guard<std::recursive_mutex>.

There are some cases where the code does:

Autolock<RecursiveMutex> lock(mLock)
..
lock.unlock()
[ do something ]
lock.lock().
..

Those cases were replaced with std::unique_lock.

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>
2024-09-19 20:06:02 +00:00
Gurchetan Singh
5cb32d45a8 gfxstream: vulkan: fix issue with GCC
With newer versions of libstdc++, debug builds of gfxstream
hit this assert:

 0x00007ffff6ed2d60 in std::__glibcxx_assert_fail
(file=<optimized out>, line=<optimized out>, function=<optimized out>,
condition=<optimized out>)
    at /usr/src/debug/gcc/gcc/libstdc++-v3/src/c++11/assert_fail.cc:41
std::allocator<VkDescriptorBufferInfo> >::operator[]
(this=0x555555609380, __n=0)
    at /usr/include/c++/14.1.1/bits/stl_vector.h:1130
(pDescriptorSets=0x7fffffffcc30, descriptorSetCount=2,
bufferInfos=std::vector of length 1, capacity 1 = {...})
    at ../guest/vulkan/gfxstream_vk_device.cpp:718
(device=0x55555562f400, descriptorWriteCount=2,
pDescriptorWrites=0x7fffffffcc30, descriptorCopyCount=0,
pDescriptorCopies=0x0)
    at ../guest/vulkan/gfxstream_vk_device.cpp:746

Use resize instead of reserve + memset.

"That way the vector size would be initialized, bounds checks would
be happy, and default-init would automatically zero out POD structs
for us." -- dextero@

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>
2024-09-19 20:06:02 +00:00
Gurchetan Singh
435102e266 gfxstream: guest: fix kumquat build
... after aosp/3162720

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>
2024-09-19 20:06:02 +00:00
Jason Macnak
b5b592c861 Demote some logs to debug only
... to remove some logspam. Looks like some ALOGVs were converted
to mesa_logi() in aosp/3093240.

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>
2024-09-19 20:06:02 +00:00
Gurchetan Singh
aa4e85ab42 gfxstream: kumquat: unmap memory when needed
Forgot this.

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>
2024-09-19 20:06:02 +00:00
Jason Macnak
f240f5677a Add YUV AHB import and sample end2end tests
... which triggers the device lost failures when aosp/3163776
is reverted.

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>
2024-09-19 20:06:02 +00:00
Jason Macnak
02b45e7e99 Adds AHB import and sampling test
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>
2024-09-19 20:06:02 +00:00
Serdar Kocdemir
e3125c8d2e Add extensions used in test applications
Add VK_KHR_ray_tracing_pipeline and VK_KHR_pipeline_library
extensions support which are used by some test applications.

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>
2024-09-19 20:06:02 +00:00
Gurchetan Singh
3406a65950 gfxstream: guest: start using new vkGetSemaphoreGOOGLE apis
If gfxstream-vulkan host supports these features and
the virtgpu layer is new enough, use the apis.

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>
2024-09-19 20:06:02 +00:00
Gurchetan Singh
538af15956 gfxstream: guest: mBlobId -> mAtomicId
It's a rename so the same concept can be used with sync
descriptors.

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>
2024-09-19 20:06:02 +00:00
Gurchetan Singh
6c0ce98cb0 gfxstream: guest: add experimental fence passing APIs
This uses the new fence passing APIs provided by kumquat.

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>
2024-09-19 20:06:02 +00:00
Gurchetan Singh
a1bdf71d8e gfxstream: guest: add GFXSTREAM_ACQUIRE_SYNC protocol
Guest side needs to check availability of new protocol.

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>
2024-09-19 20:06:01 +00:00
Gurchetan Singh
5524afa1df gfxstream: host: introduce vkGetSemaphoreGOOGLE
New protocol which instructs the host to share sync descriptor
with ExternalObjectManager.

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>
2024-09-19 20:06:01 +00:00
Jason Macnak
7787569b96 Adds helper for tracking command buffers with device lost
... which was useful for debugging b/347288539.

 --gpu_mode=gfxstream_guest_angle \
 --gpu_renderer_features=VulkanCommandBufferCheckpoints:enabled

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>
2024-09-19 20:06:01 +00:00
Aaron Ruby
e5d96bdbac gfxstream: ResourceTracker: Fix bug in return-code check for blob wait
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>
2024-09-19 20:06:01 +00:00
Serdar Kocdemir
3478de8444 Handle all extensions for structure size calculation
Structure size is needed to parse incoming streams correctly.
This avoids emulator crashes when an unsupported extension structure is
used on the guest side.

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>
2024-09-19 20:06:01 +00:00
Gurchetan Singh
3fb873808a gfxstream: guest: simpler get param for kumquat
The real Linux kernel must copy the ioctl struct, while
virtgpu_kumquat does not have to.  For this reason, the
get_param implementations can be different.

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>
2024-09-19 20:06:01 +00:00
Serdar Kocdemir
6e3a5a2334 Show missing extension's name in the abort message
Extensions known in the vulkan header will be displayed with their
names to make debugging easier and the missing feature more visible.

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>
2024-09-19 20:06:01 +00:00
Serdar Kocdemir
bd30892775 Remove empty ifdef blocks after the codegen
Reduce clutter due to extensions related ifdef code block generation
and avoid changing many files when a new extension support is added
with partial functionality.

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>
2024-09-19 20:06:01 +00:00
Gurchetan Singh
dd639c700e gfxstream: guest: fix useless return statement
Oops.

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>
2024-09-19 20:06:01 +00:00
Gurchetan Singh
aed7f4c79c gfxstream: linux guest: support client-side blob allocations
This makes Linux guests create color buffers blobs and
buffer blobs, in response to dedicated image and buffer
requests from the guest.  This is only done in Linux guests
for now.

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>
2024-09-19 20:06:01 +00:00
Gurchetan Singh
303191b81e gfxstream: host + guest: bump up version of the protocol
This reports the new host side capabilities (the ability to
make exportable color buffer blobs) back to the guest.
This feature is only used with experimental Linux guest
support in gfxstream.

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>
2024-09-19 20:06:01 +00:00
Gurchetan Singh
a5788932c9 gfxstream: guest: enable virtio-gpu kumquat
This uses libvirtgpu_kumquat_ffi.so to send commands to the
Kumquat Media Server.  The implementation of Kumquat is found
at crrev.com/c/5645904.

This is a more complex, but more fully featured end-to-end testing
framework.  This biggest benefit it is can run complex apps (vkcube,
gfxbench + ANGLE/Zink) on Linux, without a VM or a full Android tree.
The rutabaga FFI path -- which relied on a nested Vulkan loader -- didn't
work for complex apps and funkiness was observed with the nested
Vulkan loader.

Plus, app 1 + app 2 could connect Kumquat at the same time.

This may also benefit snapshot tests, particular since end to end
flow relies on external blob.  For example, a snapshot save command
could actually call stream_renderer_teardown(..) on the host-side,
while the guest retains it's state (ASG mappings + vulkano mappings).

A snapshot restore would actually call stream_renderer_init(..)
+ stream_renderer_restore(..), which an actual upstream VMM would
do.

Another additional benefit is multi-context testing.  Since
libvirtgpu_kumquat_ffi.so is portable, other libraries (minigbm)
can also call it.  We can mimic the cross-domain context allocating
via libminigbm.so, while context libgfxstream_vulkan.so imports the
file descriptor.

This change only transitions the meson build since the main goal
is once again is Linux on Linux testing w/o an Android tree.

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>
2024-09-19 20:06:01 +00:00
Yahan Zhou
d02b246fbc Revert^2 "Add snapshot support for vkBindImageMemory2"
This reverts commit e43734cb0fa4e938f6ca43a01ed82d5921ad3f0d.

Reason for revert: have a real fix in aosp/3151746

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>
2024-09-19 20:06:01 +00:00
Yahan Zhou
1c3c0886f1 Fix Vulkan snapshot with -guest-angle
We did a few things here.

1. Update VkBindImageMemoryInfo in vkBindImageMemory2 for snapshot. In
   its implementation, vkBindImageMemory2 sometimes replaces an unboxed
   VkImage handle with a new one, which breaks snapshot. We update its
   value so that it can map to the proper one when calling snapshot
   functions. Note that there is a const cast which we might want to fix
   later.
2. Lock it properly when calling createExtraHandlesForNextApi.
3. Add support for more VkImage format. Fix mipmap extend calculation.

Now it works with -guest-angle but fails with VVL, not sure why.

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>
2024-09-19 20:06:01 +00:00
Gurchetan Singh
9ec275e10b Revert "Add snapshot support for vkBindImageMemory2"
This reverts commit 58934c4400e20934ef3172aab1a5ebefaa08e786.

Reason for revert: Breaks meson build
Same issue has aosp/3141746

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>
2024-09-19 20:06:01 +00:00
Gurchetan Singh
05371b2451 gfxstream: don't define hasDedicatedImage + hasDedicatedBuffer multiple times
Every guest OS uses it (Linux, Android, Fuchsia).  Probably we
should clean up/merge logic further.

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>
2024-09-19 20:06:01 +00:00
Yahan Zhou
7b9c9a1b3c Add snapshot support for vkBindImageMemory2
The pattern of vkBindImageMemory2 doesn't really fit with what we have
in the auto-code generator. Thus we need to implement a special entry
for it in the code generator. In future we might want to split the code
and directly write c++ code for similar APIs.

Note that due to complexity we only support vkBindImageMemory2 with
bindInfoCount == 1, for now.

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>
2024-09-19 20:06:01 +00:00
Serdar Kocdemir
96b42bdbee Remove direct usages of MoltenVK library functions
These APIs and the related extension are deprecated in favor of the new
metal_objects extension to make sure the loader can intercept them, so that the layers, such as VVL, would work fine.
Removes necessity to load functions directly from a separate dylib.
VK_MVK_moltenvk extension support is still passed to the guest side
due to the existing checks for enabling the AHB extension.

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>
2024-09-19 20:06:01 +00:00
Gurchetan Singh
a7fdf81103 gfxstream: guest: support blobCmd + blobCmdSize
This is useful for trying to hook into gfxstream's
ColorBuffer handlers, without creating shadow guest
memory associated with RESOURCE_CREATE_3D.

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>
2024-09-19 20:06:01 +00:00
Gurchetan Singh
7dca2000ad gfxstream: guest: add XCB Surface support
This is needed to run X11 apps via libvulkan_gfxstream.so

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>
2024-09-19 20:06:01 +00:00