and add Android support which uses __android_log_print to
the default callback. This will allow us to eventually build
and run the guest libs in a standalone bazel environment without
Android libs (no "liblog", "libcutils", etc).
Misc notes:
* Updates some cases of ANDROID vs __ANDROID__. The former is
set when building with Soong (either host or guest) while the
latter is set specifically when targeting the Android platform.
Some places that were using ANDROID needed to be fixed to use
__ANDROID__ to properly detect when to use ANativeWindow.
* Updates the EGL platform header to address something similar
to the above where we may want to use X11 display when building
host binaries with Soong where ANDROID may still be defined.
Bug: b/416342919
Test: cd hardware/google/gfxstream
bazel build ...
bazel test ...
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 main 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: I4db669047f3900392d50509c470ea350d94a64ba
... 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
This reverts commit 1cc4e5cfc8.
This is now a "revert^3". So finally removing this API/feature,
and all the associated code that was tracking this in queueSubmit.
As mentioned on chromium review, this was initially added by QNX for
zink+gfxstream-vulkan bring-up on Linux, but sync issues fixed in
Vulkan. This was never a robust API, and doesn't make sense in the
context of the virtio-gpu spec (i.e. for scanout resources).
Test:Linux + Android guests using gfxstream-vulkan-only configs
Change-Id: I9e25f797b27388f78c19b2fb6d979fd803bce60e
Warnings are not very useful to the end users and due to other fence
management issues, there can be too many fences in flight in a valid
way.
Bug: 390538781
Test: -feature GuestAngle
Change-Id: I3a7e0aea728eba8c7f51bd87f1c44e95714d0b60
Some vkGetFenceStatus implementations are sligtly more optimized than
a zero timeout wait, and makes it easier to follow operations in an
API dump.
Bug: 382028853
Test: CI
Change-Id: I33ec3672127591ba7d1b0fccebf6bc9cd1155155
Check if the pending operations are old enough before reporting
warning messages, avoids getting lots of warnings when a lot of
command submissions are done by the guest.
Bug: 382028853
Test: run emulator with -feature GuestAngle, check logs
Change-Id: I40e805400274b2f977801cd1db5090421d283674
Current logic will miss some finished fences that
are queued behind a pending fence, and that could
lead to failure to clean up finished fences, and
later lead to failure to create more fences by GPU.
So a reasonable approach is to just go through
the queue and clean up all the finished fences.
Test: run deqp with -feature GuestAngle on nvidia
GPU + linux; the waitable fence number should not
increase too rapidly.
Bug: 379683411
Change-Id: Id170525a004b67463adf72d307d60b46e91ee378
Useful for syncing against a specific resource. This will only be
applicable to colorBuffer resources.
Add waitSync implementation for ColorBufferVk
BUG=343234676
TEST=gfxstream guest ANGLE + gfxstream guest Zink + end2endtests
Change-Id: I8268f3b3637984f3d4d1cd6127fdd542978790c0
... as the Gfxstream host renderer may launch additional queue
submits to signal these sync objects without the guest knowing.
This is an alternative approach to aosp/2908038. aosp/2908038 deferred
the destruction of these sync objects until VkDevice destruction
time under the assumption that these sync objects are generally
recycled across frames frequently. However, this did not work for
persistant services (SystemUI) nor longer lived apps (CTS) and
would result in continuous build up of open objects which would
eventually cause issues when the nofile limit was reached for the
host process (CtsGraphicsTestCases seemed to peak at ~12k open FDs).
Bug: b/319697090
Test: cts -m CtsDeqpTestCases
--module-arg CtsDeqpTestCases:include-filter:dEQP-EGL.*
on a GCE instance with 4096 nofile limit
Test: GfxstreamEnd2EndTests
Change-Id: I746f4e79fb998c01a90b8da691a1fbcf3f7033d3