mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-12-04 11:43:47 +01:00
Make the Vulkan GPU log profiler a runtime developer setting.
I keep forgetting to disable the define on commit, this is a better solution.
This commit is contained in:
1 parent
748b8287a6
commit
df2f0df155
10 files changed
+28
-18
No files matched your search
@@ -60,12 +60,14 @@ void VulkanProfiler::BeginFrame(VulkanContext *vulkan, VkCommandBuffer firstComm
|
||||
numQueries_ = MAX_QUERY_COUNT;
|
||||
firstFrame_ = false;
|
||||
}
|
||||
vkCmdResetQueryPool(firstCommandBuf, queryPool_, 0, numQueries_);
|
||||
if (numQueries_ > 0) {
|
||||
vkCmdResetQueryPool(firstCommandBuf, queryPool_, 0, numQueries_);
|
||||
}
|
||||
numQueries_ = 0;
|
||||
}
|
||||
|
||||
void VulkanProfiler::Begin(VkCommandBuffer cmdBuf, VkPipelineStageFlagBits stageFlags, const char *fmt, ...) {
|
||||
if (numQueries_ >= MAX_QUERY_COUNT - 1) {
|
||||
if ((enabledPtr_ && !*enabledPtr_) || numQueries_ >= MAX_QUERY_COUNT - 1) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -89,7 +91,7 @@ void VulkanProfiler::Begin(VkCommandBuffer cmdBuf, VkPipelineStageFlagBits stage
|
||||
}
|
||||
|
||||
void VulkanProfiler::End(VkCommandBuffer cmdBuf, VkPipelineStageFlagBits stageFlags) {
|
||||
if (numQueries_ >= MAX_QUERY_COUNT - 1) {
|
||||
if ((enabledPtr_ && !*enabledPtr_) || numQueries_ >= MAX_QUERY_COUNT - 1) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user