diff --git a/rpcs3/Emu/RSX/GL/GLGSRender.cpp b/rpcs3/Emu/RSX/GL/GLGSRender.cpp index 9296da2378..962b8c8cfe 100644 --- a/rpcs3/Emu/RSX/GL/GLGSRender.cpp +++ b/rpcs3/Emu/RSX/GL/GLGSRender.cpp @@ -1204,6 +1204,9 @@ bool GLGSRender::scaled_image_from_memory(rsx::blit_src_info& src, rsx::blit_dst void GLGSRender::check_zcull_status(bool framebuffer_swap, bool force_read) { + if (g_cfg.video.disable_zcull_queries) + return; + bool testing_enabled = zcull_pixel_cnt_enabled || zcull_stats_enabled; if (framebuffer_swap) @@ -1262,6 +1265,9 @@ void GLGSRender::check_zcull_status(bool framebuffer_swap, bool force_read) void GLGSRender::clear_zcull_stats(u32 type) { + if (g_cfg.video.disable_zcull_queries) + return; + if (type == CELL_GCM_ZPASS_PIXEL_CNT) { if (zcull_task_queue.active_query && @@ -1282,6 +1288,9 @@ void GLGSRender::clear_zcull_stats(u32 type) u32 GLGSRender::get_zcull_stats(u32 type) { + if (g_cfg.video.disable_zcull_queries) + return 0u; + if (zcull_task_queue.active_query && zcull_task_queue.active_query->active && current_zcull_stats.zpass_pixel_cnt == 0) diff --git a/rpcs3/Emu/System.h b/rpcs3/Emu/System.h index bb4be13ad7..1f35dd6d6b 100644 --- a/rpcs3/Emu/System.h +++ b/rpcs3/Emu/System.h @@ -325,15 +325,11 @@ struct cfg_root : cfg::node cfg::_bool force_high_precision_z_buffer{this, "Force High Precision Z buffer"}; cfg::_bool invalidate_surface_cache_every_frame{this, "Invalidate Cache Every Frame", true}; 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 batch_instanced_geometry{this, "Batch Instanced Geometry", false}; //Avoid re-uploading geometry if the same draw command is repeated - cfg::_int<1, 16> vertex_upload_threads{ this, "Vertex Upload Threads", 1 }; //Max number of threads to use for parallel vertex processing - cfg::_int<32, 65536> mt_vertex_upload_threshold{ this, "Multithreaded Vertex Upload Threshold", 512}; //Minimum vertex count to parallelize - cfg::_bool frame_skip_enabled{this, "Enable Frame Skip"}; - cfg::_int<1, 8> consequtive_frames_to_draw{this, "Consecutive Frames Drawn", 1}; - cfg::_int<1, 8> consequtive_frames_to_skip{this, "Consecutive Frames Skept", 1}; + cfg::_int<1, 8> consequtive_frames_to_draw{this, "Consecutive Frames To Draw", 1}; + cfg::_int<1, 8> consequtive_frames_to_skip{this, "Consecutive Frames To Skip", 1}; struct node_d3d12 : cfg::node { diff --git a/rpcs3/Json/tooltips.json b/rpcs3/Json/tooltips.json index 3b8f388916..c4ccf6f632 100644 --- a/rpcs3/Json/tooltips.json +++ b/rpcs3/Json/tooltips.json @@ -41,7 +41,9 @@ "forceHighpZ": "Only useful when debugging differences in GPU hardware.\nNot necessary for average users.\nIf unsure, don't use this option.", "debugOutput": "Enables the selected API's inbuilt debugging functionality.\nWill cause severe performance degradation especially with Vulkan.\nOnly useful for developers.\nIf unsure, don't use this option.", "debugOverlay": "Provides a graphical overlay of various debugging information.\nIf unsure, don't use this option.", - "logProg": "Dump game shaders to file. Only useful to developers.\nIf unsure, don't use this option." + "logProg": "Dump game shaders to file. Only useful to developers.\nIf unsure, don't use this option.", + "disableOcclusionQueries": "Disables running occlusion queries. Minor to moderate performance boost.\nMight introduce issues with broken occlusion e.g missing geometry and extreme pop-in.", + "disableVertexCache": "Disables the vertex cache.\nMight resolve missing or flickering graphics output.\nMay degrade performance." }, "emulator": { "gui": { @@ -72,7 +74,6 @@ "autoInvalidateCache": "Enable this option if the game has broken shadows. May slightly degrade performance.", "gpuTextureScaling": "Small to significant performance boost in most games and rarely with side effects.\nMay cause texture corruption in rare cases.\nOnly works with OpenGL for now.", "scrictModeRendering": "Enforces strict compliance to the API specification.\nMight result in degraded performance in some games.\nCan resolve rare cases of missing graphics and flickering.\nIf unsure, don't use this option.", - "disableVertexCache": "Disables the vertex cache.\nMight resolve missing or flickering graphics output.\nMay degrade performance.", "stretchToDisplayArea": "Overrides the aspect ratio and stretches the image to the full display area." } }, diff --git a/rpcs3/rpcs3qt/emu_settings.h b/rpcs3/rpcs3qt/emu_settings.h index 653f430606..96ed2745e9 100644 --- a/rpcs3/rpcs3qt/emu_settings.h +++ b/rpcs3/rpcs3qt/emu_settings.h @@ -69,6 +69,7 @@ public: AutoInvalidateCache, StrictRenderingMode, DisableVertexCache, + DisableOcclusionQueries, // Audio AudioRenderer, @@ -164,6 +165,7 @@ private: { AutoInvalidateCache, { "Video", "Invalidate Cache Every Frame"}}, { StrictRenderingMode, { "Video", "Strict Rendering Mode"}}, { DisableVertexCache, { "Video", "Disable Vertex Cache"}}, + { DisableOcclusionQueries,{ "Video", "Disable ZCull Occlusion Queries" }}, { D3D12Adapter, { "Video", "D3D12", "Adapter"}}, { VulkanAdapter, { "Video", "Vulkan", "Adapter"}}, diff --git a/rpcs3/rpcs3qt/settings_dialog.cpp b/rpcs3/rpcs3qt/settings_dialog.cpp index 48912ddc1f..b33bb9c572 100644 --- a/rpcs3/rpcs3qt/settings_dialog.cpp +++ b/rpcs3/rpcs3qt/settings_dialog.cpp @@ -395,9 +395,6 @@ settings_dialog::settings_dialog(std::shared_ptr xSettings, const xemu_settings->EnhanceCheckBox(ui->scrictModeRendering, emu_settings::StrictRenderingMode); ui->scrictModeRendering->setToolTip(json_gpu_main["scrictModeRendering"].toString()); - xemu_settings->EnhanceCheckBox(ui->disableVertexCache, emu_settings::DisableVertexCache); - ui->disableVertexCache->setToolTip(json_gpu_main["disableVertexCache"].toString()); - // Graphics Adapter QStringList D3D12Adapters = r_Creator.D3D12Adapters; QStringList vulkanAdapters = r_Creator.vulkanAdapters; @@ -845,6 +842,12 @@ settings_dialog::settings_dialog(std::shared_ptr xSettings, const xemu_settings->EnhanceCheckBox(ui->readDepth, emu_settings::ReadDepthBuffer); ui->readDepth->setToolTip(json_debug["readDepth"].toString()); + xemu_settings->EnhanceCheckBox(ui->disableVertexCache, emu_settings::DisableVertexCache); + ui->disableVertexCache->setToolTip(json_debug["disableVertexCache"].toString()); + + xemu_settings->EnhanceCheckBox(ui->disableHwOcclusionQueries, emu_settings::DisableOcclusionQueries); + ui->disableHwOcclusionQueries->setToolTip(json_debug["disableOcclusionQueries"].toString()); + // // Layout fix for High Dpi // diff --git a/rpcs3/rpcs3qt/settings_dialog.ui b/rpcs3/rpcs3qt/settings_dialog.ui index 367218bb90..6dfcb53a6a 100644 --- a/rpcs3/rpcs3qt/settings_dialog.ui +++ b/rpcs3/rpcs3qt/settings_dialog.ui @@ -36,7 +36,7 @@ - 0 + 7 @@ -490,13 +490,6 @@ - - - - Disable Vertex Cache - - - @@ -1361,6 +1354,20 @@ + + + + Disable Vertex Cache + + + + + + + Disable ZCull Occlusion Queries + + +