To be used in Vulkan composition on macOS.
Bug: 389646068
Test: -feature GuestAngle, VulkanNativeSwapchain
Change-Id: I17bf1392c838d14f1eab5b307c5d0e77dea99b0d
... to allow sharing perfetto global flow ids between guest and host
so that combined traces can have an arrow between the guest and host
render threads to aid debugging.
Bug: b/440065361
Test: Capture guest and host trace and inspect in perfetto UI
Change-Id: Id1c34dbee40c8febc9730479d1daed37722fcd09
There is currently a problem of missed setevent
and that leads to wait event hangs, or queue becomes
not able to idle, no matter how long it is waited upon.
To solve this problem, this cl follows each event's set,
reset, and save the set status into snapshot.
Later one, during loading, it recovers their set status,
so that subsequent cmd event wait can continue.
specifically, the following steps are taken:
1, set and reset operations from host or
in the queue are tracked.
2, if an event is set, that status will be saved
into snapshot; later during loadiing, the set operation
will be set again from the host or in the same queue
before snapshot.
This is not complete, but it is a first step
to resolve some of the timeout issue.
TODO:
event2
Test: xr should not hang during save due to
queue gets blocked (vkQueueSubmit does not return,
or wait for fence times out)
Bug: 417788798
Change-Id: I991cccfb2f34c6189f6c0759b8abbb365b695719
Improve readability of the code by removing some of the
unnecessary parentheses in the generated code.
(regen auto generated code)
Bug: 329094533
Test: CI
Change-Id: I8c29b49cb58310c70820421e1fd3abea8bd00a92
Avoid nullptr from zero-size allocations being passed
into the copy functions, which is causing UB errors.
(regen auto generated code)
Bug: 329094533
Test: CI
Change-Id: I9d5a76f58585449d333ce56539e877ecb47c63e6
... as VkSnapshotApiCallInfo* is a pointer into a
std::vector<VkSnapshotApiCallInfo> which can be invalidated during
multi threaded VK usage when the std::vector<> is resized.
Bug: b/422483825
Test: bazel test common/end2end:gfxstream_end2end_tests \
--graphics_drivers=gles_angle_vulkan_swiftshader \
--test_arg="--gtest_filter=*MultiThreadedResetCommandBuffer*VulkanSnapshots*" \
--test_arg="--gtest_repeat=100" \
--test_output=streamed
Change-Id: I8ea16eea8792b11056d6d7f17e370f9aa045406c
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.
Bug: 406456167
Test: dEQP-VK.memory.requirements.create_info.image#regular_tiling_linear
Change-Id: I9176dcc13e467653533cf9434bd2673de05efd63
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
.. after recent changes on the build script due to xml file
location change.
Bug: 417150515
Test: CI
Change-Id: I04b2e40778fc8f2c832a4c9204a411fe9895dd08
Includes a small change to keep using MTLResource_id
which actually didn't make it into the spec.
A typo fix in vulkansc_raii.hpp
Fixes on end2end tests for vulkanhpp changes.
Change to enable comparison operators on handles even when
the spaceship operator is available, to avoid errors on
old compilers where they are not generated.
Bug: 417150515
Test: CI
Test: dEQP-VK.api.info.vulkan1p2
Test: atest GfxstreamEnd2EndTests
Change-Id: Ic9b9256541dde50b77c4d6d63d277bc222a64157
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
VkDecoder's seqno logic may get stuck if a guest process dies and
some vk commands don't make it over to the host.
Bug: 410069267
Test: CtsGraphicsTestCases
Change-Id: Ibcf3996ca6a681e1f734c943281b112506bab7ad
Disabling sparse binding feature support requires extra changes
on functions like vkGetPhysicalDeviceSparseImageFormatProperties
behavior.
Bug: 407982047
Test: CI
Test: dEQP-VK.draw.*
Change-Id: I45256ba3adae65a0ffd3eb930150d50312d4dd73
... as this is a host-only impl header and not part of the public
Gfxstream 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//...
Change-Id: I23d12d7ab4106ae5aa6c6a9fdf164bb644356580
... 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 function crashes randomly on XR emulator on linux with
AMD GPUs and avoiding multithreaded operations seems to be a
good workaround until the underlying issue, or the driver bug
is fixed. Since the call is expected to be called rarely, we
don't limit this to aemu or amd.
Bug: 401005629
Bug: 373601997
Test: run XR emulator 20 times, play videos on chrome
Change-Id: Id11eff65b8a2ef33618d903e4499b4856a05209f
Adds validity conditioning before making driver calls
to be able to handle some fatal errors later on.
Bug: 383272733
Test: CI
Change-Id: Ie9898aeb9f15ad5388ee9db21559233eb43b5053
... to addresss variable shadowing warnings and handle the 2 global
commands that do not require a dispatch.
Bug: b/399867568
Test: build
Change-Id: Ie8b02e99de934e22a3549bc6ad103c6ac7edb276
vkSignalSemaphores and vkWaitSemaphores calls will require special
handling for virtual queue mode to avoid hangs on singal-after-wait
cases. This CL implements a pass through version of the calls without
making any extra intervention or state tracking.
Bug: 398986781
Test: CI
Change-Id: I85d4a70c222b48b0aea727786152ab492de6b600
... and fix up include paths.
Bug: b/369615058
Test: cvd create --gpu_mode=gfxstream_guest_angle_host_swiftshader
Change-Id: Ia407b250ae10ff1d9dc99fff32099aca61219d09
... since `BoxedHandleManager` should, well, manager the handles.
This simplifies `VkDecoderGlobalState` a little bit and should also
allow us to remove a bunch of functions that no longer need to
depend on `VkDecoderGlobalState`.
Bug: b/369615058
Test: cvd create --gpu_mode=gfxstream_guest_angle_host_swiftshader
Test: cvd snapshot_take --force \
--auto_suspend \
--snapshot_path=/tmp/snapshot1
Test: cvd reset -y
Test: cvd create --snapshot_path=/tmp/snapshot1
Change-Id: I9d52a12a2fe1e7394259fff0c25075fd50c7cfca
Add vkGetFenceStatus and vkWaitForFences functions to the
global state tracking list for the host.
This CL only implements the entry points for the functions
and should work the same as the non-intercepted versions.
Bug: 388691356
Test: run vulkan apps, presubmit
Change-Id: Ifdc919e77ae2fd9d46fdb0ff4a806f9dbfe2c28b
Track pipeline layout creation and destroy calls
to cleanup them correctly on device teardown.
Pipeline layouts require delayed delete operations for
VulkanQueueSubmitWithCommands feature which modifies order
of commands and they need to stay valid during recording.
Bug: 342343008
Test: run and shutdown gltfviewer with VVL
Change-Id: I465a8e3f6ed7e621470f32cdb7cda91ec3dcbba6
Previously, we missed the case where there is no vulkan
call, and ended up with some un-cleaned ApiCallInfo
clogging the entity manager
Bug: 370344466
Change-Id: I56f0261e12b6750036686962179fd5862261a249
... so that `VkDecoderGlobalState` can append additional information
needed for snapshotting. Specifically, `VkDecoderGlobalState` may create
additional boxed handles that are not visible directly in the API surface.
For example, `vkCreateDevice()` creates boxed handles for the `VkQueue`-s
and `vkCreateDescriptorPool()` creates boxed handles for pre-allocated
`VkDescriptorSets`. These boxed handles are not recoverable from the API
for `vkCreateDevice()` nor `vkCreateDescriptorPool()` directly. This was
previously worked around by just sticking the extra boxed handles in
`VkReconstruction::mExtraHandlesForNextApi` but this is not thread safe.
Instead, let's give `VkDecoderGlobalState` and `VkDecoderSnapshot` exclusive
access to individual `VkSnapshotApiCallInfo` objects.
Bug: b/383139165
Test: cvd create --gpu_mode=gfxstream_guest_angle_host_swiftshader
Change-Id: I158b12d38584ca964af841e77d1d58a9f6901613
Removes the additional saving of opcode and packet len as this is
all available from within the packet itself.
Removes the "trace" position from `VulkanMemReadingStream` as these
seemed to only be used for getting the packet start and packet size
but these are already available.
Bug: b/383139165
Test: cvd create --gpu_mode=gfxstream_guest_angle_host_swiftshader
Change-Id: I2842c866a0bf10d117a8908fa6a0a94c4b83ac53
Original change from: [email protected] at aosp/3310239
Moving the change into gfxstream and codegen.
The issue was found by [email protected].
Note that vkReadStream's BumpPool is effectively `freeAll`'ed by
`clearPool` calls. The same call for vkStream is not being called
while alloc is called here and there.
Bug: N/A
Test: manual
Change-Id: I478d0ea51c3a73211a3a3a78d3d02a035acab994
Rerun code generator and implement passthrough versions
of the wrapper functions that'll be used later for multiple
queue emulation support.
Bug: b/327230380
Test: presubmit
Change-Id: I8e2c5042d5205fd942ed3f4a18670355debdc9ad
Add missing alias for the vkCmd function to the vk.xml to be
able to use it correctly at the host side decoder and subdecoder.
Bug: 357829977
Test: dEQP-VK.dynamic_state.monolithic.line_width.
Change-Id: If81e932ae9527eab8d0b09e2c3446f2f4c526bc6
With Mesa in the Emulator manifest, all Google projects
can just run codegen from that directory.
It has a deeper Git history, but the biggest win of the
dual upstream strategy is it only implies two levels
of synchronization:
1) mesa -> AOSP mesa (doable via Skia autorollers, other teams do
it)
2) AOSP main -> mesa (doable by a rotation of even long-term Gitlab
CI bot)
(2) depends on the volume of commits, which data indicates is
5/per month maybe.
BUG=374306378
TEST=CI
Change-Id: I667e2b4518837326c13cbac4af6d6d2ea7402112
With recent mesa related changes, we started using a recent version of
vk.xml and this promoted extension was being used as EXT in our codegen
scripts. This resulted in some code loss, skips on pNext chain of
commands sent from the guest side and eventually CTS/dEQP failures.
Updating vulkan headers partially with this change to accomodate KHR
version of the extension correctly.
Bug: b/357832421
Test: dEQP-VK.api.info.vulkan1p2_limits_validation*
Change-Id: I53fbb2742a846dbce55080deb46f5e4fd46e6c11
* changes:
Revert^3 "Signal the fence after color buffer copying"
Revert "Use the right wait object on queue submit"
Revert "Fix sync issue with fence in queue submit"
Recent tornado over the codegen and mesa code removals resulted in
some incorrect revert operations and we lost some code. This CL
brings back custom decoding of some fence operations.
Although we actually start using the new codepath, it's still failing
on some deqp tests, and a partial/full revert might be necessary.
Bug: 357832421
Test: presubmit
Change-Id: Ia21674c0c6ab8b7e945cc9b801c301241912ca16