[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

@ -118,6 +118,9 @@ VkResult PipelineCache::Initialize(
if (status != VK_SUCCESS) {
return status;
}
device_->DbgSetObjectName(uint64_t(geometry_shaders_.line_quad_list),
VK_DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT,
"S(g): Line Quad List");
shader_module_info.codeSize = static_cast<uint32_t>(sizeof(point_list_geom));
shader_module_info.pCode = reinterpret_cast<const uint32_t*>(point_list_geom);
@ -126,6 +129,9 @@ VkResult PipelineCache::Initialize(
if (status != VK_SUCCESS) {
return status;
}
device_->DbgSetObjectName(uint64_t(geometry_shaders_.point_list),
VK_DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT,
"S(g): Point List");
shader_module_info.codeSize = static_cast<uint32_t>(sizeof(quad_list_geom));
shader_module_info.pCode = reinterpret_cast<const uint32_t*>(quad_list_geom);
@ -134,6 +140,9 @@ VkResult PipelineCache::Initialize(
if (status != VK_SUCCESS) {
return status;
}
device_->DbgSetObjectName(uint64_t(geometry_shaders_.quad_list),
VK_DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT,
"S(g): Quad List");
shader_module_info.codeSize = static_cast<uint32_t>(sizeof(rect_list_geom));
shader_module_info.pCode = reinterpret_cast<const uint32_t*>(rect_list_geom);
@ -142,6 +151,9 @@ VkResult PipelineCache::Initialize(
if (status != VK_SUCCESS) {
return status;
}
device_->DbgSetObjectName(uint64_t(geometry_shaders_.rect_list),
VK_DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT,
"S(g): Rect List");
shader_module_info.codeSize = static_cast<uint32_t>(sizeof(dummy_frag));
shader_module_info.pCode = reinterpret_cast<const uint32_t*>(dummy_frag);
@ -150,6 +162,9 @@ VkResult PipelineCache::Initialize(
if (status != VK_SUCCESS) {
return status;
}
device_->DbgSetObjectName(uint64_t(dummy_pixel_shader_),
VK_DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT,
"S(p): Dummy");
return VK_SUCCESS;
}

View File

@ -220,8 +220,10 @@ VkResult CachedTileView::Initialize(VkCommandBuffer command_buffer) {
device_->DbgSetObjectName(
reinterpret_cast<uint64_t>(image), VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT,
xe::format_string("RT: 0x%.8X 0x%.8X(%d)", key.tile_offset,
key.tile_width, key.tile_width));
xe::format_string("RT(d): 0x%.8X 0x%.8X(%d) 0x%.8X(%d) %d %d %d",
key.tile_offset, key.tile_width, key.tile_width,
key.tile_height, key.tile_height, key.color_or_depth,
key.msaa_samples, key.edram_format));
VkMemoryRequirements memory_requirements;
vkGetImageMemoryRequirements(*device_, image, &memory_requirements);

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;
}