graphics: name Vulkan images and views only on creation

This commit is contained in:
nmzik
2026-09-25 16:10:29 +04:00
parent bfdbba3aa4
commit 0ec43a8d3d
4 changed files with 15 additions and 56 deletions
@@ -690,6 +690,12 @@ Image::Image(GraphicContext& graphics, CommandScheduler& scheduler, const ImageI
create.extent.width, create.extent.height, create.extent.depth,
static_cast<int>(create.format), create.arrayLayers, create.mipLevels);
}
SetVulkanObjectNameF(
graphics.device, backing.image,
"Kyty.Image[guest=0x{:016x} size=0x{:x} extent={}x{}x{} format={} mips={} layers={} samples={}]",
info.data.address, info.data.size, info.extent.width, info.extent.height, info.extent.depth,
static_cast<uint32_t>(info.pixel_format), info.resources.levels, info.resources.layers,
info.samples);
}
uint64_t Image::HashGuestEdges() const {
@@ -391,6 +391,12 @@ vk::ImageView Image::FindView(const ImageViewInfo& view_info) {
view_info.level_count, view_info.base_layer, view_info.layer_count,
static_cast<vk::ImageUsageFlags::MaskType>(view_info.usage));
}
SetVulkanObjectNameF(
m_graphics.device, view,
"Kyty.ImageView[guest=0x{:016x} format={} aspect=0x{:x} mip={}+{} layer={}+{}]",
info.data.address, static_cast<uint32_t>(normalized.format),
static_cast<vk::ImageAspectFlags::MaskType>(normalized.aspect), normalized.base_level,
normalized.level_count, normalized.base_layer, normalized.layer_count);
views.push_back({normalized, view});
return view;
}