Commit graph

206363 commits

Author SHA1 Message Date
sergiuferentz
de3361d050 gfxstream: intercept vkCmdClearColor(...) and do linear->SRGB conversion
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>
2025-06-04 17:24:23 +00:00
Serdar Kocdemir
fd40649768 gfxstream: Fix compiler warnings
.. for some unused function arguments.

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>
2025-06-04 17:24:22 +00:00
Serdar Kocdemir
3ade950b6f gfxstream: Fix codegen for the moved logging.h file
Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35323>
2025-06-04 17:24:22 +00:00
Serdar Kocdemir
68e42404b7 gfxstream: Implement private data extension
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>
2025-06-04 17:24:22 +00:00
Bo Hu
b6c5a548ad gfxstream: [vulkan snapshot]: update codegen for vkUpdateDescriptorSetWithTemplateSized
Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35323>
2025-06-04 17:24:22 +00:00
Bo Hu
b951324606 gfxstream: [vulkan snapshot]: update codegen to handle failed api calls
Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35323>
2025-06-04 17:24:22 +00:00
Serdar Kocdemir
4253e5789a gfxstream: Adjust allowed device extensions
To include VK_KHR_dynamic_rendering for shader_object
tests on dEQP. Also enable timeline_semaphore extension
on Android since some of the known issues are already
fixed and the extension is promoted to 1.2 core.

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>
2025-06-04 17:24:22 +00:00
sergiuferentz
f839e321b8 gfxstream: Remove MEMORY_HANDLE_OPAQUE_FD support from Guest to fix suballocation dEQP tests
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>
2025-06-04 17:24:21 +00:00
Bo Hu
786bd1c6f2 gfxstream: [vulkan snapshot]: update to support vkCmdCopyBuffer
Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35323>
2025-06-04 17:24:21 +00:00
Jason Macnak
eea41d1f86 gfxstream: Update codegen license
Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35323>
2025-06-04 17:24:20 +00:00
Serdar Kocdemir
33ba95cb0c gfxstream: Track vkGetDeviceImageMemoryRequirements on host
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>
2025-06-04 17:24:20 +00:00
Bo Hu
4340dfb400 gfxstream: [vulkan snapshot]: update codegen for vkCmdBindPipeline
Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35323>
2025-06-04 17:24:20 +00:00
Jason Macnak
e7826d89a7 gfxstream: Update GfxApiLogger namespace and header file
... to parallel the changes in ag/33517750.

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35323>
2025-06-04 17:24:20 +00:00
Serdar Kocdemir
dae39cd278 gfxstream: Reduce log level on AHB allocation
Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35323>
2025-06-04 17:24:19 +00:00
Bo Hu
464c2e35b8 gfxstream:: update code gen for vkResetCommandPool
Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35323>
2025-06-04 17:24:19 +00:00
Jason Macnak
afab126947 gfxstream: Update gfxstreaml vk xml location
Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35323>
2025-06-04 17:24:19 +00:00
Serdar Kocdemir
ad5f1ed77e gfxstream: Mark VK_KHR_ray_tracing_pipeline dispatch only
VkStridedDeviceAddressRegionKHR structure cannot be correctly
serialized. Update codegen to not use marshalling.

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35323>
2025-06-04 17:24:19 +00:00
Jason Macnak
3331752323 gfxstream: Remove old include
... no longer needed after the aemu -> gfxstream changes.

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35323>
2025-06-04 17:24:18 +00:00
Jason Macnak
c0c10744fd gfxstream: Update codegen for aemu -> gfxstream stream interface
Bug: b/403363880

Test: cd hardware/google/gfxstream
      mma

Test: cd hardware/google/gfxstream
      mkdir build && cd build
      cmake .. -G Ninja
      ninja

Test: meson setup \
        -Ddefault_library=static \
        -Dgfxstream-build=host \
        build

      meson compile -C build

Test: cd <emu master dev repo>
      cd external/qemu
      python android/build/python/cmake.py --gfxstream

