Fix print format for matrix types in rc encoder.
Make sure decoder and dispatch logging can be enabled.
Bug: 420586022
Test: Enable extra logging manually
Change-Id: Ic75fb9393ea08dfa4f485611225eb5680cf6e44e
New rc functions will be used from the host compositor to set a display
color transform matrix is given. This feature is used when the matrix is
set explicitly on surface flinger, or when using accessibility color
features, such as color blind modes. New functionality is added into
generate-apigen-sources code generator code to handle matrix data type.
New functions
* rcGetDisplayColorTransform: Get the matrix for the display
* rcSetDisplayColorTransform: Set the matrix for the display
Bug: 420586022
Test: Set color accessibility options in emulator
Test: ./scripts/generate-apigen-sources.sh
Change-Id: I21fa4bb4b5bbc6038f464f68c4c63eb50e46411c
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
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
... 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
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
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
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
Mostly just change the locations of directories.
One exception is aosp/3271678, which needs to land in the
Mesa codegen directory.
For workflows without an AOSP tree, one can just pass in
the path to Mesa tree.
Mesa uses a newer version of vk.xml than the host does,
so some changes are observed.
BUG=369200554
TEST=generate-gfxstream-vulkan.sh in AOSP
or
cd ~/
git clone https://gitlab.freedesktop.org/mesa/mesa.git
cd ${gfxstream_dir}
./scripts/generate-gfxstream-vulkan.sh ~/mesa
Change-Id: I5a023ed4d8788a31f352d017f321656c7b7a7410
Private data slot types are required to support VK_EXT_private_data
extension. dEQP tests require some additional changes for handle
remapping over uint64_t types, which will be submitted later.
Bug: 368009403
Test: codegen & build & presubmit
Change-Id: If97478293fd8009a4279861fcbd780069708ab0f
This simplifies the amount of code imported from Vulkan
docs. It vendors the code to just a subset needed by
the cerealgenerator. The files that are kept are:
- generator.py
- cgenerator.py
- reg.py
- genvk.py
Since these files originate with Khronos, they are
Apache licensed.
Long-term, there are various ideas on how to proceed
with codegen. Probably the above files can be nuked
in the event some of those ideas come to pass.
BUG=296903491
TEST=./generate-gfxstream-vulkan.sh
Change-Id: I55842e778af9b71ceab2dcaf1c2d7aafebe86b14
Partial update to vulkan headers and auto generated code to
include the new extension. It will be used to fix issues on
external memory implementation with MoltenVK later on.
References:
Khronos MR 6800
MoltenVK PR 2314
Bug: b/349066492
Test: build & presubmit
Change-Id: I91f0e6c73bfa3c8c13b8008b7913d72fda371403
While cereal implements an API provided by Khronos Apache 2.0
files, the files were started in AOSP, and can be relicensed to
MIT.
BUG=367357743
TEST=CI
Change-Id: Ic621270619df68384edbd06f4537b3c4f22a40fa
genvk.py itself includes different types of generators:
spirvgenerator.py, rubygenerator.py, etc. cerealgenerator.py
is an additional one. A strategy to pare down the size of
the code would be modify genvk.py to remove unneeded generators,
and just import the cerealgenerator: i.e, importing the subset
of scripts useful to gfxstream.
The removes the notion of upstreaming to vulkan-docs, but does
imply more dedicated codegen strategy long-term.
About 300kLoC can be removed, since previously we just a blanket
copy.
BUG=296903491
TEST=CI
Change-Id: Iabaadb948220ec1ab1283fa58f1b151492103388
When invoking the build in the guest, we don't need
to define this.
BUG=296903491
TEST=run autogen
Change-Id: I76142ff973ea2243bf9052c1dfbc3868bb0e58b0
We move the fence signaling to after color buffer copying. This is done
by reusing the existing CPU CV object and wait on it before triggering
the GPU vkWaitForFences.
Also rewrite fenceInfo.status with std::future to simplify the code.
Design: go/emu-async-cb-copy
Bug: 3250107
Test: GfxstreamEnd2EndTests#MultiThreadedResetCommandBuffer
Change-Id: Id956eb75f4b99e904f0ab82f2edaa1e134e07f2c
... 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
The vkGetFenceStatus() call can not be sent to the host for fences
that have imported an external payload (sync fd) because the sync
fd does not exist on the host. A fence used as part of a swapchain
present may be created in the unsignaled state. Then, during
vkQueuePresentKHR() on Android, vkQueueSignalReleaseImage() is used
to import a sync fd payload into the present fence. Prior to this
change, if the user (ANGLE) does vkGetFenceStatus() on this fence,
it would never appear as signaled because the sync fd fence is not
actuallly connected to the fence on the host and the host would just
always return the VK_NOT_READY from the fence's initial unsignaled
state.
This change also updates VkFence_Info to use a std::optional<int>
to make it possible to distinguish if a fence has an imported
already-signaled payload vs not having an imported payload.
Bug: b/362313516
Test: cts -m CtsGraphicsTestCases
Test: GfxstreamEnd2EndTests
Change-Id: I41f3c452937bb11c93c491b716e6f1947c2b7cdf
Removes use of android-emu/aemu/base from
libgfxsteam_vulkan.so. Also removes duplicated code
entries that are known to VK-specific. More code
can likely be deleted than currently is.
BUG=353368163
TEST=complile
Change-Id: I7fb0248351bd3e04ebafe008e39f83bb7f048b29
This adds the GfxStreamVulkanConnection, and makes
libgfxstream_vulkan.so use it. All dependencies
to HostConnection are removed.
For Android builds, dependencies to renderControl
and libOpenGlCodecCommon remain. In the future,
these will be isolated to Goldfish-based system
images.
BUG=311486792
TEST=CI
Change-Id: I880a7ef4e54fe0f8b929b020687b350e057daa96
* changes:
vkCreateInfo: support VkImageDrmFormatModifierListCreateInfoEXT
vkGetPhysicalDeviceImageFormatProperties2: support drm modifiers
vkAllocateMemory: support DRM format modifiers for dmabuf memory
Force request VK_EXT_image_drm_format_modifier in vkCreateDevice
Enable VK_EXT_image_drm_format_modifier on Linux guests
Enable VK_EXT_image_drm_format_modifier in cerealgenerator.py
Revert "HACK: gfxstream: guest: mesa: force non-modifier path"
Add missing includes
Add the extension to list in cerealgenerator.py, rerun
scripts/generate-gfxstream-vulkan.sh
Bug: 328011003
Test: vkvcube-wayland + kumquat on the entire CL chain
Change-Id: If5cf2b04e9fb03e2f484fee12bbe13572c945b8b
We acquire the lock when createExtraHandlecsForNextApi is called. But
depending on config, vkCreateDescriptorPool may or may not call
createExtraHandlesForNextApi, which results in inconsistency of the lock
state when calling snapshot()->vkCreateDescriptorPool.
We add a tryLock so that it always acquires the lock before modifying
mReconstruction.
Bug: 349648408
Test: VulkanBatchedDescriptorSetUpdate
Change-Id: I8f582580e01916edce042db192c497c8dd7a32d2
The HealthMonitor is hang detection at the API Vulkan
encoder level.
It's actually not used in CF/AAOS/Emualtor. The
plan for AOSP is actually to increase the amount
of Android CTS that are run against gfxstream to
increase health/stability, for example (b/347288539).
So if we consistently pass CTS on main with gfxstream
(as is the plan), HealthMonitoring would be somewhat
redundant.
Also, AndroidHealthMonitor is somewhat duplicated with
libaemu's HealthMonitor as well.
Also, nuke EncoderAutoLock while we're at it. It also
is unused code.
BUG=353368163
TEST=compile
Change-Id: If7da3db0f83e7e2dd9f0b448f51a55dcf23aed39
... by silo'ing each physical device in its own device group.
This unblocks dEQP VK testing until the mesa layer has codegen
to fully translate structs in pNext chains.
Bug: b/333133323
Test: GfxstreamEnd2EndTests
Test: dEQP-VK.api.object_management.single.device_group
Change-Id: I115901009a0de647717414f10bc3cf94551cd09d