mirror of
https://git.citron-emu.org/citron/emu
synced 2025-05-13 03:10:36 +01:00
Disable GPU memory manager, memory snapshots, and NCE features
This commit disables GPU memory management, memory snapshots, and NCE functionality by forcing these settings to false throughout the codebase. The changes include: - Hardcoding false values in renderer_vulkan.cpp initialization - Disabling UI controls for these features in configuration screens - Forcing settings to false during configuration read/write operations These features are being disabled to improve stability and prevent potential memory-related issues. Signed-off-by: Zephyron <zephyron@citron-emu.org>
This commit is contained in:
parent
6c10e0034f
commit
f706427815
4 changed files with 34 additions and 5 deletions
|
@ -131,6 +131,13 @@ void ConfigureSystem::Setup(const ConfigurationShared::Builder& builder) {
|
|||
continue;
|
||||
}
|
||||
|
||||
// Skip memory snapshots and hybrid memory settings
|
||||
if (setting->Id() == Settings::values.use_gpu_memory_manager.Id() ||
|
||||
setting->Id() == Settings::values.enable_memory_snapshots.Id() ||
|
||||
setting->Id() == Settings::values.use_nce.Id()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
ConfigurationShared::Widget* widget = builder.BuildWidget(setting, apply_funcs);
|
||||
|
||||
if (widget == nullptr) {
|
||||
|
|
|
@ -75,6 +75,11 @@ void QtConfig::ReadQtValues() {
|
|||
ReadUIValues();
|
||||
}
|
||||
ReadQtControlValues();
|
||||
|
||||
// Always disable memory snapshots and hybrid memory
|
||||
Settings::values.use_gpu_memory_manager.SetValue(false);
|
||||
Settings::values.enable_memory_snapshots.SetValue(false);
|
||||
Settings::values.use_nce.SetValue(false);
|
||||
}
|
||||
|
||||
void QtConfig::ReadQtPlayerValues(const std::size_t player_index) {
|
||||
|
@ -336,6 +341,11 @@ void QtConfig::SaveQtValues() {
|
|||
}
|
||||
SaveQtControlValues();
|
||||
|
||||
// Ensure memory snapshots and hybrid memory are always disabled
|
||||
Settings::values.use_gpu_memory_manager.SetValue(false);
|
||||
Settings::values.enable_memory_snapshots.SetValue(false);
|
||||
Settings::values.use_nce.SetValue(false);
|
||||
|
||||
WriteToIni();
|
||||
}
|
||||
|
||||
|
|
|
@ -759,6 +759,18 @@ Widget::Widget(Settings::BasicSetting* setting_, const TranslationMap& translati
|
|||
if (setting.Switchable() && Settings::IsConfiguringGlobal() && !runtime_lock) {
|
||||
enable &= setting.UsingGlobal();
|
||||
}
|
||||
|
||||
// Disable memory snapshot and hybrid memory checkboxes
|
||||
if (static_cast<u32>(id) == Settings::values.use_gpu_memory_manager.Id() ||
|
||||
static_cast<u32>(id) == Settings::values.enable_memory_snapshots.Id() ||
|
||||
static_cast<u32>(id) == Settings::values.use_nce.Id()) {
|
||||
enable = false;
|
||||
// Also disable the checkbox to prevent it from being changed
|
||||
if (checkbox) {
|
||||
checkbox->setEnabled(false);
|
||||
}
|
||||
}
|
||||
|
||||
this->setEnabled(enable);
|
||||
|
||||
this->setToolTip(tooltip);
|
||||
|
|
|
@ -137,7 +137,7 @@ RendererVulkan::RendererVulkan(Core::TelemetrySession& telemetry_session_,
|
|||
}
|
||||
|
||||
// Initialize HybridMemory system
|
||||
if (Settings::values.use_gpu_memory_manager.GetValue()) {
|
||||
if (false && Settings::values.use_gpu_memory_manager.GetValue()) {
|
||||
#if defined(__linux__) || defined(__ANDROID__) || defined(_WIN32)
|
||||
try {
|
||||
// Define memory size with explicit types to avoid conversion warnings
|
||||
|
@ -312,7 +312,7 @@ void RendererVulkan::RenderScreenshot(std::span<const Tegra::FramebufferConfig>
|
|||
}
|
||||
|
||||
// If memory snapshots are enabled, take a snapshot with the screenshot
|
||||
if (Settings::values.enable_memory_snapshots.GetValue() && hybrid_memory) {
|
||||
if (false && Settings::values.enable_memory_snapshots.GetValue() && hybrid_memory) {
|
||||
try {
|
||||
const auto now = std::chrono::system_clock::now();
|
||||
const auto now_time_t = std::chrono::system_clock::to_time_t(now);
|
||||
|
@ -328,8 +328,8 @@ void RendererVulkan::RenderScreenshot(std::span<const Tegra::FramebufferConfig>
|
|||
std::string snapshot_path = fmt::format("snapshots/memory_snapshot_{}.bin", time_str);
|
||||
hybrid_memory->SaveSnapshot(snapshot_path);
|
||||
|
||||
// Also save a differential snapshot if there's been a previous snapshot
|
||||
if (Settings::values.use_gpu_memory_manager.GetValue()) {
|
||||
// Differential snapshot for tracking memory changes
|
||||
if (false && Settings::values.use_gpu_memory_manager.GetValue()) {
|
||||
std::string diff_path = fmt::format("snapshots/diff_snapshot_{}.bin", time_str);
|
||||
hybrid_memory->SaveDifferentialSnapshot(diff_path);
|
||||
hybrid_memory->ResetDirtyTracking();
|
||||
|
@ -451,7 +451,7 @@ void RendererVulkan::InitializePlatformSpecific() {
|
|||
#endif
|
||||
|
||||
// Create a compute buffer using the HybridMemory system if enabled
|
||||
if (Settings::values.use_gpu_memory_manager.GetValue()) {
|
||||
if (false && Settings::values.use_gpu_memory_manager.GetValue()) {
|
||||
try {
|
||||
// Create a small compute buffer for testing
|
||||
const VkDeviceSize buffer_size = 1 * 1024 * 1024; // 1 MB
|
||||
|
|
Loading…
Reference in a new issue