early-access version 2507

This commit is contained in:
pineappleEA 2022-02-26 07:17:54 +01:00
parent e59ad71cae
commit 1abd33afdb
4 changed files with 9 additions and 5 deletions

View File

@ -1,7 +1,7 @@
yuzu emulator early access yuzu emulator early access
============= =============
This is the source code for early-access 2506. This is the source code for early-access 2507.
## Legal Notice ## Legal Notice

View File

@ -1119,10 +1119,10 @@ void BufferCache<P>::BindHostGraphicsStorageBuffers(size_t stage) {
const Binding& binding = storage_buffers[stage][index]; const Binding& binding = storage_buffers[stage][index];
Buffer& buffer = slot_buffers[binding.buffer_id]; Buffer& buffer = slot_buffers[binding.buffer_id];
TouchBuffer(buffer, 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<u32>(buffer.SizeBytes()) - offset;
SynchronizeBuffer(buffer, binding.cpu_addr, size); 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; const bool is_written = ((written_storage_buffers[stage] >> index) & 1) != 0;
if constexpr (NEEDS_BIND_STORAGE_INDEX) { if constexpr (NEEDS_BIND_STORAGE_INDEX) {
runtime.BindStorageBuffer(stage, binding_index, buffer, offset, size, is_written); runtime.BindStorageBuffer(stage, binding_index, buffer, offset, size, is_written);
@ -1204,10 +1204,10 @@ void BufferCache<P>::BindHostComputeStorageBuffers() {
const Binding& binding = compute_storage_buffers[index]; const Binding& binding = compute_storage_buffers[index];
Buffer& buffer = slot_buffers[binding.buffer_id]; Buffer& buffer = slot_buffers[binding.buffer_id];
TouchBuffer(buffer, 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<u32>(buffer.SizeBytes()) - offset;
SynchronizeBuffer(buffer, binding.cpu_addr, size); 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; const bool is_written = ((written_compute_storage_buffers >> index) & 1) != 0;
if constexpr (NEEDS_BIND_STORAGE_INDEX) { if constexpr (NEEDS_BIND_STORAGE_INDEX) {
runtime.BindComputeStorageBuffer(binding_index, buffer, offset, size, is_written); runtime.BindComputeStorageBuffer(binding_index, buffer, offset, size, is_written);

View File

@ -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:
case Maxwell::VertexAttribute::Size::Size_32_32_32_32: case Maxwell::VertexAttribute::Size::Size_32_32_32_32:
return GL_FLOAT; return GL_FLOAT;
case Maxwell::VertexAttribute::Size::Size_11_11_10:
return GL_UNSIGNED_INT_10F_11F_11F_REV;
default: default:
break; break;
} }

View File

@ -495,6 +495,8 @@ VkFormat VertexFormat(Maxwell::VertexAttribute::Type type, Maxwell::VertexAttrib
return VK_FORMAT_R32G32B32_SFLOAT; return VK_FORMAT_R32G32B32_SFLOAT;
case Maxwell::VertexAttribute::Size::Size_32_32_32_32: case Maxwell::VertexAttribute::Size::Size_32_32_32_32:
return VK_FORMAT_R32G32B32A32_SFLOAT; return VK_FORMAT_R32G32B32A32_SFLOAT;
case Maxwell::VertexAttribute::Size::Size_11_11_10:
return VK_FORMAT_B10G11R11_UFLOAT_PACK32;
default: default:
break; break;
} }