summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_vulkan
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2021-04-11 07:50:30 +0200
committerameerj <52414509+ameerj@users.noreply.github.com>2021-07-23 03:51:27 +0200
commit479ca00071ccaab6ca9ac28daf375e1ed15dc447 (patch)
tree2054d994b73a6b1862099a95b069914a347e5e46 /src/video_core/renderer_vulkan
parentspirv: Move phi node patching to a separate function (diff)
downloadyuzu-479ca00071ccaab6ca9ac28daf375e1ed15dc447.tar
yuzu-479ca00071ccaab6ca9ac28daf375e1ed15dc447.tar.gz
yuzu-479ca00071ccaab6ca9ac28daf375e1ed15dc447.tar.bz2
yuzu-479ca00071ccaab6ca9ac28daf375e1ed15dc447.tar.lz
yuzu-479ca00071ccaab6ca9ac28daf375e1ed15dc447.tar.xz
yuzu-479ca00071ccaab6ca9ac28daf375e1ed15dc447.tar.zst
yuzu-479ca00071ccaab6ca9ac28daf375e1ed15dc447.zip
Diffstat (limited to 'src/video_core/renderer_vulkan')
-rw-r--r--src/video_core/renderer_vulkan/vk_compute_pass.cpp1
-rw-r--r--src/video_core/renderer_vulkan/vk_pipeline_cache.cpp4
2 files changed, 4 insertions, 1 deletions
diff --git a/src/video_core/renderer_vulkan/vk_compute_pass.cpp b/src/video_core/renderer_vulkan/vk_compute_pass.cpp
index 2cfe9d4bd..ec9866605 100644
--- a/src/video_core/renderer_vulkan/vk_compute_pass.cpp
+++ b/src/video_core/renderer_vulkan/vk_compute_pass.cpp
@@ -206,6 +206,7 @@ VKComputePass::VKComputePass(const Device& device, VKDescriptorPool& descriptor_
.codeSize = static_cast<u32>(code.size_bytes()),
.pCode = code.data(),
});
+ device.SaveShader(code);
pipeline = device.GetLogical().CreateComputePipeline({
.sType = VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO,
.pNext = nullptr,
diff --git a/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp b/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp
index 25dbefd5c..f699a9bdf 100644
--- a/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp
+++ b/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp
@@ -770,6 +770,7 @@ std::unique_ptr<GraphicsPipeline> PipelineCache::CreateGraphicsPipeline(
const Shader::Profile profile{MakeProfile(key, program.stage)};
const std::vector<u32> code{EmitSPIRV(profile, program, binding)};
+ device.SaveShader(code);
modules[stage_index] = BuildShader(device, code);
if (device.HasDebuggingToolAttached()) {
const std::string name{fmt::format("{:016x}{:016x}", key.unique_hashes[index][0],
@@ -846,7 +847,8 @@ std::unique_ptr<ComputePipeline> PipelineCache::CreateComputePipeline(
Shader::Maxwell::Flow::CFG cfg{env, pools.flow_block, env.StartAddress()};
Shader::IR::Program program{TranslateProgram(pools.inst, pools.block, env, cfg)};
u32 binding{0};
- std::vector<u32> code{EmitSPIRV(base_profile, program, binding)};
+ const std::vector<u32> code{EmitSPIRV(base_profile, program, binding)};
+ device.SaveShader(code);
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])};