Merge branch 'master' into vulkan

This commit is contained in:
Triang3l
2022-06-20 12:34:41 +03:00
62 changed files with 48007 additions and 48017 deletions

View File

@@ -1074,20 +1074,6 @@ std::unique_ptr<ImmediateDrawer> VulkanProvider::CreateImmediateDrawer() {
return VulkanImmediateDrawer::Create(*this);
}
void VulkanProvider::SetDeviceObjectName(VkObjectType type, uint64_t handle,
const char* name) const {
if (!debug_names_used_) {
return;
}
VkDebugUtilsObjectNameInfoEXT name_info;
name_info.sType = VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT;
name_info.pNext = nullptr;
name_info.objectType = type;
name_info.objectHandle = handle;
name_info.pObjectName = name;
ifn_.vkSetDebugUtilsObjectNameEXT(device_, &name_info);
}
void VulkanProvider::AccumulateInstanceExtensions(
size_t properties_count, const VkExtensionProperties* properties,
bool request_debug_utils, InstanceExtensions& instance_extensions,

View File

@@ -221,8 +221,20 @@ class VulkanProvider : public GraphicsProvider {
};
const DeviceFunctions& dfn() const { return dfn_; }
void SetDeviceObjectName(VkObjectType type, uint64_t handle,
const char* name) const;
template <typename T>
void SetDeviceObjectName(VkObjectType type, T handle,
const char* name) const {
if (!debug_names_used_) {
return;
}
VkDebugUtilsObjectNameInfoEXT name_info;
name_info.sType = VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT;
name_info.pNext = nullptr;
name_info.objectType = type;
name_info.objectHandle = uint64_t(handle);
name_info.pObjectName = name;
ifn_.vkSetDebugUtilsObjectNameEXT(device_, &name_info);
}
bool IsSparseBindingSupported() const {
return queue_family_sparse_binding_ != UINT32_MAX;

View File

@@ -147,6 +147,8 @@ bool CreateDedicatedAllocationImage(const VulkanProvider& provider,
uint32_t* memory_type_out = nullptr,
VkDeviceSize* memory_size_out = nullptr);
// Explicitly accepting const uint32_t* to make sure attention is paid to the
// alignment where this is called for safety on different host architectures.
inline VkShaderModule CreateShaderModule(const VulkanProvider& provider,
const uint32_t* code,
size_t code_size_bytes) {