mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-11-07 13:39:55 +00:00
perf(agc): log storage image and storage-viewed texture creation only with APS5_DEBUG_LOG
Wolverine re-creates about 340 storage images a second while its dynamic resolution steps; the two unconditional log lines wrote 1.17 million lines to stdout in 25 minutes and took about 11 % of queue worker 0 in a sample. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
f474fb7768
commit
81c67e1be3
1 file changed
+4
@@ -748,7 +748,9 @@ Texture::Texture(const Context& context, const std::shared_ptr<StorageTexture>&
|
||||
Require(source != nullptr && CanCopyFrom(*source, descriptor), "storage image does not match the sampled texture");
|
||||
const auto vkFormat = SampledTextureFormat(context, descriptor.format);
|
||||
const auto geometry = DescribeSurface(descriptor);
|
||||
#ifdef APS5_DEBUG_LOG
|
||||
AGC_LOG_DEFERRED(stdout, "Texture address=0x%llx %ux%u mips=%u viewed from storage image (vk=%d)", static_cast<unsigned long long>(descriptor.baseAddress), descriptor.width, descriptor.height, descriptor.mipCount, static_cast<int>(vkFormat));
|
||||
#endif
|
||||
// Storage images stay in the general layout; the view samples them there.
|
||||
layout = VK_IMAGE_LAYOUT_GENERAL;
|
||||
const auto viewLevelCount = std::min(descriptor.lastLevel, descriptor.mipCount - 1u) - descriptor.baseLevel + 1u;
|
||||
@@ -1092,8 +1094,10 @@ StorageTexture::StorageTexture(const Context& context, TextureDetiler& detiler,
|
||||
Require(mipLevel < descriptor.mipCount, "storage texture mip level is outside the texture");
|
||||
const auto vkFormat = StorageFormatFor(context, ResolveTextureFormat(descriptor.format));
|
||||
storageFormat = vkFormat;
|
||||
#ifdef APS5_DEBUG_LOG
|
||||
AGC_LOG_DEFERRED(stdout, "StorageTexture address=0x%llx %ux%u mips=%u mip=%u layers=%u base=%u dim=%d tile=%d format=%u vk=%d", static_cast<unsigned long long>(descriptor.baseAddress), descriptor.width, descriptor.height, descriptor.mipCount, mipLevel,
|
||||
descriptor.depthOrLastArray, descriptor.baseArray, static_cast<int>(descriptor.dimension), static_cast<int>(descriptor.tileMode), descriptor.format, static_cast<int>(vkFormat));
|
||||
#endif
|
||||
geometry = DescribeSurface(descriptor);
|
||||
mips = geometry.mips;
|
||||
arrayLayers = geometry.layers;
|
||||
|
||||
Reference in new issue
Block a user