diff options
| author | 2021-03-30 21:28:00 -0300 | |
|---|---|---|
| committer | 2021-07-22 21:51:25 -0400 | |
| commit | 0c933e20dec02e12a4644281b9b7bf9716a5cbb5 (patch) | |
| tree | 50efe837b0653c3c6b9eabadb9a62b5a2c96437d | |
| parent | spirv: Remove unnecesary variable for clip distances (diff) | |
| download | yuzu-0c933e20dec02e12a4644281b9b7bf9716a5cbb5.tar.gz yuzu-0c933e20dec02e12a4644281b9b7bf9716a5cbb5.tar.xz yuzu-0c933e20dec02e12a4644281b9b7bf9716a5cbb5.zip | |
vk_pipeline_cache: Name SPIR-V modules
Diffstat (limited to '')
| -rw-r--r-- | src/video_core/renderer_vulkan/vk_pipeline_cache.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp b/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp index eb4df9000..30a707599 100644 --- a/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp +++ b/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp | |||
| @@ -777,6 +777,11 @@ GraphicsPipeline PipelineCache::CreateGraphicsPipeline(ShaderPools& pools, | |||
| 777 | const Shader::Profile profile{MakeProfile(key, program.stage)}; | 777 | const Shader::Profile profile{MakeProfile(key, program.stage)}; |
| 778 | const std::vector<u32> code{EmitSPIRV(profile, program, binding)}; | 778 | const std::vector<u32> code{EmitSPIRV(profile, program, binding)}; |
| 779 | modules[stage_index] = BuildShader(device, code); | 779 | modules[stage_index] = BuildShader(device, code); |
| 780 | if (device.HasDebuggingToolAttached()) { | ||
| 781 | const std::string name{fmt::format("{:016x}{:016x}", key.unique_hashes[index][0], | ||
| 782 | key.unique_hashes[index][1])}; | ||
| 783 | modules[stage_index].SetObjectNameEXT(name.c_str()); | ||
| 784 | } | ||
| 780 | } | 785 | } |
| 781 | return GraphicsPipeline(maxwell3d, gpu_memory, scheduler, buffer_cache, texture_cache, device, | 786 | return GraphicsPipeline(maxwell3d, gpu_memory, scheduler, buffer_cache, texture_cache, device, |
| 782 | descriptor_pool, update_descriptor_queue, render_pass_cache, key.state, | 787 | descriptor_pool, update_descriptor_queue, render_pass_cache, key.state, |
| @@ -836,8 +841,13 @@ ComputePipeline PipelineCache::CreateComputePipeline(ShaderPools& pools, | |||
| 836 | Shader::IR::Program program{TranslateProgram(pools.inst, pools.block, env, cfg)}; | 841 | Shader::IR::Program program{TranslateProgram(pools.inst, pools.block, env, cfg)}; |
| 837 | u32 binding{0}; | 842 | u32 binding{0}; |
| 838 | std::vector<u32> code{EmitSPIRV(base_profile, program, binding)}; | 843 | std::vector<u32> code{EmitSPIRV(base_profile, program, binding)}; |
| 844 | vk::ShaderModule spv_module{BuildShader(device, code)}; | ||
| 845 | if (device.HasDebuggingToolAttached()) { | ||
| 846 | const auto name{fmt::format("{:016x}{:016x}", key.unique_hash[0], key.unique_hash[1])}; | ||
| 847 | spv_module.SetObjectNameEXT(name.c_str()); | ||
| 848 | } | ||
| 839 | return ComputePipeline{device, descriptor_pool, update_descriptor_queue, program.info, | 849 | return ComputePipeline{device, descriptor_pool, update_descriptor_queue, program.info, |
| 840 | BuildShader(device, code)}; | 850 | std::move(spv_module)}; |
| 841 | } | 851 | } |
| 842 | 852 | ||
| 843 | static Shader::AttributeType CastAttributeType(const FixedPipelineState::VertexAttribute& attr) { | 853 | static Shader::AttributeType CastAttributeType(const FixedPipelineState::VertexAttribute& attr) { |