Commit graph

535 commits

Author SHA1 Message Date
Gurchetan Singh
b5f91ed589 gfxstream: emit global state wrapped decoding for vkCmdEvent
Helpful for gfxstream-on-lavapipe.

Test: launch_cvd --gpu_mode=gfxstream_guest_angle_host_lavapipe

Reviewed-by: David Gilhooley <djgilhooley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41306>
2026-05-04 19:49:52 +00:00
Serdar Kocdemir
4ac60d221f gfxstream: some cleanup on device extension allow list
Remove duplicated items, use KHR version of vertex attrib divisor
extension, re-enable VK_KHR_16bit_storage.

Test: CI

Reviewed-by: David Gilhooley <djgilhooley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41306>
2026-05-04 19:49:52 +00:00
Serdar Kocdemir
117f3cb1fc gfxstream: allow VK_KHR_maintenance extensions
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Add latest maintenance extensions required by Android Vulkan
requirements, except VK_KHR_maintenance5 which enables dynamic rendering
on ANGLE and causes issues with some cuttlefish targets.

Test: CI

Reviewed-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41210>
2026-04-27 18:57:43 +00:00
Serdar Kocdemir
e8773b96df gfxstream: Add VK_EXT_pipeline_protected_access
Test: dEQP-VK.protected_memory.*
Test: dEQP-VK.pipeline.monolithic.image.dedicated_allocation.*
Test: dEQP-VK.api.info.get_physical_device_properties2.features.*

Reviewed-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41210>
2026-04-27 18:57:43 +00:00
Gurchetan Singh
c6b3fc6930 gfxstream: fix string array marshalling
This is a follow-up to:

   - commit e27e41a8 ("vulkan,spirv: update headers")
   - commit c4cecd9d ("gfxstream: cereal: fix 'None' in gfxstream codegen")

The second commit fixed compile, but still produced a
crash on the host side:

$0 __memcpy_evex_unaligned_erms () at ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:833
$1 0x00007f116f8ee285 in memcpy (__dest=0x7f0d258cd340, __dest@entry=0x7f0ed55e9458, __src=0x7f0e78072ff7, __src@entry=0x72795f61, __len=1920556897)
   at prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.17-4.8/sysroot/usr/include/x86_64-linux-gnu/bits/string3.h:51
$2 gfxstream::host::vk::VulkanStream::loadStringInPlaceWithStreamPtr (this=this@entry=0x7f0e78022b50, forOutput=forOutput@entry=0x7f0d97fff018,
   streamPtr=streamPtr@entry=0x7f0ed55e9458) at hardware/google/gfxstream/host/vulkan/vulkan_stream.cpp:100
$3 0x00007f116f8ee3de in gfxstream::host::vk::VulkanStream::loadStringArrayInPlaceWithStreamPtr (this=0x7f0e78022b50, forOutput=<optimized out>,
   streamPtr=0x7f0ed55e9458) at hardware/google/gfxstream/host/vulkan/vulkan_stream.cpp:122
