Compare commits
2 Commits
vk-fix-oom
...
display-mo
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8d40c3b7d4 | ||
|
|
90877dfc85 |
22
externals/CMakeLists.txt
vendored
22
externals/CMakeLists.txt
vendored
@@ -393,16 +393,18 @@ if (ANDROID)
|
||||
add_library(oboe::oboe ALIAS oboe)
|
||||
endif()
|
||||
|
||||
# moltenvk
|
||||
if (NOT YUZU_USE_BUNDLED_MOLTENVK)
|
||||
find_library(MOLTENVK_LIBRARY MoltenVK)
|
||||
else()
|
||||
unset(MOLTENVK_LIBRARY)
|
||||
endif()
|
||||
if (APPLE)
|
||||
# moltenvk
|
||||
if (NOT YUZU_USE_BUNDLED_MOLTENVK)
|
||||
find_library(MOLTENVK_LIBRARY MoltenVK)
|
||||
else()
|
||||
unset(MOLTENVK_LIBRARY)
|
||||
endif()
|
||||
|
||||
# TODO: kosmickrisp?
|
||||
if (NOT MOLTENVK_LIBRARY)
|
||||
AddJsonPackage(moltenvk)
|
||||
# TODO: kosmickrisp?
|
||||
if (NOT MOLTENVK_LIBRARY)
|
||||
AddJsonPackage(moltenvk)
|
||||
|
||||
set(MOLTENVK_LIBRARY "${moltenvk_SOURCE_DIR}/MoltenVK/dylib/macOS/libMoltenVK.dylib" CACHE STRING "" FORCE)
|
||||
set(MOLTENVK_LIBRARY "${moltenvk_SOURCE_DIR}/MoltenVK/dylib/macOS/libMoltenVK.dylib" CACHE STRING "" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -110,35 +110,37 @@ std::string GetTimeZoneString(TimeZone time_zone) {
|
||||
}
|
||||
|
||||
void LogSettings() {
|
||||
const auto log_setting = [](std::string_view name, const auto& value) {
|
||||
LOG_INFO(Config, "{}: {}", name, value);
|
||||
};
|
||||
|
||||
const auto log_path = [](std::string_view name, const std::filesystem::path& path) {
|
||||
LOG_INFO(Config, "{}: {}", name, Common::FS::PathToUTF8String(path));
|
||||
};
|
||||
|
||||
LOG_INFO(Config, "Eden Configuration:");
|
||||
std::deque<std::string> settings_list;
|
||||
for (auto& [category, settings] : values.linkage.by_category) {
|
||||
for (const auto& setting : settings) {
|
||||
if (setting->Id() == values.eden_token.Id()) {
|
||||
// Hide the token secret, for security reasons.
|
||||
continue;
|
||||
// Hide the token secret, for security reasons.
|
||||
if (setting->Id() != values.eden_token.Id()) {
|
||||
auto const is_default = setting->ToString() == setting->DefaultToString();
|
||||
auto const name = fmt::format(
|
||||
"{:c}{:c} {}.{}",
|
||||
is_default ? '-' : 'M',
|
||||
setting->UsingGlobal() ? '-' : 'C', TranslateCategory(category),
|
||||
setting->GetLabel());
|
||||
if (is_default)
|
||||
settings_list.push_back(fmt::format("{}: {}\n", name, setting->Canonicalize()));
|
||||
else
|
||||
settings_list.push_front(fmt::format("{}: {}\n", name, setting->Canonicalize()));
|
||||
}
|
||||
|
||||
const auto name = fmt::format(
|
||||
"{:c}{:c} {}.{}", setting->ToString() == setting->DefaultToString() ? '-' : 'M',
|
||||
setting->UsingGlobal() ? '-' : 'C', TranslateCategory(category),
|
||||
setting->GetLabel());
|
||||
|
||||
log_setting(name, setting->Canonicalize());
|
||||
}
|
||||
}
|
||||
log_path("DataStorage_CacheDir", Common::FS::GetEdenPath(Common::FS::EdenPath::CacheDir));
|
||||
log_path("DataStorage_ConfigDir", Common::FS::GetEdenPath(Common::FS::EdenPath::ConfigDir));
|
||||
log_path("DataStorage_LoadDir", Common::FS::GetEdenPath(Common::FS::EdenPath::LoadDir));
|
||||
log_path("DataStorage_NANDDir", Common::FS::GetEdenPath(Common::FS::EdenPath::NANDDir));
|
||||
log_path("DataStorage_SDMCDir", Common::FS::GetEdenPath(Common::FS::EdenPath::SDMCDir));
|
||||
|
||||
std::string settings_str{};
|
||||
for (auto const& e : settings_list)
|
||||
settings_str += e;
|
||||
LOG_INFO(Config, "Eden Configuration:\n{}", settings_str);
|
||||
#define LOG_PATH(NAME) \
|
||||
LOG_INFO(Config, #NAME ": {}", Common::FS::PathToUTF8String(Common::FS::GetEdenPath(Common::FS::EdenPath::NAME)))
|
||||
LOG_PATH(CacheDir);
|
||||
LOG_PATH(ConfigDir);
|
||||
LOG_PATH(LoadDir);
|
||||
LOG_PATH(NANDDir);
|
||||
LOG_PATH(SDMCDir);
|
||||
#undef LOG_PATH
|
||||
}
|
||||
|
||||
bool getDebugKnobAt(u8 i) {
|
||||
@@ -167,12 +169,10 @@ bool IsDMALevelSafe() {
|
||||
}
|
||||
|
||||
bool IsFastmemEnabled() {
|
||||
if (values.cpu_accuracy.GetValue() == Settings::CpuAccuracy::Debugging) {
|
||||
if (values.cpu_accuracy.GetValue() == Settings::CpuAccuracy::Debugging)
|
||||
return bool(values.cpuopt_fastmem);
|
||||
}
|
||||
if (values.cpu_accuracy.GetValue() == CpuAccuracy::Unsafe) {
|
||||
else if (values.cpu_accuracy.GetValue() == CpuAccuracy::Unsafe)
|
||||
return bool(values.cpuopt_unsafe_host_mmu);
|
||||
}
|
||||
#if !defined(__APPLE__) && !defined(__linux__) && !defined(__ANDROID__) && !defined(_WIN32)
|
||||
return false;
|
||||
#else
|
||||
@@ -338,13 +338,10 @@ void TranslateResolutionInfo(ResolutionSetup setup, ResolutionScalingInfo& info)
|
||||
info.down_shift = 0;
|
||||
break;
|
||||
default:
|
||||
ASSERT(false);
|
||||
info.up_scale = 1;
|
||||
info.down_shift = 0;
|
||||
break;
|
||||
UNREACHABLE();
|
||||
}
|
||||
info.up_factor = static_cast<f32>(info.up_scale) / (1U << info.down_shift);
|
||||
info.down_factor = static_cast<f32>(1U << info.down_shift) / info.up_scale;
|
||||
info.up_factor = f32(info.up_scale) / (1U << info.down_shift);
|
||||
info.down_factor = f32(1U << info.down_shift) / info.up_scale;
|
||||
info.active = info.up_scale != 1 || info.down_shift != 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -525,8 +525,6 @@ struct Values {
|
||||
Category::RendererAdvanced};
|
||||
SwitchableSetting<bool> use_video_framerate{linkage, false, "use_video_framerate",
|
||||
Category::RendererAdvanced};
|
||||
SwitchableSetting<bool> force_smaller_buffers{linkage, false, "force_smaller_buffers",
|
||||
Category::RendererAdvanced};
|
||||
SwitchableSetting<bool> barrier_feedback_loops{linkage, true, "barrier_feedback_loops",
|
||||
Category::RendererAdvanced};
|
||||
|
||||
|
||||
@@ -319,10 +319,6 @@ std::unique_ptr<TranslationMap> InitializeTranslations(QObject* parent)
|
||||
tr("Sync to framerate of video playback"),
|
||||
tr("Run the game at normal speed during video playback, even when the framerate is "
|
||||
"unlocked."));
|
||||
INSERT(Settings,
|
||||
force_smaller_buffers,
|
||||
tr("Force smaller buffers"),
|
||||
tr("Forces buffers to be smaller, may cause reads/writes out of bounds for some games but can fix Out-of-memory errors."));
|
||||
INSERT(Settings,
|
||||
barrier_feedback_loops,
|
||||
tr("Barrier feedback loops"),
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
#include <vector>
|
||||
#include "video_core/renderer_vulkan/vk_texture_cache.h"
|
||||
#include "common/bit_util.h"
|
||||
#include "common/settings.h"
|
||||
#include "common/common_types.h"
|
||||
#include "video_core/engines/draw_manager.h"
|
||||
#include "video_core/host1x/gpu_device_memory_manager.h"
|
||||
@@ -557,9 +556,7 @@ private:
|
||||
.sType = VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO,
|
||||
.pNext = nullptr,
|
||||
.flags = 0,
|
||||
.size = ::Settings::values.force_smaller_buffers.GetValue()
|
||||
? (SamplesQueryBank::QUERY_SIZE * (1ULL << log_2))
|
||||
: (SamplesQueryBank::QUERY_SIZE * num_needed),
|
||||
.size = SamplesQueryBank::QUERY_SIZE * (1ULL << log_2),
|
||||
.usage = VK_BUFFER_USAGE_TRANSFER_DST_BIT | VK_BUFFER_USAGE_TRANSFER_SRC_BIT |
|
||||
VK_BUFFER_USAGE_STORAGE_BUFFER_BIT,
|
||||
.sharingMode = VK_SHARING_MODE_EXCLUSIVE,
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
#include "common/assert.h"
|
||||
#include "common/bit_util.h"
|
||||
#include "common/common_types.h"
|
||||
#include "common/settings.h"
|
||||
#include "common/literals.h"
|
||||
#include "video_core/renderer_vulkan/vk_scheduler.h"
|
||||
#include "video_core/renderer_vulkan/vk_staging_buffer_pool.h"
|
||||
@@ -187,7 +186,7 @@ StagingBufferRef StagingBufferPool::CreateStagingBuffer(size_t size, MemoryUsage
|
||||
.sType = VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO,
|
||||
.pNext = nullptr,
|
||||
.flags = 0,
|
||||
.size = ::Settings::values.force_smaller_buffers.GetValue() ? size : (1ULL << log2),
|
||||
.size = 1ULL << log2,
|
||||
.usage = VK_BUFFER_USAGE_TRANSFER_SRC_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT |
|
||||
VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT | VK_BUFFER_USAGE_STORAGE_BUFFER_BIT |
|
||||
VK_BUFFER_USAGE_INDEX_BUFFER_BIT | VK_BUFFER_USAGE_VERTEX_BUFFER_BIT,
|
||||
|
||||
Reference in New Issue
Block a user