Test: cd <emu main next repo>
      prebuilts/bazel/linux-x86_64/bazel test \
      --platforms=@//build/bazel/platforms:linux_x64 \
     @gfxstream//...

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35323>
2025-06-04 17:24:18 +00:00
Bo Hu
3df2a0c061 gfxstream: update sudbdecode snapshot code
Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35323>
2025-06-04 17:24:17 +00:00
Jason Macnak
524d9b0647 gfxstream: Update codegen after many aemu -> gfxstream changes
Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35323>
2025-06-04 17:24:17 +00:00
Jason Macnak
711606dff4 gfxstream: Update codegen to use gfxstream_common_base
... after ag/32953937.

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35323>
2025-06-04 17:24:17 +00:00
Serdar Kocdemir
5a5810d2f0 gfxstream: Use logging functions for call tracing
Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35323>
2025-06-04 17:24:16 +00:00
Joshua Duong
9bc395fca4 gfxstream: VkDecoder: break from seqno logic when puid dies.
Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35323>
2025-06-04 17:24:16 +00:00
Jason Macnak
30fd362ca7 gfxstream: Update iostream header
Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35323>
2025-06-04 17:24:15 +00:00
Serdar Kocdemir
9ba070a398 gfxstream: Track sparse image related functions
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>
2025-06-04 17:24:15 +00:00
Jason Macnak
1d4b4fe8b7 gfxstream: Update to new logging
Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35323>
2025-06-04 17:24:14 +00:00
Martin Krastev
f1f684ffa7 svga/ci: return svga piglit job to automatic rules pool
Make svga piglit job extend from vmware automatic (non-manual) rules pool
again. There was an issue with local nginx caching of FDO artifacts, which
led to jobs sporadically timing out on their http-download sections; the
issue has been resolved now.

Signed-off-by: Martin Krastev <martin.krastev@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35341>
2025-06-04 17:04:34 +00:00
Lionel Landwerlin
978933c015 nir/opt_algebraic: extend lowering for (i|u)bitfield_extract
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35334>
2025-06-04 16:28:39 +00:00
Antonio Ospite
9f65081e02 ci/android: use curl -O to avoid having to specify the same filename again
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35126>
2025-06-04 15:43:42 +00:00
Antonio Ospite
dc1502af2e ci/android: use newer cuttlefish images
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35126>
2025-06-04 15:43:42 +00:00
Antonio Ospite
088a4b0e23 ci/android: configure both hard limits and soft limits
The soft limits cannot go above the hard limits values, so the hard
limits should be configured too, just in case default limits values set
by the kernel or the init process are too small.

E.g. when booting with `init=/bin/sh` we have:

$ cat /proc/1/limits
Limit                     Soft Limit           Hard Limit           Units
...
Max open files            1024                 4096                 files
...

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35126>
2025-06-04 15:43:42 +00:00
Antonio Ospite
859e903004 ci/android: skip org.skia.skqp.SkQPRunner#UnitTest_SurfaceResolveTest
Skip `org.skia.skqp.SkQPRunner#UnitTest_SurfaceResolveTest` when running
the `android-angle-android-cts` job, as it fails sporadically.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35126>
2025-06-04 15:43:42 +00:00
Antonio Ospite
0a8fec6c6d ci/android: skip org.skia.skqp.SkQPRunner#UnitTest_BulkTextureRectTest
Skip `org.skia.skqp.SkQPRunner#UnitTest_BulkTextureRectTest` when running
the `android-angle-android-cts` job, as it sometimes fails with memory
related issues.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35126>
2025-06-04 15:43:42 +00:00
Guilherme Gallo
cf6f97a224 ci/android: reduce launch_cvd memory limit to 4GB by default
We only have 8GB on the Brya Chromebook used for venus testing, and the
job is unstable because using all the available RAM causes OOM kills.

So reduce launch_cvd memory limit to 4GB by default, still allowing to
change the default by setting the CUTTLEFISH_MEMORY variable in jobs
that might want a different value.

This change has been inspired by CROSVM_MEMORY, but a new variable is
used because technically cuttlefish can also use qemu in some setups,
not only crosvm.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35126>
2025-06-04 15:43:41 +00:00
Guilherme Gallo
769a4aa34e ci/android: disable errexit in trap function
Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35126>
2025-06-04 15:43:41 +00:00
Guilherme Gallo
16754dbd13 ci/android: Add gitlab section for logs uploads
Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35126>
2025-06-04 15:43:40 +00:00
Guilherme Gallo
bfca9fbbb3 ci/lava: SSH tweaks
Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35126>
2025-06-04 15:43:40 +00:00
Antonio Ospite
b16ed16d75 ci: set up XDG_RUNTIME_DIR to be under /tmp which is tmpfs
Set up XDG_RUNTIME_DIR path to be under /tmp.

