8 Commits
Author SHA1 Message Date
Jason Macnak b001c743d3 Update non interface parts of Gfxstream to use new base lib
NO_IFTTT=existing field covered with type change

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//...
Change-Id: I6bfb2c4ef8368799d9f99f6293d9762b7dcb4c7f
2025-05-01 16:29:17 +00:00
Jason Macnak a43dfa9f3c Add gfxstream host logging lib
... to eventually replace the existing host-common/logging. This
is needed to break up the circular dependency between aemu-base and
aemu-host-common, so that we can move parts of aemu-base and
aemu-host-common into hardware/google/gfxstream, in order to make
Gfxstream a self contained library for building.

Hooks up the existing host-common/logging via the
RenderLibImpl::setLogger() call.

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//...

Change-Id: Id52c6f756f85d0a5fb948601228234d7a84a14c2
2025-04-09 13:11:08 -07:00
Serdar Kocdemir 5aa3fef2d8 Log number of boxed handles
.. at the end of instance destroy to help ag/32748051
and identify leaked handles.

Bug: 389637419
Bug: 383272733
Test: CI
Change-Id: Ie993b3380404e33c2f7c7f7824e9c779da6bf33a
2025-03-31 10:49:28 -07:00
Bo Hu ba1e69b77b BoxedHandleManager: fix corner case where there is no replay handles
Test: launch vulkan app, destroy it; save snapshot; load
it should not crash during dequeue empty queue

Change-Id: I4b461c84d2274c1e908a02db01bebb92b8988e1a
2025-03-17 18:29:02 -07:00
Jason Macnak e5f1a09f08 Move BoxedHandleManager func impls to .cpp file
Bug: n/a
Test: cvd create --gpu_mode=gfxstream_guest_angle_host_swiftshader
Change-Id: Ifdc2ab3da31f206f7b6f97c202405ba2fe3792cf
2025-02-25 14:59:43 -08:00
Jason Macnak 5024b2a12d Add GUARDED_BY annotation to BoxedHandleManager
... , use std::mutex, and make member variables private.

Bug: b/383139165
Test: cvd create --gpu_mode=gfxstream_guest_angle_host_swiftshader
Change-Id: Icba06bbafc92eb551599baad887b816ca4a5607d
2025-02-25 08:08:39 -08:00
Jason Macnak e4fcbcadf9 Replace boxed handle preprocessor usage with template functions
... as dealing with the preprocessor is a PITA when trying to add
some simple code for debugging. The preprocessor usage also does
not play nicely with references in code search.

Bug: b/369615058
Test: cvd create --gpu_mode=gfxstream_guest_angle_host_swiftshader
Change-Id: I295a66de3545a5f5a53697111c613b4844f96a0c
2025-02-25 08:08:39 -08:00
Jason Macnak 587ad8ebdd Cleanup boxed handle and unboxed handle functions
* Move a lot of the existing stuff into new VulkanBoxedHandles.[cpp|h]

* Removes the pass-through functions so that instead of
  <global func> ->
  <VkDecoderGlobalState::func> ->
  <VkDecoderGlobalState::Impl::func>
  there is now just <global func>

* Further cleanups of VkDecoderGlobalState would allow hiding the
  BoxedHandleManager entirely and only the global funcs could be
  exposed.

Bug: b/369615058
Test: cvd create --gpu_mode=gfxstream_guest_angle_host_swiftshader
Change-Id: I12b00e6c1e742d7f1e1003852c7dfb7963bd91c4
2025-02-25 08:08:39 -08:00