mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-08-01 15:02:40 +00:00
video_core: unified Vulkan objects names
This commit is contained in:
parent
36ec2be481
commit
5ddf938fdc
@ -106,10 +106,8 @@ Buffer::Buffer(const Vulkan::Instance& instance_, MemoryUsage usage_, VAddr cpu_
|
|||||||
VmaAllocationInfo alloc_info{};
|
VmaAllocationInfo alloc_info{};
|
||||||
buffer.Create(buffer_ci, usage, &alloc_info);
|
buffer.Create(buffer_ci, usage, &alloc_info);
|
||||||
|
|
||||||
if (instance->HasDebuggingToolAttached()) {
|
const auto device = instance->GetDevice();
|
||||||
const auto device = instance->GetDevice();
|
Vulkan::SetObjectName(device, Handle(), "Buffer {:#x}:{:#x}", cpu_addr, size_bytes);
|
||||||
Vulkan::SetObjectName(device, Handle(), "Buffer {:#x} {} KiB", cpu_addr, size_bytes / 1024);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Map it if it is host visible.
|
// Map it if it is host visible.
|
||||||
VkMemoryPropertyFlags property_flags{};
|
VkMemoryPropertyFlags property_flags{};
|
||||||
@ -152,10 +150,8 @@ StreamBuffer::StreamBuffer(const Vulkan::Instance& instance, Vulkan::Scheduler&
|
|||||||
ReserveWatches(current_watches, WATCHES_INITIAL_RESERVE);
|
ReserveWatches(current_watches, WATCHES_INITIAL_RESERVE);
|
||||||
ReserveWatches(previous_watches, WATCHES_INITIAL_RESERVE);
|
ReserveWatches(previous_watches, WATCHES_INITIAL_RESERVE);
|
||||||
const auto device = instance.GetDevice();
|
const auto device = instance.GetDevice();
|
||||||
if (instance.HasDebuggingToolAttached()) {
|
Vulkan::SetObjectName(device, Handle(), "StreamBuffer({}):{:#x}", BufferTypeName(usage),
|
||||||
Vulkan::SetObjectName(device, Handle(), "StreamBuffer({}): {} KiB", BufferTypeName(usage),
|
size_bytes);
|
||||||
size_bytes / 1024);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::pair<u8*, u64> StreamBuffer::Map(u64 size, u64 alignment) {
|
std::pair<u8*, u64> StreamBuffer::Map(u64 size, u64 alignment) {
|
||||||
|
@ -155,10 +155,9 @@ Image::Image(const Vulkan::Instance& instance_, Vulkan::Scheduler& scheduler_,
|
|||||||
};
|
};
|
||||||
|
|
||||||
image.Create(image_ci);
|
image.Create(image_ci);
|
||||||
if (Config::isMarkersEnabled()) {
|
|
||||||
Vulkan::SetObjectName(instance->GetDevice(), (vk::Image)image, "img {:#x}:{:#x}",
|
Vulkan::SetObjectName(instance->GetDevice(), (vk::Image)image, "Image {:#x}:{:#x}",
|
||||||
info.guest_address, info.guest_size_bytes);
|
info.guest_address, info.guest_size_bytes);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Image::Transit(vk::ImageLayout dst_layout, vk::Flags<vk::AccessFlagBits> dst_mask,
|
void Image::Transit(vk::ImageLayout dst_layout, vk::Flags<vk::AccessFlagBits> dst_mask,
|
||||||
|
Loading…
Reference in New Issue
Block a user