And use in ANB buffer, to cover newly added CTS formats.
Bug: 406456167
Test: CtsNativeHardwareTestCases
Change-Id: I7c254564cc9631e78288737563c6eabb20134e91
... 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
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
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
Also initialize rest of the member variables to
sensible defaults.
Bug: 389637419
Test: -feature VulkanDebugUtils && CI
Change-Id: I1e9e72e12fa76e56c4dd58537ce041830fb2b2be
.. to match the color buffer image creation flags.
And re-introduce the memory requirement size check when
importing the color buffer.
Bug: 399753034
Test: run XR emulator on Mac
Change-Id: Idde9b2c3133e8af8755ac4fd940b2bea651e7341
The uninitialized queue index value 0xffffffff will cause memory allocation
error, and chain effect afterwards.
Test: deqp wsi.
Bug: 403543880
Change-Id: I6c05472ef3803329de7bcebc067cad0b79d83a7d
... and use `m<VARIABLE_NAME>` for members to avoid a bunch of
compile errors when building with `-Wshadow`.
Bug: b/399867568
Test: cvd create --gpu_mode=gfxstream_guest_angle_host_swiftshader
Change-Id: I1084a6db63090a0db5917f4e138902b3b452a642
... 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
... to make Gfxstream more resilient to issues like b/397754921
where an invalid AHB was being included in a swapchain.
Bug: b/397754921
Test: cts -m CtsUiRenderingTestCases
Change-Id: Ic8087abbcab0cb884ece30cce7aca71576dfeb6c
Explicitly cast getDefaultExternalMemoryHandleType() to
VkExternalMemoryHandleTypeFlags to resolve the c++11-narrowing
warning.
This makes sure we can complete the qemu-next presubmit.
Change-Id: I80dfb1cf87521e0f95524698e0bef25d2f5fd345
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
... and drop "physical" from the name as queues are not physical
things.
Bug: b/383139165
Test: cvd create --gpu_mode=gfxstream_guest_angle_host_swiftshader
Change-Id: Ie04098d37f732d4a1d2973925ee7155e704f3c34
Replace with a helper function to determine the default handleTypeBits
to use for external memory
BUG=382442209
TEST=sanity on Android14, Yocto w/ gfxstream
NO_IFTTT=doesn't affect snapshot
Change-Id: Ie1f6fe1e093154b80f82ec436c1510baf8782187
- 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
Ensure we wait for queue idle before destroying vulkan resources for
Android native buffers.
Bug: 379178011
Test: presubmit, run with -feature GuestAngle
Change-Id: Ic67e04d10d2c4df795557fa49e915b8c46f6f53d
Use the new external memory extension for the management of
external images and buffers. Previous extension and usage was
depending on some workarounds on managing metal objects which
was causing issues with the usage of VVL.
Requires a new version of MoltenVK prebuilts/binaries.
Bug: 349066492
Bug: 368409646
Bug: 351765838
Test: -gpu host -feature GuestAngle
Change-Id: I47f0f13bde9d7e3dc95da1af3673deac649745d7
Usages of fprintf(stderr,..) causes various issues when dealing with
bugs. Replacing them with appropriate versions to ensure they are
collected with any extra information needed and to avoid AS thinking
there were a crash.
Bug: 374311144
Test: build and presubmit
Change-Id: I6893a8df753ddfcc27f28dfd2bd828e53f3f32b3
... and instead track when SyncThread is done with the use of each
ANativeBufferInfo.
Prior to this topic, VK process cleanup could race with SyncThread
destruction. The process cleanup could destroy a VkInstance/VkDevice
while SyncThread still has a reference via the
std::shared_ptr<AndroidNativeBufferInfo> in
waitForQsriFenceTask. This could result in crashes or locks when
the final reference to the AndroidNativeBufferInfo happens during
SyncThread's desturction and
AndroidNativeBufferInfo::QueueState::teardown() happens after
the device was already destroyed.
Bug: b/360379616
Test: cvd start --gpu_mode=gfxstream_guest_angle_host_swiftshader
Test: atest com.android.cuttlefish.tests.FastbootRebootTest \
--rerun-until-failure
Test: wait 30 minutes
Change-Id: I099bafbf4ecef26ca02a10afc97400732ed47935
... to aid debugging.
Bug: b/364967041
Test: cvd start --gpu_mode=gfxstream_guest_angle_host_swiftshader
Test: perfetto capture and open in ui.perfetto.dev
Change-Id: Ieda7f9ce8d0a0923a989cd201438819568cab140
... to help break cicular dependency between FrameBuffer and the
backends.
Bug: b/360379616
Test: build
Change-Id: Ia20a59de8ea08faca92f20c15e4b3b2240ccb2c2
Using metal_objects extension for MoltenVK
to avoid using the deprecated and unsafe old API
and fix AHB and external memory related issues.
Bug: 333460957
Test: build and run with -use-host-vulkan, with VVL disabled
Change-Id: If1269359a7b4a7f8a4746c8ca698eb8838aebb9a
Avoid invalid usage when invalidating the mapped memory range
with whole size of the buffer, which might be different than
the requested allocation size.
Bug: 333460957
Test: build and run with VVL
Change-Id: I422f6b7c57d7b3210c8e982ca416b6f6451870ab
Similar to VkNativeBufferANDROID, we should also remove
VkBindImageMemorySwapchainInfoKHR structure from the
createinfo chain when preparing the ANB images based on
memory binding parameters.
Bug: 333460957
Test: dEQP-VK.wsi.android.swapchain.*
Change-Id: I051fdb1aa2b7d46cfa6c7f97e1dfab1dfe4b67df
Fixes invalid usage of image memory size directly for the
allocation of the staging buffer for Android native buffers.
Staging buffers might require bigger sizes.
Test: Run with -guest-angle and VVL
Change-Id: Ib2d95ad04b5180b2e4e41a619c55157a23e8526c
This builds the "standalone" GFXStream library that can be consumed by
Qemu 8.2
The bazel build allows us to transition rutabaga to a bazel based
build, which will unify the Qemu 8.2 build as used by the emulator.
It also opens up the path to migrate this to g3 if we decide to do this.
This change forces a few header changes, as bazel is more strict about
the relationship between headers and packages, and doesn't easily give
you fine grained control over the include paths.
Change-Id: I3566d69f10c534f1176fa92eaa7f5f12ec0bcd4f
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
Some code may be auto-generated, some may not be.
Eventually we want to move autogenerated code into specialized
directories, so it be generated but not necessarily checked
in [for certain cases].
Also, nuke codegen for CMakeLists.txt: we have multiple other
build systems now (Blueprint, meson), and it doesn't make
sense codegen one anymore.
BUG=296903491
TEST=compile
Change-Id: I63beff1726074268188694fbfeb803429ee96478
This commit updates vk.xml and code generator to make them backward
compatible. The updates in code generator includes:
1. Parse "protect" properly.
2. Ignore "optional" if the "optional" was added in newer vk.xml.
- This is done by having an extra table for related fields.
3. Parse latexmath properly.
4. Parse "supported" properly.
5. Skip parameters and members if they are not for Vulkan API.
6. VkNativeBufferANDROID diverged from upstream, keep the old one.
Bug: 293346694
Test: rebuild and run aemu with older system images
Change-Id: I72dad62bcbeb041bb49f1a6467ec5af2a1ef7960