mirror of
https://git.eden-emu.dev/archive/citron
synced 2026-04-03 01:48:29 -04:00
feat: add Low GPU Accuracy setting for maximum performance
Implements a new "Low" GPU accuracy level that prioritizes performance over accuracy by aggressively cutting corners in GPU emulation. Changes: - Add GpuAccuracy::Low enum and setting infrastructure - Implement IsGPULevelNormal() helper function - Skip texture cache checks and query operations - Use unsafe memory reads for DMA operations - Disable fence delays and query precision - Add UI support for desktop (Qt) and Android Performance optimizations: - Skips texture cache coherency checks (vk/gl_rasterizer.cpp) - Non-blocking query synchronization (query_cache.h) - Unsafe memory operations (dma_pusher.cpp) - No macro parameter refresh (maxwell_3d.cpp) - Immediate fence signaling (fence_manager.h) - Non-precise Vulkan queries (vk_query_cache.cpp) Ideal for lower-end hardware and users prioritizing FPS over accuracy. Works on both desktop and Android platforms. Signed-off-by: Zephyron <zephyron@citron-emu.org>
This commit is contained in:
@@ -153,7 +153,7 @@ public:
|
||||
ReserveHostQuery();
|
||||
scheduler.Record([query_pool = current_query_pool,
|
||||
query_index = current_bank_slot](vk::CommandBuffer cmdbuf) {
|
||||
const bool use_precise = Settings::IsGPULevelHigh();
|
||||
const bool use_precise = Settings::IsGPULevelNormal();
|
||||
cmdbuf.BeginQuery(query_pool, static_cast<u32>(query_index),
|
||||
use_precise ? VK_QUERY_CONTROL_PRECISE_BIT : 0);
|
||||
});
|
||||
@@ -1415,8 +1415,9 @@ bool QueryCacheRuntime::HostConditionalRenderingCompareValues(VideoCommon::Looku
|
||||
return false;
|
||||
}
|
||||
|
||||
const bool is_gpu_high = Settings::IsGPULevelHigh();
|
||||
const bool is_gpu_high = Settings::IsGPULevelNormal();
|
||||
if (!is_gpu_high && impl->device.GetDriverID() == VK_DRIVER_ID_INTEL_PROPRIETARY_WINDOWS) {
|
||||
// Low accuracy: stub conditional rendering on Intel for performance
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -565,7 +565,8 @@ bool RasterizerVulkan::MustFlushRegion(DAddr addr, u64 size, VideoCommon::CacheT
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (!Settings::IsGPULevelHigh()) {
|
||||
if (!Settings::IsGPULevelNormal()) {
|
||||
// Skip texture cache checks for Low accuracy - ultimate performance
|
||||
return false;
|
||||
}
|
||||
if (True(which & VideoCommon::CacheType::TextureCache)) {
|
||||
|
||||
@@ -260,11 +260,14 @@ void Scheduler::AllocateNewContext() {
|
||||
if (query_cache) {
|
||||
#if ANDROID
|
||||
if (Settings::IsGPULevelHigh()) {
|
||||
// This is problematic on Android, disable on GPU Normal.
|
||||
// This is problematic on Android, disable on GPU Normal and Low.
|
||||
query_cache->NotifySegment(true);
|
||||
}
|
||||
#else
|
||||
query_cache->NotifySegment(true);
|
||||
if (Settings::IsGPULevelNormal()) {
|
||||
// Skip query cache operations for Low accuracy
|
||||
query_cache->NotifySegment(true);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -278,13 +281,16 @@ void Scheduler::InvalidateState() {
|
||||
void Scheduler::EndPendingOperations() {
|
||||
#if ANDROID
|
||||
if (Settings::IsGPULevelHigh()) {
|
||||
// This is problematic on Android, disable on GPU Normal.
|
||||
// This is problematic on Android, disable on GPU Normal and Low.
|
||||
// query_cache->DisableStreams();
|
||||
}
|
||||
#else
|
||||
// query_cache->DisableStreams();
|
||||
#endif
|
||||
query_cache->NotifySegment(false);
|
||||
if (Settings::IsGPULevelNormal()) {
|
||||
// Skip query cache operations for Low accuracy
|
||||
query_cache->NotifySegment(false);
|
||||
}
|
||||
EndRenderPass();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user