@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2019 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
@ -311,6 +314,7 @@ PipelineCache::PipelineCache(Tegra::MaxwellDeviceMemoryManager& device_memory_,
texture_cache { texture_cache_ } , shader_notify { shader_notify_ } ,
use_asynchronous_shaders { Settings : : values . use_asynchronous_shaders . GetValue ( ) } ,
use_vulkan_pipeline_cache { Settings : : values . use_vulkan_driver_pipeline_cache . GetValue ( ) } ,
optimize_spirv_output { Settings : : values . optimize_spirv_output . GetValue ( ) ! = Settings : : SpirvOptimizeMode : : Never } ,
workers ( device . HasBrokenParallelShaderCompiling ( ) ? 1ULL : GetTotalPipelineWorkers ( ) ,
" VkPipelineBuilder " ) ,
serialization_thread ( 1 , " VkPipelineSerialization " ) {
@ -579,6 +583,10 @@ void PipelineCache::LoadDiskResources(u64 title_id, std::stop_token stop_loading
if ( state . statistics ) {
state . statistics - > Report ( ) ;
}
if ( Settings : : values . optimize_spirv_output . GetValue ( ) ! = Settings : : SpirvOptimizeMode : : Always ) {
this - > optimize_spirv_output = false ;
}
}
GraphicsPipeline * PipelineCache : : CurrentGraphicsPipelineSlowPath ( ) {
@ -688,7 +696,7 @@ std::unique_ptr<GraphicsPipeline> PipelineCache::CreateGraphicsPipeline(
const auto runtime_info { MakeRuntimeInfo ( programs , key , program , previous_stage ) } ;
ConvertLegacyToGeneric ( program , runtime_info ) ;
const std : : vector < u32 > code { EmitSPIRV ( profile , runtime_info , program , binding ) } ;
const std : : vector < u32 > code { EmitSPIRV ( profile , runtime_info , program , binding , this - > optimize_spirv_output ) } ;
device . SaveShader ( code ) ;
modules [ stage_index ] = BuildShader ( device , code ) ;
if ( device . HasDebuggingToolAttached ( ) ) {
@ -782,7 +790,7 @@ std::unique_ptr<ComputePipeline> PipelineCache::CreateComputePipeline(
}
auto program { TranslateProgram ( pools . inst , pools . block , env , cfg , host_info ) } ;
const std : : vector < u32 > code { EmitSPIRV ( profile , program ) } ;
const std : : vector < u32 > code { EmitSPIRV ( profile , program , this - > optimize_spirv_output ) } ;
device . SaveShader ( code ) ;
vk : : ShaderModule spv_module { BuildShader ( device , code ) } ;
if ( device . HasDebuggingToolAttached ( ) ) {