$4 0x00007f116f9f2fcb in gfxstream::host::vk::reservedunmarshal_VkDeviceCreateInfo (vkStream=vkStream@entry=0x7f0e78022b50,

Fix up lenAccess string marshaling to prevent this.

TEST=launch_cvd --gpu_mode=gfxstream_guest_angle_host_swiftshader

Reviewed-by: David Gilhooley <djgilhooley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41059>
2026-04-20 15:46:58 +00:00
Serdar Kocdemir
4c3e8fbc02 gfxstream: add gitignore for generated code
Test: ./generate-gfxstream-vulkan.sh
Reviewed-by: David Gilhooley <djgilhooley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41059>
2026-04-20 15:46:58 +00:00
Bo Hu
1a0fe4e8bb vk-snapshot: do not generate code to save vkQueueFlushCommandsGOOGLE
It is transient action, no need to save and load.

Reviewed-by: David Gilhooley <djgilhooley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41059>
2026-04-20 15:46:58 +00:00
Bo Hu
b54429c031 codegen: update scripts/cereal/decoder.py
sync with 5b148d70cc

m_queueSubmitWithCommandsEnabled(
             m_state->getFeatures().VulkanQueueSubmitWithCommands.enabled()),

Reviewed-by: David Gilhooley <djgilhooley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41059>
2026-04-20 15:46:58 +00:00
Gurchetan Singh
f92cfe9a74 gfxstream: additional Goldfish logic for Android builds
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Goldfish needs a non-stub QEMU pipe stream and access
to the goldfish_sync device.

All of this logic may be deleted once qemu over
virtio-gpu is fully enabled.

TEST=run meson2hermetic + m vulkan.ranchu

Reviewed-by: Bo Hu <bohu@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40851>
2026-04-11 01:11:45 +00:00
Jason Macnak
bc848da244 gfxstream: fix goldfish guards on fence functions
... to ensure that "mSyncHelper->close()" still happens on
non goldfish devices.

Android equivalent ag/39315505 for b/500332164

Tested with CtsGraphicsTestCases after the build file changes.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40836>
2026-04-08 00:21:15 +00:00
Gurchetan Singh
c4cecd9d19 gfxstream: cereal: fix 'None' in gfxstream codegen
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Commit e27e41a842 ("vulkan,spirv: update headers") exposed a
flaw in the cerealgenerator.

It modified -- among other things -- the VkDeviceCreateInfo
struct in vk.xml.

In the update, the len="enabledLayerCount,null-terminated"
attribute was removed from the ppEnabledLayerNames member.

The gfxstream code generator processes ppEnabledLayerNames
(which is a const char* const*), it identifies it as an "array of
strings". However, because the len attribute is now missing,
vulkanType.getLengthExpression() returns None.

This leads to errors like:

gfxstream_guest_vk_autogen_impl/gen/goldfish_vk_counting_guest.cpp:642:30:
error: use of undeclared identifier 'None'

     642 |     for (uint32_t i = 0; i < None; ++i)
         |                              ^~~~
   1 error generated.

This patch adds various length access checks to prevent this from
happening.

TEST=m vulkan.ranchu

Reviewed-by: David Gilhooley <djgilhooley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40785>
2026-04-06 08:19:04 -07:00
Jason Macnak
cabc55e9a5 gfxstream: fix submit to not hold lock when calling into encoder
... as this can lead to a deadlock with the following sequence:

Time1: guest-thread-1: vkDestroyImageView() called
Time2:                 VkEncoder grabs seqno 1

Time3: guest-thread-2: vkQueueSubmit() called
Time4:                 ResourceTracker::on_vkQueueSubmitTemplate() locks
                       mLock for using `info_VkFence`
Time5:                 ResourceTracker::on_vkQueueSubmitTemplate() calls
                       enc->vkQueueWaitIdle()
Time6:                 VkEncoder grabs seqno 2
Time7:                 VkEncoder sends the vkQueueWaitIdle with seqno
                       2 via ASG to host
Time8:                 VkEncoder waits for the `VkResult` from the
                       host via `stream->read()`

Time9: guest-thread-1: VkEncoder calls sResourceTracker->destroyMapping()
                       ->mapHandles_VkImageView((VkBuffer*)&buffer);
                       which calls
		       ResourceTracker::unregister_VkImageView()

                       ResourceTracker::unregister_VkImageView() tries to
                       lock mLock to erase the info struct

!!! DEADLOCKED HERE !!!

guest-thread-1 is stuck waiting on mLock (currently locked by
guest-thread-2) before it would `stream->flush();` to finishing
sending the vkDestroyImageView() command to the host and potentially
ping its corresponding host-render-thread-1.

guest-thread-2 is stuck waiting on the result from host-render-thread-2
but host-render-thread-2 won't progress until host-render-thread-1
finishes seqno 1 which needs guest-thread-1 to finish sending/pinging.

Android equivalent change ag/39258728 for b/498964194

Test: cvd create --gpu_mode=gfxstream_guest_angle_host_swiftshader
      open maps
      pan/zoom/etc for a couple minutes

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40767>
2026-04-02 20:20:52 +00:00
utzcoz
bf8862b49f gfxstream: Fix vkSetDebugUtilsObjectNameEXT crash for unwrapped objects
Mesa's vk_common_SetDebugUtilsObjectNameEXT assumes every Vulkan object
handle is a pointer to a vk_object_base struct. In gfxstream, only a
subset of objects (instance, device, queue, command buffer, command pool,
buffer, fence, semaphore) carry a Mesa wrapper. All other non-dispatchable
handles (shader modules, pipelines, render passes, etc.) are opaque host
handles that are not valid pointers.

Passing such an unwrapped handle to the common path causes it to be cast
to a vk_object_base pointer and dereferenced, resulting in a SIGSEGV
(null-pointer dereference at offset 0x40).

Override the function in the gfxstream driver to store debug names on
vk_object_base for wrapped objects and return VK_SUCCESS for unwrapped
objects.

Fixes: 7b50e62179 ("gfxstream: mega-change to support guest Linux WSI with gfxstream")
Test: Verified with hellovk (with validation layers) on Android Emulator - no crashes.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40712>
2026-03-30 17:47:45 +00:00
Gurchetan Singh
32bd3a6e4e gfxstream: simple compile fix
Fixes:

hardware/google/gfxstream/guest/OpenglSystemCommon/HostConnection.h:32:
external/mesa3d/src/gfxstream/guest/platform/include/VirtGpu.h:132:40:
    error: implicit conversion changes signedness: 'unsigned int' to
           'const int32_t' (aka 'const int') [-Werror,-Wsign-conversion]

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40492>
2026-03-25 17:33:56 +00:00
Gurchetan Singh
53706931bc gfxstream: fixes to get Fuchsia headless to compile
The prior version of gfxstream-fuchsia featured an Android compat
layer, and only worked with Goldfish.  The compat layer was
deleted a while ago.

The Fuchsia Goldfish integration was deleted here:

https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33050

since the Fuchsia emulator itself uses a frozen version of the
library.  This goes further in that direction: deleting leftovers
of the Fuchsia Android compat layer, which used provided VK
dispatch.

This allows Fuchsia + gfxstream to build via meson2hermetic, with
the a few additional common core patches applied.

Reviewed-by: David Gilhooley <djgilhooley@gmail.com>
Reviewed-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40442>
2026-03-17 16:25:53 +00:00
Gurchetan Singh
792184b83f gfxstream: add vulkan_gfxstream_structure_type.h to codegen output
It is an output.  Useful for meson-to-bazel conversion, where
Bazel happened to spot this.

Reviewed-by: David Gilhooley <djgilhooley@gmail.com>
Reviewed-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40442>
2026-03-17 16:25:53 +00:00
Gurchetan Singh
bc6bedf0a4 gfxstream: meson: remove duplicate includes
Both inc_guest_iostream and inc_platform_virtgpu were used
twice in the same include_directories array.

Reviewed-by: David Gilhooley <djgilhooley@gmail.com>
Reviewed-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40442>
2026-03-17 16:25:53 +00:00
Gurchetan Singh
7eaa1bb96c gfxstream: explicitly assign INVALID_DESCRIPTOR
Sometimes, it's used with fds (int32_t), sometimes with
gem_handle (uint32_t).  Be consistent and explicitly cast
when needed.

Reviewed-by: David Gilhooley <djgilhooley@gmail.com>
Reviewed-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40442>
2026-03-17 16:25:53 +00:00
Jason Macnak
c3ce55ff21 gfxstream: Fix StagingInfo destruction ordering
Encoders contain a reference to the stream so those should be
destructed first.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39330>
2026-03-04 23:45:40 +00:00
Jason Macnak
5dd52846ec gfxstream: enable VK_EXT_primitives_generated_query
... as this is a needed extension for ANGLE To enable GLES 3.2.

Test: cvd create --gpu_mode=gfxstream_guest_angle on Nvidia

Reviewed-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40045>
2026-02-23 17:41:30 +00:00
Gurchetan Singh
ea5d69eb52 gfxstream: fix build after vk.xml update
This is a backport of f134cc5a1e:

("Update <type category="funcpointer"> schema to simplify")

in vulkan-docs, essentially.  It changed things about how vk.xml
is parsed.

Fixes: b30f780c ("vulkan: update spec to 1.4.340")

Reviewed-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39502>
2026-01-26 18:25:51 +00:00
Gurchetan Singh
9c511a1fa5 gfxstream: fixes related to -Wmissing-prototypes
- the vkSetDebugMetadataAsyncGOOGLE command should
  not have an entry in the function table: it
  leads to missing prototype errors

- Make gfxstream respect cpp_msvc_compat_args, since
  it is a C++ project.  -Wmissing-prototypes will be
  made a cpp error *eventually*.

Reviewed-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39418>
2026-01-23 18:06:01 +00:00
Serdar Kocdemir
9ef6ed5531 gfxstream: Add VK_EXT_frame_boundary support
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Also add codegen for VK_EXT_blend_operation_advanced

Test: dEQP-VK.api.frame_boundary.*

Reviewed-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39360>
2026-01-20 20:27:10 +00:00
Jason Macnak
7dfb009601 gfxstream: Reland "Remove unnecessary tag to simplify perfetto trac..."
Reason for reland: relanding with fix

Reviewed-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39360>
2026-01-20 20:27:10 +00:00
Jason Macnak
bf55e43f30 gfxstream: Reland "Add Vulkan func/structs for passing debugging da..."
Reason for reland: relanding with host side fix

Reviewed-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39360>
2026-01-20 20:27:10 +00:00
Sharjeel Khan
01bd71788d gfxstream: [C++23] Fixes for C++23 issues
C++23 removed certain transitive includes so you need to add C++ headers
directly to utilize their functions and classes. We add cstdlib header
for abort.

Errors:
external/mesa3d/src/gfxstream/guest/vulkan_enc/goldfish_vk_counting_guest.cpp:9505:13:
error: use of undeclared identifier 'abort'
 9505 |             abort();

Test: m vulkan.ranchu

Reviewed-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39360>
2026-01-20 20:27:10 +00:00
Gurchetan Singh
adec216eb0 meson,gfxstream: add Android support via meson2hermetic
Previously, there were no meson.build rules for the Android
portion of gfxstream_vk, since nobody builds gfxstream_vk + Android
via the Android NDK.

Using Soong (and not the Android NDK) is an absolute requirement,
since Android Virtual Devices (AVDs) were amongst to fully
transition to Soong over Android makefiles, leading to
breath-taking and exhilarating build speeds.

The meson build rules that do exist works are designed for
gfxstream_vk + Linux.  That leads to higher maintainence
costs: maintaining hand-written Android.bp files for Android,
and meson.build for Linux.

Enter meson2hermetic.  With this tool, meson.build becomes the
source of truth, and Android.bp are generating automatically,
reducing maintainence costs.

But for this to work, the portion of gfxstream_vk that didn't
have meson build rules needs them.  This patch does this
and there are two things to note:

1) gfxstream_vk + Android needs dependencies that don't have
any pkg-config files, and exist only with the AOSP tree.
These include things like:

   - libqemupipe.ranchu
   - libOpenglCodecCommon
   - libgralloc_cb.ranchu
   - renderControlEncoder

