Android Hardware Buffers can be created with mip levels and
the mismatch is causing errors when importing vulkan images.
Bug: 406456167
Test: CtsNativeHardwareTestCases
Change-Id: I3634bd400574453bf4ff123c149cb5f95409a42f
When using vulkan composition with guestangle, color buffers will
only be stored in vk targets and this will enable taking screenshots.
Current version only support the most common formats with no snipping.
Bug: 389646068
Test: take screenshot in vulkan-only mode
Change-Id: I4f5a4e05ceb9230915c33d2033ec17425a0baaee
Add new display operation callback to be able to set and get color
transform matrix, which can be used to change appearance of the
display for accessibility features.
Bug: 420586022
Test: Set color accessibility options in emulator
Test: adb shell settings put secure accessibility_display_inversion_enabled 1
Test: FrameBufferTest.SetMultiDisplayColorTransform
Change-Id: If972487785b0635bfc6ec126d950dec0cf1cd6fb
... to break up the circular header imports between the main host
server headers and the underlying GL/VK backend headers. This is
needed to support further imports to internal which is stricter
about header includes.
Additional android CI on ag/33941257
Bug: b/423634910
Test: android build
Test: bazel build
Test: cmake build
Test: meson build
Change-Id: I378640034bc665c07dec5edbd396074d79e94cd6
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
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
... 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
.. to increase readability and reduce duplicated
functionality around the code base.
Bug: 389637419
Test: CI
Change-Id: Ib838b166a7629f00375cad6beb0a1630d2041986
Fixes issues with certain AMD card on windows for vulkan
hwui modes.
Bug: b/391127381
Test: run XR emulator on AMD windows
Change-Id: Ia6a86cd5bc882821bd1c6c398eff1b0d5be3d5aa
... so that members can start to be protected with GUARDED_BY
annotations and potentially can start to eliminate having a
global `sVkEmulation`.
Bug: b/383139165
Test: cvd create --gpu_mode=gfxstream_guest_angle_host_swiftshader
Change-Id: Iae4dd859991015e386fcc30ef091ccdb7ed1aeb6
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
Revert submission 3414268-revert-3393388-extmem-refactor-dec-5-BQXYSDRQMH
Reason for revert: Fixing the MacOS issue that required the original revert of the recent changes.
Reverted changes: /q/submissionid:3414268-revert-3393388-extmem-refactor-dec-5-BQXYSDRQMH
Change-Id: I81fbb3263488f69aec16e5ffd9c6008d9ac670bf
- Use ExternalMemoryHandle instead of VK_EXT_MEMORY_HANDLE, wherever
possible
- Make the dupExternalMemory internal to VkCommonOperations
- Make the Buffer and ColorBuffer getExtMem functions do the dup instead
- Resolve references and nomenclature for handleType/streamHandleType
BUG=382442209
TEST=Sanity on Android14 (ANGLE and gfxstream-gles backend), Yocto w/ gfxstream-vulkan
NO_IFTTT=doesn't affect snapshot
Change-Id: I9d56d058ed891ec036220aca90a54bd7a1dbaaa6
Also clean up references to headers/namespace for ManagedDescriptor type
BUG=382442209
TEST=compile
NO_IFTTT=doesn't affect snapshot
Change-Id: I7dc660f239e47974588b574b3ce676c482658bd7
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
We need to copy from gl to vk frequently. Let's skip the copying if
nothing changed since the last copy.
We did so by introducing a dirty bit for color buffer gl. We mark it as
dirty whenever gl contents are updated. Then Vulkan will only copy from
gl if the dirty bit is set.
Bug: 348710938
Test: GfxstreamEnd2EndVkTest.ImportAndBlitFrom*
Change-Id: I19aa7ed34f9ccb4a08187a8b53297b55ad5ccd67
It looks like we missed a copy between gl and vk in video decoding. We
do not know exactly where, but adding updateFromBytes to both gl and vk
seems to fix the issue.
Bug: 348710938
Test: manual
Change-Id: Ib4d9460a7da7d5b6fcb56fb66e34bb6651320aa7
We should try to support external sync, along with
external memory so:
find ./ -type f -exec sed -i -e 's/BlobManager/ExternalObjectManager/g' {} \;
find ./ -type f -exec sed -i -e 's/removeDescriptorInfo/removeBlobDescriptorInfo/g' {} \;
find ./ -type f -exec sed -i -e 's/addDescriptorInfo/addBlobDescriptorInfo/g' {} \;
find ./ -type f -exec sed -i -e 's/mDescriptorInfo/mBlobDescriptorInfo/g' {} \;
find ./ -type f -exec sed -i -e 's/ManagedDescriptorInfo/BlobDescriptorInfo/g' {} \;
BUG=350965057
TEST=compile
Change-Id: Id9fe5319ed617638ae8c67f9377f5426fe15cf44
We want to share the color buffer or buffer with a Wayland,
BUG=349122558
TEST=see dmabufs being exported
Change-Id: I5d3a94aec2b7a58b8281ba081d8041e21d12e8bf
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
Should be able to snapshot Chrome home page without crashing. (Website
browsing still needs more work.)
Bug: 332775761
Test: CanSubmitQueue
Change-Id: If1dbd4fc2af17d022cdcdfca98528d7183e32ab6
We are trying to make vk snapshot load the google Chrome home page
without crashing. With this CL it does not crash during load but would
crash with a device lost after submitting a queue (which is
unsurprising because everything is missing to snapshot vk queue).
Content of this commit includes:
- Add dependencies for VkImageView, VkGraphicsPipelines, VkFramebuffer.
They are necessary to tell the snapshot module the order of vk object
creation.
- Add vkBindImageMemory into the loading sequencey of VkImage, so that
it would be executed before vkCreateImageView.
- Delay the destruction of VkShaderModule. This is because other
objects can still refer to it after it is destroyed.
- Initialize VK backend for color buffer properly on snapshot load.
- Save and load vk images in the same order by sorting them according
to their boxed handle.
- Record all the placeholder handles for vkCreateDescriptorPool. For
performance purpose this function creates a lot of extra handles
without real contents. We need to snapshot those handles as well.
Bug: 329506242
Test: GfxstreamEnd2EndVkSnapshotImageTest, GfxstreamEnd2EndVkSnapshotPipelineTest
Change-Id: I999c3477f861cec51ae743f11c3031be438b3ddf
We don't know the root cause yet but sometimes VK -> GL interop can
fail. Let's try harder not to crash.
More details: glImportMemoryWin32HandleEXT can fail sometimes, let's
make it not to crash when it happens.
Bug: 322858149
Change-Id: I044643d15febdc36f90f69bbc4529eef50049323
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
Developed for QNX use-case, but applies generally to any
platform that supports external memory for import but not for
export.
Some robustness around VK_QNX_external_memory_screen_buffer API
usage added with the updateExternalMemoryInfo() function.
BUG=319510663
TEST=compile && launch_cvd --gpu_mode=gfxstream_guest_angle
Change-Id: I7b10b70da024df60881c8b27ea29bd44101b95f6