From 1abd33afdb7fc83bbc66abae5e8e406f456a635a Mon Sep 17 00:00:00 2001 From: pineappleEA Date: Sat, 26 Feb 2022 07:17:54 +0100 Subject: [PATCH] early-access version 2507 --- README.md | 2 +- src/video_core/buffer_cache/buffer_cache.h | 8 ++++---- src/video_core/renderer_opengl/maxwell_to_gl.h | 2 ++ src/video_core/renderer_vulkan/maxwell_to_vk.cpp | 2 ++ 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index ed97ccc48..fe09aaf16 100755 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ yuzu emulator early access ============= -This is the source code for early-access 2506. +This is the source code for early-access 2507. ## Legal Notice diff --git a/src/video_core/buffer_cache/buffer_cache.h b/src/video_core/buffer_cache/buffer_cache.h index d1c43c56e..1a01d8257 100755 --- a/src/video_core/buffer_cache/buffer_cache.h +++ b/src/video_core/buffer_cache/buffer_cache.h @@ -1119,10 +1119,10 @@ void BufferCache

::BindHostGraphicsStorageBuffers(size_t stage) { const Binding& binding = storage_buffers[stage][index]; Buffer& buffer = slot_buffers[binding.buffer_id]; TouchBuffer(buffer, binding.buffer_id); - const u32 size = binding.size; + const u32 offset = buffer.Offset(binding.cpu_addr); + const u32 size = static_cast(buffer.SizeBytes()) - offset; SynchronizeBuffer(buffer, binding.cpu_addr, size); - const u32 offset = buffer.Offset(binding.cpu_addr); const bool is_written = ((written_storage_buffers[stage] >> index) & 1) != 0; if constexpr (NEEDS_BIND_STORAGE_INDEX) { runtime.BindStorageBuffer(stage, binding_index, buffer, offset, size, is_written); @@ -1204,10 +1204,10 @@ void BufferCache

::BindHostComputeStorageBuffers() { const Binding& binding = compute_storage_buffers[index]; Buffer& buffer = slot_buffers[binding.buffer_id]; TouchBuffer(buffer, binding.buffer_id); - const u32 size = binding.size; + const u32 offset = buffer.Offset(binding.cpu_addr); + const u32 size = static_cast(buffer.SizeBytes()) - offset; SynchronizeBuffer(buffer, binding.cpu_addr, size); - const u32 offset = buffer.Offset(binding.cpu_addr); const bool is_written = ((written_compute_storage_buffers >> index) & 1) != 0; if constexpr (NEEDS_BIND_STORAGE_INDEX) { runtime.BindComputeStorageBuffer(binding_index, buffer, offset, size, is_written); diff --git a/src/video_core/renderer_opengl/maxwell_to_gl.h b/src/video_core/renderer_opengl/maxwell_to_gl.h index daba42ed9..db5bf1d30 100755 --- a/src/video_core/renderer_opengl/maxwell_to_gl.h +++ b/src/video_core/renderer_opengl/maxwell_to_gl.h @@ -184,6 +184,8 @@ inline GLenum VertexFormat(Maxwell::VertexAttribute attrib) { case Maxwell::VertexAttribute::Size::Size_32_32_32: case Maxwell::VertexAttribute::Size::Size_32_32_32_32: return GL_FLOAT; + case Maxwell::VertexAttribute::Size::Size_11_11_10: + return GL_UNSIGNED_INT_10F_11F_11F_REV; default: break; } diff --git a/src/video_core/renderer_vulkan/maxwell_to_vk.cpp b/src/video_core/renderer_vulkan/maxwell_to_vk.cpp index 751e4792b..1c136c410 100755 --- a/src/video_core/renderer_vulkan/maxwell_to_vk.cpp +++ b/src/video_core/renderer_vulkan/maxwell_to_vk.cpp @@ -495,6 +495,8 @@ VkFormat VertexFormat(Maxwell::VertexAttribute::Type type, Maxwell::VertexAttrib return VK_FORMAT_R32G32B32_SFLOAT; case Maxwell::VertexAttribute::Size::Size_32_32_32_32: return VK_FORMAT_R32G32B32A32_SFLOAT; + case Maxwell::VertexAttribute::Size::Size_11_11_10: + return VK_FORMAT_B10G11R11_UFLOAT_PACK32; default: break; }