Most of these dependencies support the Goldfish AVD, and will
be deleted over time as the that emulator transitions to
virtio-gpu.  There are more generic Android deps too, like
"android_base".

Generic Android dependencies are given the prefix "android-",
while Goldfish (a.k.a Android Emulator) is given the prefix
"android-aemu-".

The ability to use dependencies that don't have a direct
Linux-distro style analogue is the one of motivators
meson2hermetic.

2) There's a special "gfxstream_emulated_android" case.  This
is for the GfxstreamEnd2EndTests target, which uses the code
defined here:

- src/gfxstream/guest/android/ANativeWindowEmulated.cpp
- src/gfxstream/guest/android/GrallocEmulated.cpp

This is used by Gfxstream Github for CI/CD.

Acked-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39279>
2026-01-20 17:17:58 +00:00
Aaron Ruby
ab01793281 gfxstream: Partial revert of "gfxstream: revert "gfxstream: Add Vulkan func/structs for passing debugging data to host""
i.e. A revert^2 of 8f8bc7ca3b, to undo the
revert in cerealgenerator.py.

It needs to track latest file-naming in upstream host gfxstream:
https://github.com/google/gfxstream/blob/main/host/common/include/gfxstream/host/process_resources.h

Reviewed-by: Gurchetan Singh <gurchetansingh@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39241>
2026-01-09 22:50:18 +00:00
Gurchetan Singh
147ba7b1ae gfxstream: filter VkPhysicalDeviceProperties2 structs before encoder call
Otherwise, the following crash is observed on the host:

