From 0a23739c875dcd70d53b6f43a7a764abec64c081 Mon Sep 17 00:00:00 2001 From: pineappleEA Date: Tue, 1 Feb 2022 04:26:00 +0100 Subject: [PATCH] early-access version 2454 --- README.md | 2 +- src/core/hle/kernel/svc.cpp | 2 +- src/video_core/buffer_cache/buffer_cache.h | 3 ++- src/video_core/engines/engine_upload.cpp | 2 +- src/video_core/engines/maxwell_3d.h | 2 +- src/video_core/gpu.cpp | 6 ++---- src/video_core/rasterizer_interface.h | 4 ++-- src/video_core/renderer_opengl/gl_rasterizer.cpp | 4 ++-- src/video_core/renderer_opengl/gl_rasterizer.h | 3 ++- src/video_core/renderer_vulkan/vk_rasterizer.cpp | 4 ++-- src/video_core/renderer_vulkan/vk_rasterizer.h | 3 ++- 11 files changed, 18 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 7ee76f01e..6ddd0a994 100755 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ yuzu emulator early access ============= -This is the source code for early-access 2452. +This is the source code for early-access 2454. ## Legal Notice diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp index 40bb893ac..4f7aebf3f 100755 --- a/src/core/hle/kernel/svc.cpp +++ b/src/core/hle/kernel/svc.cpp @@ -2613,7 +2613,7 @@ static const FunctionDef SVC_Table_32[] = { {0x33, SvcWrap32, "GetThreadContext32"}, {0x34, SvcWrap32, "WaitForAddress32"}, {0x35, SvcWrap32, "SignalToAddress32"}, - {0x36, nullptr, "Unknown"}, + {0x36, SvcWrap32, "SynchronizePreemptionState32"}, {0x37, nullptr, "Unknown"}, {0x38, nullptr, "Unknown"}, {0x39, nullptr, "Unknown"}, diff --git a/src/video_core/buffer_cache/buffer_cache.h b/src/video_core/buffer_cache/buffer_cache.h index 57184d66b..d1c43c56e 100755 --- a/src/video_core/buffer_cache/buffer_cache.h +++ b/src/video_core/buffer_cache/buffer_cache.h @@ -1697,6 +1697,7 @@ bool BufferCache

