mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-24 05:49:58 +00:00
Remove std::string from VulkanProfiler (the scope profiler for uploads)
This commit is contained in:
parent
6a7682368d
commit
c05ec8b520
@ -40,7 +40,7 @@ void VulkanProfiler::BeginFrame(VulkanContext *vulkan, VkCommandBuffer firstComm
|
||||
// Log it all out.
|
||||
for (auto &scope : scopes_) {
|
||||
if (scope.endQueryId == -1) {
|
||||
WARN_LOG(G3D, "Unclosed scope: %s", scope.name.c_str());
|
||||
WARN_LOG(G3D, "Unclosed scope: %s", scope.name);
|
||||
continue;
|
||||
}
|
||||
uint64_t startTime = results[scope.startQueryId];
|
||||
@ -50,7 +50,7 @@ void VulkanProfiler::BeginFrame(VulkanContext *vulkan, VkCommandBuffer firstComm
|
||||
|
||||
double milliseconds = (double)delta * timestampConversionFactor;
|
||||
|
||||
INFO_LOG(G3D, "%s%s (%0.3f ms)", indent[scope.level & 3], scope.name.c_str(), milliseconds);
|
||||
INFO_LOG(G3D, "%s%s (%0.3f ms)", indent[scope.level & 3], scope.name, milliseconds);
|
||||
}
|
||||
|
||||
scopes_.clear();
|
||||
@ -73,14 +73,11 @@ void VulkanProfiler::Begin(VkCommandBuffer cmdBuf, VkPipelineStageFlagBits stage
|
||||
return;
|
||||
}
|
||||
|
||||
ProfilerScope scope;
|
||||
va_list args;
|
||||
va_start(args, fmt);
|
||||
char temp[512];
|
||||
vsnprintf(temp, sizeof(temp), fmt, args);
|
||||
vsnprintf(scope.name, sizeof(scope.name), fmt, args);
|
||||
va_end(args);
|
||||
|
||||
ProfilerScope scope;
|
||||
scope.name = temp;
|
||||
scope.startQueryId = numQueries_;
|
||||
scope.endQueryId = -1;
|
||||
scope.level = (int)scopeStack_.size();
|
||||
|
@ -13,7 +13,7 @@
|
||||
// Put the whole thing in a FrameData to allow for overlap.
|
||||
|
||||
struct ProfilerScope {
|
||||
std::string name;
|
||||
char name[52]; // to make a struct size of 64, just because
|
||||
int startQueryId;
|
||||
int endQueryId;
|
||||
int level;
|
||||
|
Loading…
Reference in New Issue
Block a user