Remove printf usages. Also reduces the severity of error for unimplemented
displayvk::clear call.
Bug: 389637419
Test: CI
Change-Id: If3de85fc910d1c7e1e10a1292bf02d26be0b8801
.. to unify with other usages over the data and indicate the intent
better.
Bug: 389646068
Test: CI
Change-Id: I0d0c2f05020bbd86728abdbfebb5084b1112b657
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
Refactors Gfxstream's ASG to hide ASG internals (context init, ring
buffer, ring config, etc) from external use. The ASG consumer interface
is updated to only take the shared memory pointers as arguments and then
all of the internal ASG context / ring initialization should happen
inside of `RingStream`. This requires a little bit of refactoring
around `onUnavailableRead()` to move the unavailable read count and
to move the setting of the `asg_context::host_state` into `RingStream`.
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 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: I43cc8e55ec4ded3071c22e2cfce6fab930262a17
Moves several of the "common/base" classes to host/backend as these
classes all used `Stream` which is a host only 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 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: Ia664776c2322b310614f632e4926bb3b031f3bc1
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
... alongside the rest of the Gfxstream host 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 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: I5db79bd3f7f6e8d776a34696f0fde3b3ef66627e
Consolidates the second copy of opengl headers into common/opengl
and fixes some targets which were transitively relying on headers
via gl-host-common.
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 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: Id6a651b746bb36da04650f62dc8c0ae7e01989cb
... 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
FeautreSet is a large structure with lots of strings, better
to not copy around unnecessarily.
Bug: N/A
Test: build
Change-Id: I604b4ad7af01f222b54dcda4cd2299e350324f50
Without waiting for the `RenderThread`s to complete,
`RenderThread::resume()` might destroy `mStream` before
or during use `RenderThread::loadSnapshot()`.
Setting the `waitForSave` to false was a carry over from
aosp/2824962 where some allowances were made for the end2end that
did fake snapshoting. The snapshot end2end tests were removed
to do fundamental limitations with faking VM functionality
so this `waitForSave` is no longer needed and can be completely
removed.
Bug: b/397503985
Test: snapshot with Cuttlefish
Change-Id: If252466e677a985e9ee3bde2b35d53ac2ebda759
We expose the global egl lock to synchronize the followiing
scenarios where we have observed deadlocks:
- Nvidia seems to have registered some cleanup code
(pthread_key_create) that has a race condition against other
threads calling vkDestroyDevice. So this workaround synchronizes
the RenderThread exit with vkDestroyDevice calls.
- Nvidia also seems to have a deadlock between vkDestroyDevice
and eglMakeCurrent.
Also add addtional protection around eglSwapBuffers.
Bug: 377677250
Test: Run dEQP with Nvidia GPU. Observe no hang/crash.
Change-Id: I570c14671cb8cdc79f8a1b3b1077a1f7c13d28fe
Make readColorBufferToBytes calls safer by providing the size of
the destination buffer. Old unsafe version is kept with maximum
size value to allow backwards compatibility.
Bug: 378779335
Test: presubmit, run on Mac
Change-Id: Idcadecda7642bdb45be65c7f0908fd7925c152fa
Breaks meson build. Two issues:
1) It requires a new API from AEMU base, which for the
meson build doesn't work since it likes to keep working
with AEMU v0.1.2
2) The logging facade itself is too QEMU 2.12 centric. Upstream
QEMU and crosvm's logging handlers are hooked into
stream_renderer_{error, warn, info}, example:
https://github.com/qemu/qemu/blob/master/hw/display/virtio-gpu-rutabaga.c#L933
So VERBOSE shouldn't be AEMU anyways if you want a generic
host-side logging facade.
BUG=317816825
TEST=meson build
Change-Id: I659e10d8b2920b6478043df0ba5fff80ada05b1d
Enable verbose logging on gfxstream with ANDROID_EMUGL_VERBOSE.
Use existing logging functions for common vulkan operations.
Bug: 349563520
Test: build and run with ANDROID_EMUGL_VERBOSE=1
Change-Id: I56270fc104a278af8a5c06c86394966cc38f99ab
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
... which will allow building Gfxstream from a fixed version of
AEMU for the purposes of packaging.
Bug: b/326648397
Test: cvd start --gpu_mode=gfxstream
Test: cvd start --gpu_mode=gfxstream_guest_angle
Change-Id: I8ac1622428f0194997597868bef49118bcc3ea90
This allows:
meson -Ddecoders=vulkan
to build without errors. This is useful for enviroments where
GLES does not exist (Fuchsia) or where importing the entire
gfxstream GLES decoder is undesirable.
BUG=31148679
TEST=compile
Change-Id: I59e385c205588a4dbbe472fac1681ebe261127dc
In RendererImpl::~RendererImpl, we have the following indirect call stack:
* teardownGlobalVkEmulation
* FrameBuffer::~FrameBuffer
* FrameBuffer::finalize
* RenderWindow::~RenderWindow
Triggers FrameBuffer::finalize indirectly by sending the finalize
command
* RendererImpl::~RendererImpl
However, teardownGlobalVkEmulation shouldn't be called until
mCleanupThread has exited, because we may have queued Vulkan objects
cleanups on that thread by calling
FrameBuffer::registerProcessCleanupCallback in on_vkCreateInstance, and
the clean up may depend on the global Vulkan emulation object.
Test: build
Change-Id: I667f2685dd9dc5749244844a3259e51a3250de7b
... and avoid setting invalid PUIDs in rcSetPuid() to avoid lots of
"Failed to find process owned resources fpr puid" errors.
After aosp/2752873, the host GlProcessPipe stopped initializing a unique
id for the process pipe. However, it continued to communicate the value
of the `m_uniqueId` back to the guest. The guest still uses PUID for
rcSetPuid commands in the guest EGL/GL implementations. This would
result in garbage PUIDs being used by RenderThreads for
getProcessResources() calls. Further, if a guest process used both
EGL/GL and Vulkan, getProcessResources() would return nullptr and then
the host would crash when the VkDecoder tried to read the seqnoPtr in
the process resources.
Bug: b/312560224
Test: cvd start --gpu_mode=gfxstream
Change-Id: Ie3697a7588a8d2180ccc9e7f02f38ed6d9f1bd12
The test creates an instance, saves and loads it, to make sure it does
not crash.
In end2end snapshot tests, we do not have a real guest system. Thus
snapshot can only test the host part. To make it work we will need to
skip render thread and stream snapshots, and reuse all render channels
created before snapshots.
We also added APIs to ask render thread not to wait for snapshots, and
sync up with FrameBuffer after snapshot loads.
It runs with cuttlefish.
Bug: 294277842
Test: GfxstreamEnd2EndVkSnapshotBasicTest
Change-Id: Ibea5d9830f0e927e7dbe3552ed31ad901b5397ab
... so that previous tests fully clean up before the next tests
start up.
Bug: b/292257025
Test: atest --host GfxstreamEnd2EndTests
Change-Id: I038512f85c6573d337fef5ce9292c1f27c4821ea