vk_platform: Always assign names to resources

This commit is contained in:
IndecisiveTurtle 2025-02-23 18:30:30 +02:00
parent 0675f5a554
commit ea206be2e2

View file

@ -3,11 +3,8 @@
#pragma once
#include <memory>
#include <variant>
#include <fmt/format.h>
#include "common/config.h"
#include "common/logging/log.h"
#include "common/types.h"
#include "video_core/renderer_vulkan/vk_common.h"
@ -33,9 +30,6 @@ concept VulkanHandleType = vk::isVulkanHandleType<T>::value;
template <VulkanHandleType HandleType>
void SetObjectName(vk::Device device, const HandleType& handle, std::string_view debug_name) {
if (!Config::getVkHostMarkersEnabled()) {
return;
}
const vk::DebugUtilsObjectNameInfoEXT name_info = {
.objectType = HandleType::objectType,
.objectHandle = reinterpret_cast<u64>(static_cast<typename HandleType::NativeType>(handle)),
@ -50,9 +44,6 @@ void SetObjectName(vk::Device device, const HandleType& handle, std::string_view
template <VulkanHandleType HandleType, typename... Args>
void SetObjectName(vk::Device device, const HandleType& handle, const char* format,
const Args&... args) {
if (!Config::getVkHostMarkersEnabled()) {
return;
}
const std::string debug_name = fmt::vformat(format, fmt::make_format_args(args...));
SetObjectName(device, handle, debug_name);
}