summaryrefslogtreecommitdiffstats
path: root/src/video_core
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2021-03-31 02:28:00 +0200
committerameerj <52414509+ameerj@users.noreply.github.com>2021-07-23 03:51:25 +0200
commit0c933e20dec02e12a4644281b9b7bf9716a5cbb5 (patch)
tree50efe837b0653c3c6b9eabadb9a62b5a2c96437d /src/video_core
parentspirv: Remove unnecesary variable for clip distances (diff)
downloadyuzu-0c933e20dec02e12a4644281b9b7bf9716a5cbb5.tar
yuzu-0c933e20dec02e12a4644281b9b7bf9716a5cbb5.tar.gz
yuzu-0c933e20dec02e12a4644281b9b7bf9716a5cbb5.tar.bz2
yuzu-0c933e20dec02e12a4644281b9b7bf9716a5cbb5.tar.lz
yuzu-0c933e20dec02e12a4644281b9b7bf9716a5cbb5.tar.xz
yuzu-0c933e20dec02e12a4644281b9b7bf9716a5cbb5.tar.zst
yuzu-0c933e20dec02e12a4644281b9b7bf9716a5cbb5.zip
Diffstat (limited to 'src/video_core')
-rw-r--r--src/video_core/renderer_vulkan/vk_pipeline_cache.cpp12
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,
const Shader::Profile profile{MakeProfile(key, program.stage)};
const std::vector<u32> code{EmitSPIRV(profile, program, binding)};
modules[stage_index] = BuildShader(device, code);
+ if (device.HasDebuggingToolAttached()) {
+ const std::string name{fmt::format("{:016x}{:016x}", key.unique_hashes[index][0],
+ key.unique_hashes[index][1])};
+ modules[stage_index].SetObjectNameEXT(name.c_str());
+ }
}
return GraphicsPipeline(maxwell3d, gpu_memory, scheduler, buffer_cache, texture_cache, device,
descriptor_pool, update_descriptor_queue, render_pass_cache, key.state,
@@ -836,8 +841,13 @@ ComputePipeline PipelineCache::CreateComputePipeline(ShaderPools& pools,
Shader::IR::Program program{TranslateProgram(pools.inst, pools.block, env, cfg)};
u32 binding{0};
std::vector<u32> code{EmitSPIRV(base_profile, program, binding)};
+ vk::ShaderModule spv_module{BuildShader(device, code)};
+ if (device.HasDebuggingToolAttached()) {
+ const auto name{fmt::format("{:016x}{:016x}", key.unique_hash[0], key.unique_hash[1])};
+ spv_module.SetObjectNameEXT(name.c_str());
+ }
return ComputePipeline{device, descriptor_pool, update_descriptor_queue, program.info,
- BuildShader(device, code)};
+ std::move(spv_module)};
}
static Shader::AttributeType CastAttributeType(const FixedPipelineState::VertexAttribute& attr) {