summaryrefslogtreecommitdiff
path: root/src/video_core
diff options
context:
space:
mode:
Diffstat (limited to 'src/video_core')
-rw-r--r--src/video_core/renderer_opengl/gl_shader_cache.cpp3
-rw-r--r--src/video_core/renderer_vulkan/vk_pipeline_cache.cpp2
2 files changed, 5 insertions, 0 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_cache.cpp b/src/video_core/renderer_opengl/gl_shader_cache.cpp
index 42ef67628..29c6e1a5f 100644
--- a/src/video_core/renderer_opengl/gl_shader_cache.cpp
+++ b/src/video_core/renderer_opengl/gl_shader_cache.cpp
@@ -42,6 +42,7 @@ namespace {
42using Shader::Backend::GLASM::EmitGLASM; 42using Shader::Backend::GLASM::EmitGLASM;
43using Shader::Backend::GLSL::EmitGLSL; 43using Shader::Backend::GLSL::EmitGLSL;
44using Shader::Backend::SPIRV::EmitSPIRV; 44using Shader::Backend::SPIRV::EmitSPIRV;
45using Shader::Maxwell::ConvertLegacyToGeneric;
45using Shader::Maxwell::MergeDualVertexPrograms; 46using Shader::Maxwell::MergeDualVertexPrograms;
46using Shader::Maxwell::TranslateProgram; 47using Shader::Maxwell::TranslateProgram;
47using VideoCommon::ComputeEnvironment; 48using VideoCommon::ComputeEnvironment;
@@ -462,12 +463,14 @@ std::unique_ptr<GraphicsPipeline> ShaderCache::CreateGraphicsPipeline(
462 MakeRuntimeInfo(key, program, previous_program, glasm_use_storage_buffers, use_glasm)}; 463 MakeRuntimeInfo(key, program, previous_program, glasm_use_storage_buffers, use_glasm)};
463 switch (device.GetShaderBackend()) { 464 switch (device.GetShaderBackend()) {
464 case Settings::ShaderBackend::GLSL: 465 case Settings::ShaderBackend::GLSL:
466 ConvertLegacyToGeneric(program, runtime_info);
465 sources[stage_index] = EmitGLSL(profile, runtime_info, program, binding); 467 sources[stage_index] = EmitGLSL(profile, runtime_info, program, binding);
466 break; 468 break;
467 case Settings::ShaderBackend::GLASM: 469 case Settings::ShaderBackend::GLASM:
468 sources[stage_index] = EmitGLASM(profile, runtime_info, program, binding); 470 sources[stage_index] = EmitGLASM(profile, runtime_info, program, binding);
469 break; 471 break;
470 case Settings::ShaderBackend::SPIRV: 472 case Settings::ShaderBackend::SPIRV:
473 ConvertLegacyToGeneric(program, runtime_info);
471 sources_spirv[stage_index] = EmitSPIRV(profile, runtime_info, program, binding); 474 sources_spirv[stage_index] = EmitSPIRV(profile, runtime_info, program, binding);
472 break; 475 break;
473 } 476 }
diff --git a/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp b/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp
index eb8b4e08b..2728353c8 100644
--- a/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp
+++ b/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp
@@ -48,6 +48,7 @@ MICROPROFILE_DECLARE(Vulkan_PipelineCache);
48 48
49namespace { 49namespace {
50using Shader::Backend::SPIRV::EmitSPIRV; 50using Shader::Backend::SPIRV::EmitSPIRV;
51using Shader::Maxwell::ConvertLegacyToGeneric;
51using Shader::Maxwell::MergeDualVertexPrograms; 52using Shader::Maxwell::MergeDualVertexPrograms;
52using Shader::Maxwell::TranslateProgram; 53using Shader::Maxwell::TranslateProgram;
53using VideoCommon::ComputeEnvironment; 54using VideoCommon::ComputeEnvironment;
@@ -543,6 +544,7 @@ std::unique_ptr<GraphicsPipeline> PipelineCache::CreateGraphicsPipeline(
543 infos[stage_index] = &program.info; 544 infos[stage_index] = &program.info;
544 545
545 const auto runtime_info{MakeRuntimeInfo(programs, key, program, previous_stage)}; 546 const auto runtime_info{MakeRuntimeInfo(programs, key, program, previous_stage)};
547 ConvertLegacyToGeneric(program, runtime_info);
546 const std::vector<u32> code{EmitSPIRV(profile, runtime_info, program, binding)}; 548 const std::vector<u32> code{EmitSPIRV(profile, runtime_info, program, binding)};
547 device.SaveShader(code); 549 device.SaveShader(code);
548 modules[stage_index] = BuildShader(device, code); 550 modules[stage_index] = BuildShader(device, code);