"Unhandled Vulkan structure type Unhandled VkStructureType [1000010002], aborting"

which corresponds to PHYSICAL_DEVICE_PRESENTATION_PROPERTIES_ANDROID.

We shouldn't be sending those structs down to the host.  Don't
post-process vkGetPhysicalDeviceProperties2, pre-process it to
filter the guest-only structs.

Reviewed-by: David Gilhooley <djgilhooley.gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39205>
2026-01-08 08:02:37 -08:00
Gurchetan Singh
f29a905ab6 gfxstream: explicitly list Python dependencies for gfxstream codegen
This helps Meson track when dependencies are modified.  If they
are modified, running ninja -C actually re-generates the code.
Beforehand, this was not the case and contrary to the user
expectation.

Reviewed-by: David Gilhooley <djgilhooley.gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39205>
2026-01-08 08:02:37 -08:00
Gurchetan Singh
933cb74c25 gfxstream: drm_fourcc.h --> drm-uapi/drm_fourcc.h
That's the include path that is provided by "inc_include".

Reviewed-by: David Gilhooley <djgilhooley.gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39205>
2026-01-08 08:02:37 -08:00
Serdar Kocdemir
593998ad6c gfxstream: Enable VK_EXT_blend_operation_advanced
Test: dEQP-VK.pipeline.blend.advanced.*