This might improve speed as /tmp is under tmpfs while the older path
might have been under NFS.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35126>
2025-06-04 15:43:40 +00:00
Ashley Smith
c5500cd12f mesa: Add support for GL_EXT_shader_realtime_clock
This is similar to ARB_shader_clock

Signed-off-by: Ashley Smith <ashley.smith@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34345>
2025-06-04 14:49:00 +00:00
Antonio Ospite
47619ef538 ci/android: silence mesa error about //.cache
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Pass XDG_CACHE_HOME=/data/local/tmp to binaries that load mesa
libraries to avoid the following message on the stderr:

  Failed to create //.cache for shader cache (Read-only file system)---disabling.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35335>
2025-06-04 13:25:21 +00:00
Antonio Ospite
bdcdfe8b33 ci/android: show also the device name when printing GLES and VK info
This can give an indication in the logs about what driver is being
picked up.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35335>
2025-06-04 13:25:21 +00:00
Antonio Ospite
76a73ba263 ci/android: get only the first device from eglinfo and vulkaninfo
It is possible that `eglinfo` and `vulkaninfo` provide info on multiple
devices.

Consider only the first device, which is going to be the default one
used by other components, when checking the versions.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35335>
2025-06-04 13:25:20 +00:00
Antonio Ospite
e12aa9a49e ci/android: fix printing the original GLES and Vulkan versions
New mechanisms to retrieve the GLES and Vulkan driver versions have been
introduced in

  - 3029fdde65 (ci/android: Switch to using eglinfo to check GLES implementation, 2025-05-28)
  - 3ba9038648 (ci/android: Check Vulkan driver using vulkaninfo, 2025-05-28)

These mechanisms are more robust than the previous one but they do
change the behavior in that the version is not retrieved by an already
running process (e.g. SurfaceFlinger), but by creating new processes
that load the libraries available on the filesystem.

Because of this change of behavior the original version should be
printed **before** pushing the new libraries to the Android guest, so
that developers are able to compare the old and new versions in the logs.

Moreover, the runtime checks do not answer the original question anymore:

  "what GLES/VK libraries is surfaceflinger currently using?"

but rather new question:

  "what GLES/VK libraries are services going to use when they load?"

So the shell start/stop can very well performed after the version check,
accompanied by a new check on the PID of SurfaceFlinger to be sure that
it has reloaded consequently picking up the new libraries.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35335>
2025-06-04 13:25:20 +00:00
Erik Faye-Lund
57b04e8dfd mesa/main: fix enum errors
This enum shouldn't be allowed in GLES before version 3.1

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35097>
2025-06-04 12:44:18 +00:00
Erik Faye-Lund
bba7f7d586 mesa/main: fix error-handling for gles1/2
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35097>
2025-06-04 12:44:17 +00:00
Erik Faye-Lund
89d5447ea6 mesa/main: fix multisample enum checks
These needs proper extension checks on GLES.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35097>
2025-06-04 12:44:17 +00:00
Erik Faye-Lund
5a5ce75a63 mesa/main: correct error-checks for GL_TEXTURE_2D_MULTISAMPLE_ARRAY
This enum is only valid on GLES when OES_texture_storage_multisample_2d_array
is supported.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35097>
2025-06-04 12:44:17 +00:00
Erik Faye-Lund
8d97f5d77e mesa/main: add _mesa_has_texture_multisample-helper
This reduces the number of places we need to keep track of what
extensions enables this functionality.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35097>
2025-06-04 12:44:16 +00:00
Erik Faye-Lund
214fd4e40d mesa/main: fix texture view enum checks
These were a bit of a mixed bag; we had some open-coded cases, and a few
overly permissive code-paths. Anyway, let's stricten this up a bit.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35097>
2025-06-04 12:44:16 +00:00