venus: update tracepoints to align with later optimizations We can remove redundant TPs no longer needed while updating and adding some trivial ones helpful for next things. Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27450>
diff --git a/src/virtio/vulkan/vn_buffer.c b/src/virtio/vulkan/vn_buffer.c index a7985ea..4cadb94 100644 --- a/src/virtio/vulkan/vn_buffer.c +++ b/src/virtio/vulkan/vn_buffer.c
@@ -358,7 +358,6 @@ const VkAllocationCallbacks *pAllocator, VkBuffer *pBuffer) { - VN_TRACE_FUNC(); struct vn_device *dev = vn_device_from_handle(device); const VkAllocationCallbacks *alloc = pAllocator ? pAllocator : &dev->base.base.alloc; @@ -403,7 +402,6 @@ VkBuffer buffer, const VkAllocationCallbacks *pAllocator) { - VN_TRACE_FUNC(); struct vn_device *dev = vn_device_from_handle(device); struct vn_buffer *buf = vn_buffer_from_handle(buffer); const VkAllocationCallbacks *alloc =
diff --git a/src/virtio/vulkan/vn_descriptor_set.c b/src/virtio/vulkan/vn_descriptor_set.c index 43ea6c2..bdd2ddf 100644 --- a/src/virtio/vulkan/vn_descriptor_set.c +++ b/src/virtio/vulkan/vn_descriptor_set.c
@@ -619,7 +619,6 @@ const VkDescriptorSetAllocateInfo *pAllocateInfo, VkDescriptorSet *pDescriptorSets) { - VN_TRACE_FUNC(); struct vn_device *dev = vn_device_from_handle(device); struct vn_descriptor_pool *pool = vn_descriptor_pool_from_handle(pAllocateInfo->descriptorPool); @@ -738,7 +737,6 @@ uint32_t descriptorSetCount, const VkDescriptorSet *pDescriptorSets) { - VN_TRACE_FUNC(); struct vn_device *dev = vn_device_from_handle(device); struct vn_descriptor_pool *pool = vn_descriptor_pool_from_handle(descriptorPool); @@ -993,7 +991,6 @@ uint32_t descriptorCopyCount, const VkCopyDescriptorSet *pDescriptorCopies) { - VN_TRACE_FUNC(); struct vn_device *dev = vn_device_from_handle(device); const VkAllocationCallbacks *alloc = &dev->base.base.alloc; @@ -1297,7 +1294,6 @@ VkDescriptorUpdateTemplate descriptorUpdateTemplate, const void *pData) { - VN_TRACE_FUNC(); struct vn_device *dev = vn_device_from_handle(device); struct vn_descriptor_update_template *templ = vn_descriptor_update_template_from_handle(descriptorUpdateTemplate);
diff --git a/src/virtio/vulkan/vn_device_memory.c b/src/virtio/vulkan/vn_device_memory.c index 3b6fa1b..1a5db14 100644 --- a/src/virtio/vulkan/vn_device_memory.c +++ b/src/virtio/vulkan/vn_device_memory.c
@@ -553,7 +553,6 @@ const VkAllocationCallbacks *pAllocator, VkDeviceMemory *pMemory) { - VN_TRACE_FUNC(); struct vn_device *dev = vn_device_from_handle(device); /* see vn_physical_device_init_memory_properties */ @@ -616,7 +615,6 @@ VkDeviceMemory memory, const VkAllocationCallbacks *pAllocator) { - VN_TRACE_FUNC(); struct vn_device *dev = vn_device_from_handle(device); struct vn_device_memory *mem = vn_device_memory_from_handle(memory); if (!mem) @@ -711,7 +709,6 @@ void vn_UnmapMemory(VkDevice device, VkDeviceMemory memory) { - VN_TRACE_FUNC(); } VkResult @@ -719,7 +716,6 @@ uint32_t memoryRangeCount, const VkMappedMemoryRange *pMemoryRanges) { - VN_TRACE_FUNC(); struct vn_device *dev = vn_device_from_handle(device); for (uint32_t i = 0; i < memoryRangeCount; i++) { @@ -742,7 +738,6 @@ uint32_t memoryRangeCount, const VkMappedMemoryRange *pMemoryRanges) { - VN_TRACE_FUNC(); struct vn_device *dev = vn_device_from_handle(device); for (uint32_t i = 0; i < memoryRangeCount; i++) {
diff --git a/src/virtio/vulkan/vn_feedback.c b/src/virtio/vulkan/vn_feedback.c index d1538df..50ceaa8 100644 --- a/src/virtio/vulkan/vn_feedback.c +++ b/src/virtio/vulkan/vn_feedback.c
@@ -198,8 +198,6 @@ uint32_t size, uint32_t *out_offset) { - VN_TRACE_FUNC(); - /* Default values of pool->used and pool->alignment are used to trigger the * initial pool grow, and will be properly initialized after that. */ @@ -222,9 +220,6 @@ vn_feedback_pool_alloc(struct vn_feedback_pool *pool, enum vn_feedback_type type) { - /* TODO Make slot size variable for VkQueryPool feedback. Currently it's - * MAX2(sizeof(VkResult), sizeof(uint64_t)). - */ static const uint32_t slot_size = 8; struct vn_feedback_buffer *feedback_buf; uint32_t offset;
diff --git a/src/virtio/vulkan/vn_image.c b/src/virtio/vulkan/vn_image.c index f4c0417..6f2f986 100644 --- a/src/virtio/vulkan/vn_image.c +++ b/src/virtio/vulkan/vn_image.c
@@ -561,7 +561,6 @@ const VkAllocationCallbacks *pAllocator, VkImage *pImage) { - VN_TRACE_FUNC(); struct vn_device *dev = vn_device_from_handle(device); const VkAllocationCallbacks *alloc = pAllocator ? pAllocator : &dev->base.base.alloc; @@ -648,7 +647,6 @@ VkImage image, const VkAllocationCallbacks *pAllocator) { - VN_TRACE_FUNC(); struct vn_device *dev = vn_device_from_handle(device); struct vn_image *img = vn_image_from_handle(image); const VkAllocationCallbacks *alloc =
diff --git a/src/virtio/vulkan/vn_pipeline.c b/src/virtio/vulkan/vn_pipeline.c index bf04dda..c96a42f 100644 --- a/src/virtio/vulkan/vn_pipeline.c +++ b/src/virtio/vulkan/vn_pipeline.c
@@ -390,7 +390,6 @@ const VkAllocationCallbacks *pAllocator, VkPipelineCache *pPipelineCache) { - VN_TRACE_FUNC(); struct vn_device *dev = vn_device_from_handle(device); const VkAllocationCallbacks *alloc = pAllocator ? pAllocator : &dev->base.base.alloc; @@ -429,7 +428,6 @@ VkPipelineCache pipelineCache, const VkAllocationCallbacks *pAllocator) { - VN_TRACE_FUNC(); struct vn_device *dev = vn_device_from_handle(device); struct vn_pipeline_cache *cache = vn_pipeline_cache_from_handle(pipelineCache); @@ -477,7 +475,6 @@ size_t *pDataSize, void *pData) { - VN_TRACE_FUNC(); struct vn_device *dev = vn_device_from_handle(device); struct vn_physical_device *physical_dev = dev->physical_device; struct vn_ring *target_ring = vn_get_target_ring(dev); @@ -525,7 +522,6 @@ uint32_t srcCacheCount, const VkPipelineCache *pSrcCaches) { - VN_TRACE_FUNC(); struct vn_device *dev = vn_device_from_handle(device); vn_async_vkMergePipelineCaches(dev->primary_ring, device, dstCache, @@ -1454,7 +1450,7 @@ } /* tell whether fixes are applied in tracing */ - VN_TRACE_SCOPE("apply_fixes"); + VN_TRACE_SCOPE("sanitize pipeline"); struct vn_graphics_pipeline_fix_tmp *fix_tmp = vn_graphics_pipeline_fix_tmp_alloc(alloc, info_count, pnext_mask); @@ -1511,7 +1507,6 @@ const VkAllocationCallbacks *pAllocator, VkPipeline *pPipelines) { - VN_TRACE_FUNC(); struct vn_device *dev = vn_device_from_handle(device); const VkAllocationCallbacks *alloc = pAllocator ? pAllocator : &dev->base.base.alloc; @@ -1568,6 +1563,10 @@ } if (want_sync || target_ring != dev->primary_ring) { + if (target_ring == dev->primary_ring) { + VN_TRACE_SCOPE("want sync"); + } + result = vn_call_vkCreateGraphicsPipelines( target_ring, device, pipelineCache, createInfoCount, pCreateInfos, NULL, pPipelines); @@ -1593,7 +1592,6 @@ const VkAllocationCallbacks *pAllocator, VkPipeline *pPipelines) { - VN_TRACE_FUNC(); struct vn_device *dev = vn_device_from_handle(device); const VkAllocationCallbacks *alloc = pAllocator ? pAllocator : &dev->base.base.alloc; @@ -1648,7 +1646,6 @@ VkPipeline _pipeline, const VkAllocationCallbacks *pAllocator) { - VN_TRACE_FUNC(); struct vn_device *dev = vn_device_from_handle(device); struct vn_pipeline *pipeline = vn_pipeline_from_handle(_pipeline); const VkAllocationCallbacks *alloc =
diff --git a/src/virtio/vulkan/vn_query_pool.c b/src/virtio/vulkan/vn_query_pool.c index 36a7565..fd4dc70 100644 --- a/src/virtio/vulkan/vn_query_pool.c +++ b/src/virtio/vulkan/vn_query_pool.c
@@ -24,7 +24,6 @@ const VkAllocationCallbacks *pAllocator, VkQueryPool *pQueryPool) { - VN_TRACE_FUNC(); struct vn_device *dev = vn_device_from_handle(device); const VkAllocationCallbacks *alloc = pAllocator ? pAllocator : &dev->base.base.alloc; @@ -136,7 +135,6 @@ VkQueryPool queryPool, const VkAllocationCallbacks *pAllocator) { - VN_TRACE_FUNC(); struct vn_device *dev = vn_device_from_handle(device); struct vn_query_pool *pool = vn_query_pool_from_handle(queryPool); const VkAllocationCallbacks *alloc; @@ -161,7 +159,6 @@ uint32_t firstQuery, uint32_t queryCount) { - VN_TRACE_FUNC(); struct vn_device *dev = vn_device_from_handle(device); struct vn_query_pool *pool = vn_query_pool_from_handle(queryPool); @@ -292,7 +289,6 @@ VkDeviceSize stride, VkQueryResultFlags flags) { - VN_TRACE_FUNC(); struct vn_device *dev = vn_device_from_handle(device); struct vn_query_pool *pool = vn_query_pool_from_handle(queryPool); const VkAllocationCallbacks *alloc = &pool->allocator;