::BindHostGraphicsUniformBuffers(size_t stage) {
}
template ::BindHostGraphicsUniformBuffer(size_t stage, u32 index, u32 binding_index,
- bool needs_bind) {
+void BufferCache ::BindHostGraphicsUniformBuffer(size_t stage, u32 index, u32 binding_index, bool needs_bind) {
+ ++channel_state->uniform_cache_shots[0];
const Binding& binding = channel_state->uniform_buffers[stage][index];
const DAddr device_addr = binding.device_addr;
const u32 size = (std::min)(binding.size, (*channel_state->uniform_buffer_sizes)[stage][index]);
Buffer& buffer = slot_buffers[binding.buffer_id];
TouchBuffer(buffer, binding.buffer_id);
- const bool sync_buffer = SynchronizeBuffer(buffer, device_addr, size);
- if (sync_buffer) {
- ++channel_state->uniform_cache_hits[0];
- }
- ++channel_state->uniform_cache_shots[0];
const bool use_fast_buffer = binding.buffer_id != NULL_BUFFER_ID &&
size <= channel_state->uniform_buffer_skip_cache_size &&
!memory_tracker.IsRegionGpuModified(device_addr, size);
@@ -827,7 +822,10 @@ void BufferCache ::BindHostGraphicsUniformBuffer(size_t stage, u32 index, u32
device_memory.ReadBlockUnsafe(device_addr, span.data(), size);
return;
}
-
+ // Classic cached path
+ if (SynchronizeBuffer(buffer, device_addr, size)) {
+ ++channel_state->uniform_cache_hits[0];
+ }
// Skip binding if it's not needed and if the bound buffer is not the fast version
// This exists to avoid instances where the fast buffer is bound and a GPU write happens
needs_bind |= HasFastUniformBufferBound(stage, binding_index);
diff --git a/src/yuzu/configuration/configure_profile_manager.cpp b/src/yuzu/configuration/configure_profile_manager.cpp
index f5de08a676..df74738df4 100644
--- a/src/yuzu/configuration/configure_profile_manager.cpp
+++ b/src/yuzu/configuration/configure_profile_manager.cpp
@@ -373,13 +373,13 @@ bool ConfigureProfileManager::LoadAvatarData() {
const auto romfs = nca->GetRomFS();
if (!romfs) {
QMessageBox::warning(this, tr("Error loading archive"),
- tr("Archive does not contain romfs. It is probably corrupt."));
+ tr("Could not locate RomFS. Your file or decryption keys may be corrupted."));
return false;
}
const auto extracted = FileSys::ExtractRomFS(romfs);
if (!extracted) {
QMessageBox::warning(this, tr("Error extracting archive"),
- tr("Archive could not be extracted. It is probably corrupt."));
+ tr("Could not extract RomFS. Your file or decryption keys may be corrupted."));
return false;
}
const auto chara_dir = extracted->GetSubdirectory("chara");