Reviewed-by: David Gilhooley <djgilhooley.gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39205>
2026-01-08 08:02:36 -08:00
Andrew Sinclair
89ffdf8c5a gfxstream: revert "gfxstream: Remove unnecessary tag to simplify perfetto trace config"
Breaks emulator 26Q1 release.

Reviewed-by: David Gilhooley <djgilhooley.gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39205>
2026-01-08 08:02:36 -08:00
Andrew Sinclair
8f8bc7ca3b gfxstream: revert "gfxstream: Add Vulkan func/structs for passing debugging data to host"
Breaks emulator 26Q1-release.

Reviewed-by: David Gilhooley <djgilhooley.gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39205>
2026-01-08 08:02:36 -08:00
Aaron Ruby
22a19b306e gfxsteam: Support QNX-native swapchain in host codegen
Reviewed-by: Gurchetan Singh <gurchetansingh@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39177>
2026-01-06 16:39:49 +00:00
Gurchetan Singh
bb17ad3f08 gfxstream: fix warning
Fixes:

DrmVirtGpuBlob.cpp:46:21: warning: comparison of integer
    expressions of different signedness: ‘uint32_t’
    {aka ‘unsigned int’} and ‘int’ [-Wsign-compare]

Reviewed-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39161>
2026-01-05 18:47:21 +00:00
Jason Macnak
d1ea08738a gfxstream: Remove unnecessary tag to simplify perfetto trace config
Test: capture guest + host trace

