tmp_write_buffer(memory_manager, dst_addr, dst_size, &write_buffer);
// If the input is linear and the output is tiled, swizzle the input and copy it over.
diff --git a/src/video_core/renderer_vulkan/vk_present_manager.cpp b/src/video_core/renderer_vulkan/vk_present_manager.cpp
index 5e7518d96..792ed9615 100755
--- a/src/video_core/renderer_vulkan/vk_present_manager.cpp
+++ b/src/video_core/renderer_vulkan/vk_present_manager.cpp
@@ -329,7 +329,7 @@ void PresentManager::CopyToSwapchainImpl(Frame* frame) {
// to account for that.
const bool is_suboptimal = swapchain.NeedsRecreation();
const bool size_changed =
- swapchain.GetWidth() != frame->width || swapchain.GetHeight() != frame->height;
+ swapchain.GetWidth() < frame->width || swapchain.GetHeight() < frame->height;
if (is_suboptimal || size_changed) {
RecreateSwapchain(frame);
}
diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h
index 810fa9a56..00c8b8e64 100755
--- a/src/video_core/texture_cache/texture_cache.h
+++ b/src/video_core/texture_cache/texture_cache.h
@@ -1084,7 +1084,6 @@ ImageViewId TextureCache::FindImageView(const TICEntry& config) {
ImageViewId& image_view_id = pair->second;
if (is_new) {
image_view_id = CreateImageView(config);
- channel_state->image_views_inv[image_view_id] = config;
}
return image_view_id;
}
@@ -2219,17 +2218,14 @@ template
void TextureCache::RemoveImageViewReferences(std::span removed_views) {
for (size_t c : active_channel_ids) {
auto& channel_info = channel_storage[c];
- for (auto image_view_id : removed_views) {
- auto it_v = channel_info.image_views_inv.find(image_view_id);
- if (it_v == channel_info.image_views_inv.end()) {
- continue;
+ auto it = channel_info.image_views.begin();
+ while (it != channel_info.image_views.end()) {
+ const auto found = std::ranges::find(removed_views, it->second);
+ if (found != removed_views.end()) {
+ it = channel_info.image_views.erase(it);
+ } else {
+ ++it;
}
- auto it = channel_info.image_views.find(it_v->second);
- channel_info.image_views_inv.erase(it_v);
- if (it == channel_info.image_views.end()) {
- continue;
- }
- channel_info.image_views.erase(it);
}
}
}
diff --git a/src/video_core/texture_cache/texture_cache_base.h b/src/video_core/texture_cache/texture_cache_base.h
index 810931e4d..534fc45df 100755
--- a/src/video_core/texture_cache/texture_cache_base.h
+++ b/src/video_core/texture_cache/texture_cache_base.h
@@ -81,7 +81,6 @@ public:
std::vector compute_image_view_ids;
std::unordered_map image_views;
- std::unordered_map image_views_inv;
std::unordered_map samplers;
TextureCacheGPUMap* gpu_page_table;
diff --git a/src/yuzu/configuration/qt_config.cpp b/src/yuzu/configuration/qt_config.cpp
index a71000b72..6aca71d7c 100755
--- a/src/yuzu/configuration/qt_config.cpp
+++ b/src/yuzu/configuration/qt_config.cpp
@@ -348,43 +348,45 @@ void QtConfig::SaveQtPlayerValues(const std::size_t player_index) {
for (int i = 0; i < Settings::NativeButton::NumButtons; ++i) {
const std::string default_param = InputCommon::GenerateKeyboardParam(default_buttons[i]);
- WriteSetting(std::string(player_prefix).append(Settings::NativeButton::mapping[i]),
- player.buttons[i], std::make_optional(default_param));
+ WriteStringSetting(std::string(player_prefix).append(Settings::NativeButton::mapping[i]),
+ player.buttons[i], std::make_optional(default_param));
}
for (int i = 0; i < Settings::NativeAnalog::NumAnalogs; ++i) {
const std::string default_param = InputCommon::GenerateAnalogParamFromKeys(
default_analogs[i][0], default_analogs[i][1], default_analogs[i][2],
default_analogs[i][3], default_stick_mod[i], 0.5f);
- WriteSetting(std::string(player_prefix).append(Settings::NativeAnalog::mapping[i]),
- player.analogs[i], std::make_optional(default_param));
+ WriteStringSetting(std::string(player_prefix).append(Settings::NativeAnalog::mapping[i]),
+ player.analogs[i], std::make_optional(default_param));
}
for (int i = 0; i < Settings::NativeMotion::NumMotions; ++i) {
const std::string default_param = InputCommon::GenerateKeyboardParam(default_motions[i]);
- WriteSetting(std::string(player_prefix).append(Settings::NativeMotion::mapping[i]),
- player.motions[i], std::make_optional(default_param));
+ WriteStringSetting(std::string(player_prefix).append(Settings::NativeMotion::mapping[i]),
+ player.motions[i], std::make_optional(default_param));
}
}
void QtConfig::SaveDebugControlValues() {
for (int i = 0; i < Settings::NativeButton::NumButtons; ++i) {
const std::string default_param = InputCommon::GenerateKeyboardParam(default_buttons[i]);
- WriteSetting(std::string("debug_pad_").append(Settings::NativeButton::mapping[i]),
- Settings::values.debug_pad_buttons[i], std::make_optional(default_param));
+ WriteStringSetting(std::string("debug_pad_").append(Settings::NativeButton::mapping[i]),
+ Settings::values.debug_pad_buttons[i],
+ std::make_optional(default_param));
}
for (int i = 0; i < Settings::NativeAnalog::NumAnalogs; ++i) {
const std::string default_param = InputCommon::GenerateAnalogParamFromKeys(
default_analogs[i][0], default_analogs[i][1], default_analogs[i][2],
default_analogs[i][3], default_stick_mod[i], 0.5f);
- WriteSetting(std::string("debug_pad_").append(Settings::NativeAnalog::mapping[i]),
- Settings::values.debug_pad_analogs[i], std::make_optional(default_param));
+ WriteStringSetting(std::string("debug_pad_").append(Settings::NativeAnalog::mapping[i]),
+ Settings::values.debug_pad_analogs[i],
+ std::make_optional(default_param));
}
}
void QtConfig::SaveHidbusValues() {
const std::string default_param = InputCommon::GenerateAnalogParamFromKeys(
0, 0, default_ringcon_analogs[0], default_ringcon_analogs[1], 0, 0.05f);
- WriteSetting(std::string("ring_controller"), Settings::values.ringcon_analogs,
- std::make_optional(default_param));
+ WriteStringSetting(std::string("ring_controller"), Settings::values.ringcon_analogs,
+ std::make_optional(default_param));
}
void QtConfig::SaveQtControlValues() {
@@ -409,19 +411,20 @@ void QtConfig::SavePathValues() {
WriteCategory(Settings::Category::Paths);
- WriteSetting(std::string("romsPath"), UISettings::values.roms_path);
+ WriteStringSetting(std::string("romsPath"), UISettings::values.roms_path);
BeginArray(std::string("gamedirs"));
for (int i = 0; i < UISettings::values.game_dirs.size(); ++i) {
SetArrayIndex(i);
const auto& game_dir = UISettings::values.game_dirs[i];
- WriteSetting(std::string("path"), game_dir.path);
- WriteSetting(std::string("deep_scan"), game_dir.deep_scan, std::make_optional(false));
- WriteSetting(std::string("expanded"), game_dir.expanded, std::make_optional(true));
+ WriteStringSetting(std::string("path"), game_dir.path);
+ WriteBooleanSetting(std::string("deep_scan"), game_dir.deep_scan,
+ std::make_optional(false));
+ WriteBooleanSetting(std::string("expanded"), game_dir.expanded, std::make_optional(true));
}
EndArray();
- WriteSetting(std::string("recentFiles"),
- UISettings::values.recent_files.join(QStringLiteral(", ")).toStdString());
+ WriteStringSetting(std::string("recentFiles"),
+ UISettings::values.recent_files.join(QStringLiteral(", ")).toStdString());
EndGroup();
}
@@ -438,14 +441,14 @@ void QtConfig::SaveShortcutValues() {
BeginGroup(group);
BeginGroup(name);
- WriteSetting(std::string("KeySeq"), shortcut.keyseq,
- std::make_optional(default_hotkey.keyseq));
- WriteSetting(std::string("Controller_KeySeq"), shortcut.controller_keyseq,
- std::make_optional(default_hotkey.controller_keyseq));
- WriteSetting(std::string("Context"), shortcut.context,
- std::make_optional(default_hotkey.context));
- WriteSetting(std::string("Repeat"), shortcut.repeat,
- std::make_optional(default_hotkey.repeat));
+ WriteStringSetting(std::string("KeySeq"), shortcut.keyseq,
+ std::make_optional(default_hotkey.keyseq));
+ WriteStringSetting(std::string("Controller_KeySeq"), shortcut.controller_keyseq,
+ std::make_optional(default_hotkey.controller_keyseq));
+ WriteIntegerSetting(std::string("Context"), shortcut.context,
+ std::make_optional(default_hotkey.context));
+ WriteBooleanSetting(std::string("Repeat"), shortcut.repeat,
+ std::make_optional(default_hotkey.repeat));
EndGroup(); // name
EndGroup(); // group
@@ -460,9 +463,10 @@ void QtConfig::SaveUIValues() {
WriteCategory(Settings::Category::Ui);
WriteCategory(Settings::Category::UiGeneral);
- WriteSetting(std::string("theme"), UISettings::values.theme,
- std::make_optional(std::string(
- UISettings::themes[static_cast(UISettings::default_theme)].second)));
+ WriteStringSetting(
+ std::string("theme"), UISettings::values.theme,
+ std::make_optional(std::string(
+ UISettings::themes[static_cast(UISettings::default_theme)].second)));
SaveUIGamelistValues();
SaveUILayoutValues();
@@ -482,7 +486,7 @@ void QtConfig::SaveUIGamelistValues() {
BeginArray(std::string("favorites"));
for (int i = 0; i < UISettings::values.favorited_ids.size(); i++) {
SetArrayIndex(i);
- WriteSetting(std::string("program_id"), UISettings::values.favorited_ids[i]);
+ WriteIntegerSetting(std::string("program_id"), UISettings::values.favorited_ids[i]);
}
EndArray(); // favorites
@@ -506,14 +510,15 @@ void QtConfig::SaveMultiplayerValues() {
BeginArray(std::string("username_ban_list"));
for (std::size_t i = 0; i < UISettings::values.multiplayer_ban_list.first.size(); ++i) {
SetArrayIndex(static_cast(i));
- WriteSetting(std::string("username"), UISettings::values.multiplayer_ban_list.first[i]);
+ WriteStringSetting(std::string("username"),
+ UISettings::values.multiplayer_ban_list.first[i]);
}
EndArray(); // username_ban_list
BeginArray(std::string("ip_ban_list"));
for (std::size_t i = 0; i < UISettings::values.multiplayer_ban_list.second.size(); ++i) {
SetArrayIndex(static_cast