Snap for 13982012 from 445f0731c2 to 25Q4-release
Change-Id: I78f62d7d089d06e5998117423bdec52c9867536c
This commit is contained in:
commit
1e6761549c
3 changed files with 21 additions and 16 deletions
|
|
@ -102,22 +102,6 @@ uint64_t GeneratePseudoUniqueId() {
|
|||
return distribution(generator);
|
||||
}
|
||||
|
||||
void EmitGuestAndHostTraceMarker(VkEncoder* encoder) {
|
||||
#ifdef HAVE_PERFETTO
|
||||
const uint64_t flowId = GeneratePseudoUniqueId();
|
||||
|
||||
TRACE_EVENT_INSTANT(
|
||||
GFXSTREAM_TRACE_DEFAULT_CATEGORY,
|
||||
"vkTraceAsyncGOOGLE",
|
||||
perfetto::Flow::Global(flowId),
|
||||
"flow id", flowId);
|
||||
|
||||
encoder->vkTraceAsyncGOOGLE(flowId, true /* do lock */);
|
||||
#else
|
||||
(void)encoder;
|
||||
#endif // HAVE_PERFETTO
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
#define MAKE_HANDLE_MAPPING_FOREACH(type_name, map_impl, map_to_u64_impl, map_from_u64_impl) \
|
||||
|
|
@ -800,6 +784,24 @@ CoherentMemoryPtr ResourceTracker::freeCoherentMemoryLocked(VkDeviceMemory memor
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
void ResourceTracker::EmitGuestAndHostTraceMarker(VkEncoder* encoder) {
|
||||
#ifdef HAVE_PERFETTO
|
||||
const uint64_t flowId = GeneratePseudoUniqueId();
|
||||
|
||||
TRACE_EVENT_INSTANT(
|
||||
GFXSTREAM_TRACE_DEFAULT_CATEGORY,
|
||||
"vkTraceAsyncGOOGLE",
|
||||
perfetto::Flow::Global(flowId),
|
||||
"flow id", flowId);
|
||||
|
||||
if (mCaps.vulkanCapset.hasTraceAsyncCommand) {
|
||||
encoder->vkTraceAsyncGOOGLE(flowId, true /* do lock */);
|
||||
}
|
||||
#else
|
||||
(void)encoder;
|
||||
#endif // HAVE_PERFETTO
|
||||
}
|
||||
|
||||
VkResult acquireSync(uint64_t syncId, int64_t& osHandle) {
|
||||
struct VirtGpuExecBuffer exec = {};
|
||||
struct gfxstreamAcquireSync acquireSync = {};
|
||||
|
|
|
|||
|
|
@ -958,6 +958,8 @@ class ResourceTracker {
|
|||
void transformImageMemoryRequirementsForGuestLocked(VkImage image, VkMemoryRequirements* reqs);
|
||||
CoherentMemoryPtr freeCoherentMemoryLocked(VkDeviceMemory memory, VkDeviceMemory_Info& info);
|
||||
|
||||
void EmitGuestAndHostTraceMarker(VkEncoder* encoder);
|
||||
|
||||
std::recursive_mutex mLock;
|
||||
|
||||
std::optional<const VkPhysicalDeviceMemoryProperties> mCachedPhysicalDeviceMemoryProps;
|
||||
|
|
|
|||
|
|
@ -106,6 +106,7 @@ struct vulkanCapset {
|
|||
uint32_t externalSync;
|
||||
uint32_t virglSupportedFormats[16];
|
||||
uint32_t vulkanBatchedDescriptorSetUpdate;
|
||||
uint32_t hasTraceAsyncCommand;
|
||||
};
|
||||
|
||||
struct magmaCapset {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue