diff --git a/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp b/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp index 7e69b11d8f..58e240ab45 100644 --- a/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp +++ b/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp @@ -284,7 +284,6 @@ PipelineCache::PipelineCache(RasterizerVulkan& rasterizer_, const Device& device descriptor_pool{descriptor_pool_}, update_descriptor_queue{update_descriptor_queue_}, render_pass_cache{render_pass_cache_}, buffer_cache{buffer_cache_}, 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()}, workers(std::max(std::thread::hardware_concurrency(), 2U) - 1, "VkPipelineBuilder"), serialization_thread(1, "VkPipelineSerialization") { @@ -387,7 +386,7 @@ GraphicsPipeline* PipelineCache::CurrentGraphicsPipeline() { GraphicsPipeline* const next{current_pipeline->Next(graphics_key)}; if (next) { current_pipeline = next; - return BuiltPipeline(current_pipeline); + return current_pipeline; } } return CurrentGraphicsPipelineSlowPath(); @@ -535,29 +534,7 @@ GraphicsPipeline* PipelineCache::CurrentGraphicsPipelineSlowPath() { current_pipeline->AddTransition(pipeline.get()); } current_pipeline = pipeline.get(); - return BuiltPipeline(current_pipeline); -} - -GraphicsPipeline* PipelineCache::BuiltPipeline(GraphicsPipeline* pipeline) const noexcept { - if (pipeline->IsBuilt()) { - return pipeline; - } - if (!use_asynchronous_shaders) { - return pipeline; - } - // If something is using depth, we can assume that games are not rendering anything which - // will be used one time. - if (maxwell3d->regs.zeta_enable) { - return nullptr; - } - // If games are using a small index count, we can assume these are full screen quads. - // Usually these shaders are only used once for building textures so we can assume they - // can't be built async - const auto& draw_state = maxwell3d->draw_manager->GetDrawState(); - if (draw_state.index_buffer.count <= 6 || draw_state.vertex_buffer.count <= 6) { - return pipeline; - } - return nullptr; + return current_pipeline; } std::unique_ptr PipelineCache::CreateGraphicsPipeline( diff --git a/src/video_core/renderer_vulkan/vk_pipeline_cache.h b/src/video_core/renderer_vulkan/vk_pipeline_cache.h index 5171912d72..36e651ad33 100644 --- a/src/video_core/renderer_vulkan/vk_pipeline_cache.h +++ b/src/video_core/renderer_vulkan/vk_pipeline_cache.h @@ -117,8 +117,6 @@ public: private: [[nodiscard]] GraphicsPipeline* CurrentGraphicsPipelineSlowPath(); - [[nodiscard]] GraphicsPipeline* BuiltPipeline(GraphicsPipeline* pipeline) const noexcept; - std::unique_ptr CreateGraphicsPipeline(); std::unique_ptr CreateGraphicsPipeline( @@ -149,7 +147,6 @@ private: BufferCache& buffer_cache; TextureCache& texture_cache; VideoCore::ShaderNotify& shader_notify; - bool use_asynchronous_shaders{}; bool use_vulkan_pipeline_cache{}; GraphicsPipelineCacheKey graphics_key{};