[Vulkan] Better debug names.

This commit is contained in:
gibbed
2018-05-19 15:49:37 -05:00
parent 8064926999
commit b33ccdf0cd
3 changed files with 25 additions and 5 deletions

View File

@@ -49,9 +49,12 @@ bool VulkanShader::Prepare() {
vkCreateShaderModule(*device_, &shader_info, nullptr, &shader_module_);
CheckResult(status, "vkCreateShaderModule");
device_->DbgSetObjectName(uint64_t(shader_module_),
VK_DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT,
xe::format_string("S: %.16llX", ucode_data_hash()));
char typeChar = shader_type_ == ShaderType::kPixel
? 'p'
: shader_type_ == ShaderType::kVertex ? 'v' : 'u';
device_->DbgSetObjectName(
uint64_t(shader_module_), VK_DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT,
xe::format_string("S(%c): %.16llX", typeChar, ucode_data_hash()));
return status == VK_SUCCESS;
}