Reviewed-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39161>
2026-01-05 18:47:21 +00:00
Jason Macnak
462e73ce1c gfxstream: Add Vulkan func/structs for passing debugging data to host
... and send data on connection creation.

Test: cvd create --gpu_mode=gfxstream_guest_angle
      and go/cuttlefish-tracing to grab perfetto trace

Reviewed-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39161>
2026-01-05 18:47:21 +00:00
Dmitry Baryshkov
4315c28739 gfxstream: don't dump genvk.py args to generated files
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Full command lines include full path to the output file, which triggers
reproducibility warnings (e.g. in Yocto builds). Drop the args and print
only a basename of the script used to generate the file.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38875>
2025-12-18 18:52:19 +00:00
Yonggang Luo
be4ad5c819 meson: Remove VK_ICD_FILENAMES totally from source tree.
This is a follow up of
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28516

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@google.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com> hk changes
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> for RADV changes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38637>
2025-12-10 14:46:11 +00:00
Gurchetan Singh
4f45e834ae gfxstream: fix logspam in TLS helper function
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Logspam has been reported in a gfxstream initialization
path.

Fixes: 4a30c6fd70 ("gfxstream: Use the Mesa common tss_* TLS helper functions")
Cc: mesa-stable

Reviewed-by: David Gilhooley <djgilhooley.gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38776>
2025-12-03 09:12:21 -08:00
Gurchetan Singh
15983e6d0d gfxstream: more fixes for missing prototypes
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Fixes things like:

GfxStreamVulkanMapper.cpp:45:10:
error: no previous prototype for function 'chooseGfxQueueFamily'[-Werror,-Wmissing-prototypes]

Reviewed-by: David Gilhooley <djgilhooley.gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38751>
2025-12-01 14:07:18 -08:00
Yonggang Luo
168042fb05 gfxstream: os_set_option can be used on windows now
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@google.com>
Reviewed-by: Antonio Ospite <antonio.ospite@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38640>
2025-11-27 18:22:34 +00:00
Yonggang Luo
0a32d5e6fd treewide: Use regexp to replace usage of setenv with os_set_option.
setenv\((.*), 1\);
=>
os_set_option($1, true);

setenv\((.*), 0\);
=>
os_set_option($1, false);

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Antonio Ospite <antonio.ospite@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38640>
2025-11-27 18:22:34 +00:00
Yonggang Luo
1825715623 treewide: Use regexp to replace usage of unsetenv with os_unset_option.
unsetenv\((.*)\);
=>
os_unset_option($1);

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Antonio Ospite <antonio.ospite@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38640>
2025-11-27 18:22:33 +00:00
Yonggang Luo
6356efc4e0 gfxstream: Use os_get_option_dup(VK_DRIVER_FILES)
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
As the return value os_get_option should be immediately consumed.

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38687>
2025-11-27 10:20:52 +08:00
Yonggang Luo
d668c0ad42 gfxstream: Use VK_DRIVER_FILES instead of VK_ICD_FILENAMES as VK_ICD_FILENAMES is deprecated for a while.
This is a prepare for remove VK_ICD_FILENAMES in source tree.

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38687>
2025-11-27 10:20:48 +08:00
Gurchetan Singh
4f9d7c3385 gfxstream: codegen: don't generate custom protocols in function table
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>
2025-11-25 09:12:15 -08:00
Gurchetan Singh
169f571f4f gfxstream: delete createImmutableSamplersFilteredImageInfo
This function is not used.

Reviewed-by: David Gilhooley <djgilhooley.gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38632>
2025-11-25 09:12:10 -08:00
Gurchetan Singh
b6df034363 gfxstream: make functions static when needed
Fixes errors like:

ResourceTracker.cpp:62:6: error: no previous prototype for function 'zx_handle_close'
                          [-Werror,-Wmissing-prototypes]

Reviewed-by: David Gilhooley <djgilhooley.gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38632>
2025-11-25 09:12:06 -08:00