::InlineMemory(VAddr dest_address, size_t copy_size, const IntervalType subtract_interval{dest_address, dest_address + copy_size}; ClearDownload(subtract_interval); + common_ranges.subtract(subtract_interval); BufferId buffer_id = FindBuffer(dest_address, static_cast(copy_size)); auto& buffer = slot_buffers[buffer_id]; @@ -1713,7 +1714,7 @@ bool BufferCache

::InlineMemory(VAddr dest_address, size_t copy_size, std::memcpy(src_pointer, inlined_buffer.data(), copy_size); runtime.CopyBuffer(buffer, upload_staging.buffer, copies); } else { - buffer.ImmediateUpload(buffer.Offset(dest_address), inlined_buffer); + buffer.ImmediateUpload(buffer.Offset(dest_address), inlined_buffer.first(copy_size)); } return true; diff --git a/src/video_core/engines/engine_upload.cpp b/src/video_core/engines/engine_upload.cpp index 4eb9a094d..351b110fe 100755 --- a/src/video_core/engines/engine_upload.cpp +++ b/src/video_core/engines/engine_upload.cpp @@ -37,7 +37,7 @@ void State::ProcessData(const u32 data, const bool is_last_call) { } const GPUVAddr address{regs.dest.Address()}; if (is_linear) { - rasterizer->AccelerateInline2Memory(address, copy_size, inner_buffer); + rasterizer->AccelerateInlineToMemory(address, copy_size, inner_buffer); } else { UNIMPLEMENTED_IF(regs.dest.z != 0); UNIMPLEMENTED_IF(regs.dest.depth != 1); diff --git a/src/video_core/engines/maxwell_3d.h b/src/video_core/engines/maxwell_3d.h index e0a435c45..dc9df6c8b 100755 --- a/src/video_core/engines/maxwell_3d.h +++ b/src/video_core/engines/maxwell_3d.h @@ -1557,7 +1557,7 @@ private: static constexpr u32 null_cb_data = 0xFFFFFFFF; struct CBDataState { - static constexpr size_t inline_size = 0x8000; + static constexpr size_t inline_size = 0x4000; std::array, 16> buffer; u32 current{null_cb_data}; u32 id{null_cb_data}; diff --git a/src/video_core/gpu.cpp b/src/video_core/gpu.cpp index 191b97dbf..ba9ba082f 100755 --- a/src/video_core/gpu.cpp +++ b/src/video_core/gpu.cpp @@ -504,14 +504,12 @@ struct GPU::Impl { case BufferMethods::SemaphoreAddressLow: case BufferMethods::SemaphoreSequence: break; - case BufferMethods::UnkCacheFlush: { + case BufferMethods::UnkCacheFlush: rasterizer->SyncGuestHost(); break; - } - case BufferMethods::WrcacheFlush: { + case BufferMethods::WrcacheFlush: rasterizer->SignalReference(); break; - } case BufferMethods::FenceValue: break; case BufferMethods::RefCnt: diff --git a/src/video_core/rasterizer_interface.h b/src/video_core/rasterizer_interface.h index 78e6e566f..1f1f12291 100755 --- a/src/video_core/rasterizer_interface.h +++ b/src/video_core/rasterizer_interface.h @@ -123,8 +123,8 @@ public: [[nodiscard]] virtual Tegra::Engines::AccelerateDMAInterface& AccessAccelerateDMA() = 0; - virtual void AccelerateInline2Memory(GPUVAddr address, size_t copy_size, - std::span memory) = 0; + virtual void AccelerateInlineToMemory(GPUVAddr address, size_t copy_size, + std::span memory) = 0; /// Attempt to use a faster method to display the framebuffer to screen [[nodiscard]] virtual bool AccelerateDisplay(const Tegra::FramebufferConfig& config, diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp index 57a6ff752..142412a8e 100755 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp @@ -484,8 +484,8 @@ Tegra::Engines::AccelerateDMAInterface& RasterizerOpenGL::AccessAccelerateDMA() return accelerate_dma; } -void RasterizerOpenGL::AccelerateInline2Memory(GPUVAddr address, size_t copy_size, - std::span memory) { +void RasterizerOpenGL::AccelerateInlineToMemory(GPUVAddr address, size_t copy_size, + std::span memory) { auto cpu_addr = gpu_memory.GpuToCpuAddress(address); if (!cpu_addr) [[unlikely]] { gpu_memory.WriteBlock(address, memory.data(), copy_size); diff --git a/src/video_core/renderer_opengl/gl_rasterizer.h b/src/video_core/renderer_opengl/gl_rasterizer.h index dd97c279b..98f6fd342 100755 --- a/src/video_core/renderer_opengl/gl_rasterizer.h +++ b/src/video_core/renderer_opengl/gl_rasterizer.h @@ -106,7 +106,8 @@ public: const Tegra::Engines::Fermi2D::Surface& dst, const Tegra::Engines::Fermi2D::Config& copy_config) override; Tegra::Engines::AccelerateDMAInterface& AccessAccelerateDMA() override; - void AccelerateInline2Memory(GPUVAddr address, size_t copy_size, std::span memory) override; + void AccelerateInlineToMemory(GPUVAddr address, size_t copy_size, + std::span memory) override; bool AccelerateDisplay(const Tegra::FramebufferConfig& config, VAddr framebuffer_addr, u32 pixel_stride) override; void LoadDiskResources(u64 title_id, std::stop_token stop_loading, diff --git a/src/video_core/renderer_vulkan/vk_rasterizer.cpp b/src/video_core/renderer_vulkan/vk_rasterizer.cpp index 65c5fd63f..2227d9197 100755 --- a/src/video_core/renderer_vulkan/vk_rasterizer.cpp +++ b/src/video_core/renderer_vulkan/vk_rasterizer.cpp @@ -548,8 +548,8 @@ Tegra::Engines::AccelerateDMAInterface& RasterizerVulkan::AccessAccelerateDMA() return accelerate_dma; } -void RasterizerVulkan::AccelerateInline2Memory(GPUVAddr address, size_t copy_size, - std::span memory) { +void RasterizerVulkan::AccelerateInlineToMemory(GPUVAddr address, size_t copy_size, + std::span memory) { auto cpu_addr = gpu_memory.GpuToCpuAddress(address); if (!cpu_addr) [[unlikely]] { gpu_memory.WriteBlock(address, memory.data(), copy_size); diff --git a/src/video_core/renderer_vulkan/vk_rasterizer.h b/src/video_core/renderer_vulkan/vk_rasterizer.h index bbd79aae4..5af2e275b 100755 --- a/src/video_core/renderer_vulkan/vk_rasterizer.h +++ b/src/video_core/renderer_vulkan/vk_rasterizer.h @@ -99,7 +99,8 @@ public: const Tegra::Engines::Fermi2D::Surface& dst, const Tegra::Engines::Fermi2D::Config& copy_config) override; Tegra::Engines::AccelerateDMAInterface& AccessAccelerateDMA() override; - void AccelerateInline2Memory(GPUVAddr address, size_t copy_size, std::span memory) override; + void AccelerateInlineToMemory(GPUVAddr address, size_t copy_size, + std::span memory) override; bool AccelerateDisplay(const Tegra::FramebufferConfig& config, VAddr framebuffer_addr, u32 pixel_stride) override; void LoadDiskResources(u64 title_id, std::stop_token stop_loading,