From 83f9be252419979b0064512fcf3e88bc2396248d Mon Sep 17 00:00:00 2001 From: kd-11 Date: Sat, 26 May 2018 13:37:52 +0300 Subject: [PATCH] rsx: Promote FIFO optimizations outside of strict mode - The benefits of FIFO optimizations are huge in some cases. The optimizations also do not break any tested applications so no need to disable with strict mode - A debug option is provided to disable this behaviour for testing --- rpcs3/Emu/RSX/GL/GLGSRender.cpp | 2 +- rpcs3/Emu/RSX/RSXThread.cpp | 2 +- rpcs3/Emu/RSX/VK/VKGSRender.cpp | 2 +- rpcs3/Emu/System.h | 1 + rpcs3/Json/tooltips.json | 3 ++- rpcs3/rpcs3qt/emu_settings.h | 2 ++ rpcs3/rpcs3qt/settings_dialog.cpp | 3 +++ rpcs3/rpcs3qt/settings_dialog.ui | 21 ++++++++++++++------- 8 files changed, 25 insertions(+), 11 deletions(-) diff --git a/rpcs3/Emu/RSX/GL/GLGSRender.cpp b/rpcs3/Emu/RSX/GL/GLGSRender.cpp index 2c414a4bce..d052e98eaa 100644 --- a/rpcs3/Emu/RSX/GL/GLGSRender.cpp +++ b/rpcs3/Emu/RSX/GL/GLGSRender.cpp @@ -31,7 +31,7 @@ GLGSRender::GLGSRender() : GSRender() else m_vertex_cache.reset(new gl::weak_vertex_cache()); - supports_multidraw = !g_cfg.video.strict_rendering_mode; + supports_multidraw = true; supports_native_ui = (bool)g_cfg.misc.use_native_interface; } diff --git a/rpcs3/Emu/RSX/RSXThread.cpp b/rpcs3/Emu/RSX/RSXThread.cpp index aad8fed859..107855d07e 100644 --- a/rpcs3/Emu/RSX/RSXThread.cpp +++ b/rpcs3/Emu/RSX/RSXThread.cpp @@ -717,7 +717,7 @@ namespace rsx bool execute_method_call = true; //TODO: Flatten draw calls when multidraw is not supported to simplify checking in the end() methods - if (supports_multidraw) + if (supports_multidraw && !g_cfg.video.disable_FIFO_reordering) { //TODO: Make this cleaner bool flush_commands_flag = has_deferred_call; diff --git a/rpcs3/Emu/RSX/VK/VKGSRender.cpp b/rpcs3/Emu/RSX/VK/VKGSRender.cpp index 2d90083d3e..6f9631027f 100644 --- a/rpcs3/Emu/RSX/VK/VKGSRender.cpp +++ b/rpcs3/Emu/RSX/VK/VKGSRender.cpp @@ -672,7 +672,7 @@ VKGSRender::VKGSRender() : GSRender() m_ui_renderer.reset(new vk::ui_overlay_renderer()); m_ui_renderer->create(*m_current_command_buffer, m_texture_upload_buffer_ring_info); - supports_multidraw = !g_cfg.video.strict_rendering_mode; + supports_multidraw = true; supports_native_ui = (bool)g_cfg.misc.use_native_interface; } diff --git a/rpcs3/Emu/System.h b/rpcs3/Emu/System.h index b38ce6063b..bbb1c7f2fe 100644 --- a/rpcs3/Emu/System.h +++ b/rpcs3/Emu/System.h @@ -362,6 +362,7 @@ struct cfg_root : cfg::node cfg::_bool strict_rendering_mode{this, "Strict Rendering Mode"}; cfg::_bool disable_zcull_queries{this, "Disable ZCull Occlusion Queries", false}; cfg::_bool disable_vertex_cache{this, "Disable Vertex Cache", false}; + cfg::_bool disable_FIFO_reordering{this, "Disable FIFO Reordering", false}; cfg::_bool frame_skip_enabled{this, "Enable Frame Skip", false}; cfg::_bool force_cpu_blit_processing{this, "Force CPU Blit", false}; // Debugging option cfg::_bool disable_on_disk_shader_cache{this, "Disable On-Disk Shader Cache", false}; diff --git a/rpcs3/Json/tooltips.json b/rpcs3/Json/tooltips.json index b875533c73..bee0008dc9 100644 --- a/rpcs3/Json/tooltips.json +++ b/rpcs3/Json/tooltips.json @@ -48,7 +48,8 @@ "disableOcclusionQueries": "Disables running occlusion queries. Minor to moderate performance boost.\nMight introduce issues with broken occlusion e.g missing geometry and extreme pop-in.", "forceCpuBlitEmulation": "Forces emulation of all blit and image manipulation operations on the CPU.\nRequires 'Write Color Buffers' option to also be enabled in most cases to avoid missing graphics.\nSignificantly degrades performance but is more accurate in some cases.\nThis setting overrides the 'GPU texture scaling' option.", "disableOnDiskShaderCache": "Disables the loading and saving of shaders from and to the shader cache in the data directory.", - "disableVulkanMemAllocator": "Disables the custom Vulkan memory allocator and reverts to direct calls to VkAllocateMemory/VkFreeMemory." + "disableVulkanMemAllocator": "Disables the custom Vulkan memory allocator and reverts to direct calls to VkAllocateMemory/VkFreeMemory.", + "disableFIFOReordering": "Disables RSX FIFO optimizations completely. Draws are processed as they are received by the DMA puller." }, "emulator": { "gui": { diff --git a/rpcs3/rpcs3qt/emu_settings.h b/rpcs3/rpcs3qt/emu_settings.h index c6b035a83d..3bea8e016a 100644 --- a/rpcs3/rpcs3qt/emu_settings.h +++ b/rpcs3/rpcs3qt/emu_settings.h @@ -60,6 +60,7 @@ public: StrictRenderingMode, DisableVertexCache, DisableOcclusionQueries, + DisableFIFOReordering, AnisotropicFilterOverride, ResolutionScale, MinimumScalableDimension, @@ -219,6 +220,7 @@ private: { StrictRenderingMode, { "Video", "Strict Rendering Mode"}}, { DisableVertexCache, { "Video", "Disable Vertex Cache"}}, { DisableOcclusionQueries, { "Video", "Disable ZCull Occlusion Queries" }}, + { DisableFIFOReordering, { "Video", "Disable FIFO Reordering" }}, { ForceCPUBlitEmulation, { "Video", "Force CPU Blit" }}, { DisableOnDiskShaderCache, { "Video", "Disable On-Disk Shader Cache"}}, { DisableVulkanMemAllocator, { "Video", "Disable Vulkan Memory Allocator" }}, diff --git a/rpcs3/rpcs3qt/settings_dialog.cpp b/rpcs3/rpcs3qt/settings_dialog.cpp index b1e15e72f2..6be86737a3 100644 --- a/rpcs3/rpcs3qt/settings_dialog.cpp +++ b/rpcs3/rpcs3qt/settings_dialog.cpp @@ -967,6 +967,9 @@ settings_dialog::settings_dialog(std::shared_ptr guiSettings, std: xemu_settings->EnhanceCheckBox(ui->disableVulkanMemAllocator, emu_settings::DisableVulkanMemAllocator); SubscribeTooltip(ui->disableVulkanMemAllocator, json_debug["disableVulkanMemAllocator"].toString()); + xemu_settings->EnhanceCheckBox(ui->disableFIFOReordering, emu_settings::DisableFIFOReordering); + SubscribeTooltip(ui->disableFIFOReordering, json_debug["disableFIFOReordering"].toString()); + // Checkboxes: core debug options xemu_settings->EnhanceCheckBox(ui->ppuDebug, emu_settings::PPUDebug); SubscribeTooltip(ui->ppuDebug, json_debug["ppuDebug"].toString()); diff --git a/rpcs3/rpcs3qt/settings_dialog.ui b/rpcs3/rpcs3qt/settings_dialog.ui index e14ed8d53e..6111c7244c 100644 --- a/rpcs3/rpcs3qt/settings_dialog.ui +++ b/rpcs3/rpcs3qt/settings_dialog.ui @@ -36,7 +36,7 @@ - 0 + 7 @@ -1700,12 +1700,19 @@ - - - Disable Vulkan Memory Allocator - - - + + + Disable Vulkan Memory Allocator + + + + + + + Disable FIFO Reordering + + +