diff --git a/README.md b/README.md index 2d1ed838a..f9420928b 100755 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ yuzu emulator early access ============= -This is the source code for early-access 1874. +This is the source code for early-access 1875. ## Legal Notice diff --git a/src/core/hle/service/hid/controllers/npad.cpp b/src/core/hle/service/hid/controllers/npad.cpp index 9e7aa086b..b7f551e40 100755 --- a/src/core/hle/service/hid/controllers/npad.cpp +++ b/src/core/hle/service/hid/controllers/npad.cpp @@ -942,6 +942,11 @@ void Controller_NPad::InitializeVibrationDevice(const DeviceHandle& vibration_de void Controller_NPad::InitializeVibrationDeviceAtIndex(std::size_t npad_index, std::size_t device_index) { + if (!Settings::values.vibration_enabled.GetValue()) { + vibration_devices_mounted[npad_index][device_index] = false; + return; + } + if (vibrations[npad_index][device_index]) { vibration_devices_mounted[npad_index][device_index] = vibrations[npad_index][device_index]->GetStatus() == 1; diff --git a/src/video_core/buffer_cache/buffer_cache.h b/src/video_core/buffer_cache/buffer_cache.h index 79c0bea0e..3f86edb5e 100755 --- a/src/video_core/buffer_cache/buffer_cache.h +++ b/src/video_core/buffer_cache/buffer_cache.h @@ -363,6 +363,8 @@ private: [[nodiscard]] bool HasFastUniformBufferBound(size_t stage, u32 binding_index) const noexcept; + void ClearDownload(IntervalType subtract_interval); + VideoCore::RasterizerInterface& rasterizer; Tegra::Engines::Maxwell3D& maxwell3d; Tegra::Engines::KeplerCompute& kepler_compute; @@ -514,6 +516,14 @@ void BufferCache
::DownloadMemory(VAddr cpu_addr, u64 size) {
});
}
+template ::ClearDownload(IntervalType subtract_interval) {
+ uncommitted_ranges.subtract(subtract_interval);
+ for (auto& interval_set : committed_ranges) {
+ interval_set.subtract(subtract_interval);
+ }
+}
+
template ::DMACopy(GPUVAddr src_address, GPUVAddr dest_address, u64 amount) {
const std::optional ::DMACopy(GPUVAddr src_address, GPUVAddr dest_address, u64 am
}
const IntervalType subtract_interval{*cpu_dest_address, *cpu_dest_address + amount};
- uncommitted_ranges.subtract(subtract_interval);
- for (auto& interval_set : committed_ranges) {
- interval_set.subtract(subtract_interval);
- }
+ ClearDownload(subtract_interval);
BufferId buffer_a;
BufferId buffer_b;
@@ -588,10 +595,7 @@ bool BufferCache ::DMAClear(GPUVAddr dst_address, u64 amount, u32 value) {
}
const IntervalType subtract_interval{*cpu_dst_address, *cpu_dst_address + amount * sizeof(u32)};
- uncommitted_ranges.subtract(subtract_interval);
- for (auto& interval_set : committed_ranges) {
- interval_set.subtract(subtract_interval);
- }
+ ClearDownload(subtract_interval);
common_ranges.subtract(subtract_interval);
const size_t size = amount * sizeof(u32);
@@ -604,6 +608,7 @@ bool BufferCache ::DMAClear(GPUVAddr dst_address, u64 amount, u32 value) {
auto& dest_buffer = slot_buffers[buffer];
const u32 offset = static_cast ::DownloadBufferMemory(Buffer& buffer, VAddr cpu_addr, u64 si
const VAddr end_address = start_address + range_size;
ForEachWrittenRange(start_address, range_size, add_download);
const IntervalType subtract_interval{start_address, end_address};
+ ClearDownload(subtract_interval);
common_ranges.subtract(subtract_interval);
});
if (total_size_bytes == 0) {
diff --git a/src/video_core/renderer_vulkan/vk_rasterizer.cpp b/src/video_core/renderer_vulkan/vk_rasterizer.cpp
index 8ca5fca61..609f5c576 100755
--- a/src/video_core/renderer_vulkan/vk_rasterizer.cpp
+++ b/src/video_core/renderer_vulkan/vk_rasterizer.cpp
@@ -222,11 +222,13 @@ void RasterizerVulkan::Clear() {
.height = std::min(clear_rect.rect.extent.height, render_area.height),
};
- if (use_color) {
+ const u32 color_attachment = regs.clear_buffers.RT;
+ const auto attachment_aspect_mask = framebuffer->ImageRanges()[color_attachment].aspectMask;
+ const bool is_color_rt = (attachment_aspect_mask & VK_IMAGE_ASPECT_COLOR_BIT) != 0;
+ if (use_color && is_color_rt) {
VkClearValue clear_value;
std::memcpy(clear_value.color.float32, regs.clear_color, sizeof(regs.clear_color));
- const u32 color_attachment = regs.clear_buffers.RT;
scheduler.Record([color_attachment, clear_value, clear_rect](vk::CommandBuffer cmdbuf) {
const VkClearAttachment attachment{
.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT,