diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2021-03-27 07:08:31 +0100 |
---|---|---|
committer | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-07-23 03:51:24 +0200 |
commit | 675a82416d7775dc7a252a5d8f5b704e6b8f2326 (patch) | |
tree | 4964c92716029716255d75e26dcc033487df6b1e /src/video_core | |
parent | vk_pipeline_cache: Fix pipeline and shader caches (diff) | |
download | yuzu-675a82416d7775dc7a252a5d8f5b704e6b8f2326.tar yuzu-675a82416d7775dc7a252a5d8f5b704e6b8f2326.tar.gz yuzu-675a82416d7775dc7a252a5d8f5b704e6b8f2326.tar.bz2 yuzu-675a82416d7775dc7a252a5d8f5b704e6b8f2326.tar.lz yuzu-675a82416d7775dc7a252a5d8f5b704e6b8f2326.tar.xz yuzu-675a82416d7775dc7a252a5d8f5b704e6b8f2326.tar.zst yuzu-675a82416d7775dc7a252a5d8f5b704e6b8f2326.zip |
Diffstat (limited to 'src/video_core')
-rw-r--r-- | src/video_core/renderer_vulkan/vk_pipeline_cache.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp b/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp index 51c155077..251559b16 100644 --- a/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp +++ b/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp @@ -680,7 +680,6 @@ GraphicsPipeline PipelineCache::CreateGraphicsPipeline(ShaderPools& pools, std::array<vk::ShaderModule, Maxwell::MaxShaderStage> modules; u32 binding{0}; - env_index = 0; for (size_t index = 0; index < Maxwell::MaxShaderProgram; ++index) { if (key.unique_hashes[index] == u128{}) { continue; @@ -691,11 +690,8 @@ GraphicsPipeline PipelineCache::CreateGraphicsPipeline(ShaderPools& pools, const size_t stage_index{index - 1}; infos[stage_index] = &program.info; - Shader::Environment& env{*envs[env_index]}; - ++env_index; - - const Shader::Profile profile{MakeProfile(key, env.ShaderStage())}; - const std::vector<u32> code{EmitSPIRV(profile, env, program, binding)}; + const Shader::Profile profile{MakeProfile(key, program.stage)}; + const std::vector<u32> code{EmitSPIRV(profile, program, binding)}; modules[stage_index] = BuildShader(device, code); } return GraphicsPipeline(maxwell3d, gpu_memory, scheduler, buffer_cache, texture_cache, device, @@ -753,7 +749,7 @@ ComputePipeline PipelineCache::CreateComputePipeline(ShaderPools& pools, 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, env, program, binding)}; + std::vector<u32> code{EmitSPIRV(base_profile, program, binding)}; return ComputePipeline{device, descriptor_pool, update_descriptor_queue, program.info, BuildShader(device, code)}; } |