Hash :
376d309c
Author :
Date :
2022-12-15T09:43:00
Vulkan: Remove unnecessary usesBuffer() check There are places that we call setQueueSerial after usesBuffer() check. This was useful when we had the ResourceList where it is more expensive to set serial. But now setQueueSerial is cheap (actually is cheaper than usesBuffer check), so there is no need to do this check any more. This CL removes the check to further reduce the CPU overhead. Because of this, mUsedBufferCount will not be accurate, so this CL also removes the tracking of mUsedBufferCount (was only for informational purpose anyway). This CL also removes commandBufferQueueSerial.valid() check in Resource::usedByCommandBuffer() and turns it into assertion. Some places in contextVk will ensure we only call it on started renderpass so that other places that calls usedByCommandBuffer will not need to eat the if check. Bug: b/262047600 Change-Id: I6b8004b6aa5b567fa94c0eb56801054f818838b1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4112145 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
// GENERATED FILE - DO NOT EDIT.
// Generated by gen_overlay_widgets.py using data from overlay_widgets.json.
//
// Copyright 2019 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// Overlay_autogen.cpp:
// Autogenerated overlay widget declarations.
namespace gl
{
enum class WidgetId
{
// Frames per second (Count/Second).
FPS,
// Last validation error (Text).
VulkanLastValidationMessage,
// Number of validation errors and warnings (Count).
VulkanValidationMessageCount,
// Number of RenderPasses in a frame (Count).
VulkanRenderPassCount,
// Secondary Command Buffer pool memory waste (Bytes).
VulkanSecondaryCommandBufferPoolWaste,
// Number of Descriptor Set writes in a frame (Count).
VulkanWriteDescriptorSetCount,
// Descriptor Set Allocations.
VulkanDescriptorSetAllocations,
// Shader Resource Descriptor Set Cache Hit Rate.
VulkanShaderResourceDSHitRate,
// Buffer Allocations Made By vk::DynamicBuffer.
VulkanDynamicBufferAllocations,
// Total size of all descriptor set caches
VulkanDescriptorCacheSize,
// Number of cached Texture descriptor sets
VulkanTextureDescriptorCacheSize,
// Number of cached default uniform descriptor sets
VulkanUniformDescriptorCacheSize,
// Total size of all keys in the descriptor set caches
VulkanDescriptorCacheKeySize,
// Number of times the Vulkan backend attempted to submit commands
VulkanAttemptedSubmissions,
// Number of times the Vulkan backend actually submitted commands
VulkanActualSubmissions,
// Number of times the Vulkan backend has looked up the pipeline cache
VulkanPipelineCacheLookups,
// Number of times the Vulkan backend has missed the pipeline cache
VulkanPipelineCacheMisses,
// Total time spent creating pipelines that missed the cache.
VulkanTotalPipelineCacheMissTimeMs,
// Total time spent creating pipelines that hit the cache.
VulkanTotalPipelineCacheHitTimeMs,
InvalidEnum,
EnumCount = InvalidEnum,
};
// We can use this "X" macro to generate multiple code patterns.
#define ANGLE_WIDGET_ID_X(PROC) \
PROC(FPS) \
PROC(VulkanLastValidationMessage) \
PROC(VulkanValidationMessageCount) \
PROC(VulkanRenderPassCount) \
PROC(VulkanSecondaryCommandBufferPoolWaste) \
PROC(VulkanWriteDescriptorSetCount) \
PROC(VulkanDescriptorSetAllocations) \
PROC(VulkanShaderResourceDSHitRate) \
PROC(VulkanDynamicBufferAllocations) \
PROC(VulkanDescriptorCacheSize) \
PROC(VulkanTextureDescriptorCacheSize) \
PROC(VulkanUniformDescriptorCacheSize) \
PROC(VulkanDescriptorCacheKeySize) \
PROC(VulkanAttemptedSubmissions) \
PROC(VulkanActualSubmissions) \
PROC(VulkanPipelineCacheLookups) \
PROC(VulkanPipelineCacheMisses) \
PROC(VulkanTotalPipelineCacheMissTimeMs) \
PROC(VulkanTotalPipelineCacheHitTimeMs)
} // namespace gl