Just like QNX, macOS does not natively support DMA buffers.
Also indicate that VK_EXT_QUEUE_FAMILY_FOREIGN_EXTENSION_NAME is
emulated in `vkEnumerateDeviceExtensionProperties`.
On macOS MoltenVK can be installed as part of Vulkan SDK or as standalone.
If standalone, VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME will not be
supported. Therefore, we decouple the detection of portability enumeration
from detection of MoltenVK.
YCbCr samplers and conversion objects will be required for Vulkan
composition of video layers, this utility class will allow using
the same object on composition side without extra access to the
color buffer info. The pool allocates new samplers and conversion
objects on demand based on the vulkan format.
Note that this CL also fixes the conversion object parameters to
render videos correctly.
Bug: 442396541
Bug: 389646068
Test: render video with -feature VulkanNativeSwapchain
Change-Id: I6d55588e4fb92cd03cb82119e5caef60184f295a
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
Creating larger textures than the physical device limits can lead to
crashes on some drivers which then crashes the emulator. Validate
the dimensions requested earlier to report and avoid such cases.
Bug: 432837154
Change-Id: Id461f7878a3a6e489e013660f11f9e1d51d6f825
Fixes pipeline stage bit usage for correct access masks.
Also use variable values rather than constants to ensure correctness
over old/new access masks and layouts.
Bug: 432572558
Change-Id: Ie33c1d56268784cda31d433b5f3bef2db3e66503
vkCmdCopyBufferToImage also requires transfer write for the image
memory barrier.
Bug: 390345102
Bug: 389637419
Test: emulator with VVL
Change-Id: I5651221afa50a247478151243a983e2353a8a337
... 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
* Avoid using chrono literals
* More explicit dependencies
* Avoid a runtime array in GLEScmContext
* Fix some usage of std::unordered_set<const char*> which would
hash the pointer value but not the underlying string contents
* Adds a couple more files for stubbing android headers
Bug: b/421190493
Test: internal build
Change-Id: I1df7a853e8f20f70b186a3eed68e29b47283e8bd
Follow-up to aosp/3560867.
The current exportMemoryHandle(..) doesn't use the correct Vk
device. This leads to failures in the export flow.
BUG=406513306
TEST=X11 apps work again
Change-Id: I83ab73a0334481f3226853f4d822267d88db1c71
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
... as this is AEMU specific.
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: Id9d3cd0fae1b7b8cd1f681b5134a4f43f7e6378b
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
and split type declarations off into render-utils as this is a
part of the RenderLib interface.
Note: Makes hostmem register/unregister a no-op. These functions connect
to `HostmemIdMapping`. `HostmemIdMapping` has been effectively replaced by
`ExternalObjectManager` (originally `BlobManager`) starting in aosp/2571451
(and that change description even calls out `HostmemIdMapping` should no
longer be needed).
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: Iee4d0dca2143377b266972d2d38ec727a90c3deb
... 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
* changes:
Remove estimation and caching from getStagingMemoryTypeIndex
Invalidate/flush fixes
Remove actuallyExternal argument from allocExternalMemory
Cleanup StagingBuffer usage in VkEmulation
This function is generally called only a few times per app and
caching the result can cause issues when the driver requests a
different memory type based on the buffer flags or size.
Bug: 389637419
Bug: 394187789
Test: CI
Change-Id: I6b22f60356a49de1de5add90d888bf37b0d0abd6
Only invalidate memory ranges when the staging buffer
memory is not coherent.
Add missing vkFlushMappedMemoryRanges call after the
non-coherent memory is updated from the host and remove
unnecessary vkInvalidateMappedMemoryRanges call after
vkCmdCopyBufferToImage is completed.
Bug: 394187789
Bug: 389637419
Test: run XR emulator on AMD, nvidia and moltenvk
Change-Id: Id049763729ae79f01f9673c25fc14bbd37585413
Staging buffer in VkEmulation is used for reading back
and updating color buffer data, and is not actually
allocated as an external memory. CL makes buffer creation
and usage cleaner with a self contained structure, which
can later be used for other staging buffers, or for
implementing multiple staging buffers when needed.
Bug: 389637419
Test: run XR emulator on multiple platforms
Change-Id: I9eb0bdea496539407abb908360414f72c28acba6
.. to increase readability and reduce duplicated
functionality around the code base.
Bug: 389637419
Test: CI
Change-Id: Ib838b166a7629f00375cad6beb0a1630d2041986
Android Emulator has lockup problem if the vm unmap
is not done on its main looper.
Bug: 405345461
Change-Id: I1ea50df4c2d91ccd829b4cbc9b870f808a782a01
FeautreSet is a large structure with lots of strings, better
to not copy around unnecessarily.
Bug: N/A
Test: build
Change-Id: I604b4ad7af01f222b54dcda4cd2299e350324f50
Image memory barrier with layout transition should wait for writes to
complete to avoid graphical glitches.
Bug: 405893721
Bug: 394187789
Bug: 390345102
Test: run XR emulator with VVL
Change-Id: I1781cbb5d5c94285c7c2f753f3c116b2c0004165
Spec requires the device feature to be enabled when using
VK_EXT_robustness2.
Bug: 390345102
Test: CI
Change-Id: I8f702e7b2924a41c850606b80b54736302021538
Fixes errors when new system images use rgba4 color buffers.
When using lavapipe, where it doesn't support RGBA4 vulkan format
it uses swizzling on copy to provide the support.
Bug: 389637419
Test: CI
Change-Id: I628f3d1f2a78d5751e1b802f1f2463aa9c515e10
Enables all supported VK_EXT_robustness2 features to avoid
emulator crashes due to invalid application behavior on the
GPU.
Bug: 389637419
Test: -feature VulkanRobustness
Change-Id: I9ae2273cd5f0660a0a739a903ed69f73398027f2
Device alignment should only be used when allocation is
made with extra alignment offset.
Bug: 390345102
Bug: 373601997
Test: CI
Change-Id: I340391f0c448b96ecdeb1f11c58c2841bc385111
Current dma_buf extension usage is invalid and throws
VVL errors on color buffer creation due to usage of
dma_buf external memory handle bit on unsupported
formats. Until we fix the issue, adding AMD into block
list to avoid crash and hang issues.
Bug: 373601997
Bug: 391128661
Bug: 400999642
Test: run XR emulator on AMD linux
Change-Id: Ieac4c12b854d246798922e918d2bebf15d321854
... 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