From 1255a0abc2cc396e144660dbf34903bc5bce52cf Mon Sep 17 00:00:00 2001 From: pineappleEA Date: Tue, 27 Jul 2021 00:52:47 +0200 Subject: [PATCH] early-access version 1926 --- README.md | 2 +- src/shader_recompiler/backend/glasm/emit_glasm.cpp | 2 +- .../backend/spirv/emit_spirv_instructions.h | 2 ++ src/shader_recompiler/frontend/ir/ir_emitter.h | 4 ++-- src/shader_recompiler/frontend/ir/value.h | 4 ++-- src/video_core/renderer_vulkan/vk_buffer_cache.cpp | 10 +++++++--- src/video_core/renderer_vulkan/vk_compute_pass.cpp | 2 +- 7 files changed, 16 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 9f715a8d9..c4624112e 100755 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ yuzu emulator early access ============= -This is the source code for early-access 1920. +This is the source code for early-access 1926. ## Legal Notice diff --git a/src/shader_recompiler/backend/glasm/emit_glasm.cpp b/src/shader_recompiler/backend/glasm/emit_glasm.cpp index a5e8c9b6e..4ce1c4f54 100755 --- a/src/shader_recompiler/backend/glasm/emit_glasm.cpp +++ b/src/shader_recompiler/backend/glasm/emit_glasm.cpp @@ -350,7 +350,7 @@ std::string_view InputPrimitive(InputTopology topology) { case InputTopology::Lines: return "LINES"; case InputTopology::LinesAdjacency: - return "LINESS_ADJACENCY"; + return "LINES_ADJACENCY"; case InputTopology::Triangles: return "TRIANGLES"; case InputTopology::TrianglesAdjacency: diff --git a/src/shader_recompiler/backend/spirv/emit_spirv_instructions.h b/src/shader_recompiler/backend/spirv/emit_spirv_instructions.h index f99c02848..c9db1c164 100755 --- a/src/shader_recompiler/backend/spirv/emit_spirv_instructions.h +++ b/src/shader_recompiler/backend/spirv/emit_spirv_instructions.h @@ -2,6 +2,8 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. +#pragma once + #include #include "common/common_types.h" diff --git a/src/shader_recompiler/frontend/ir/ir_emitter.h b/src/shader_recompiler/frontend/ir/ir_emitter.h index 53f7b3b06..1b89ca5a0 100755 --- a/src/shader_recompiler/frontend/ir/ir_emitter.h +++ b/src/shader_recompiler/frontend/ir/ir_emitter.h @@ -327,8 +327,8 @@ public: const Value& derivates, const Value& offset, const F32& lod_clamp, TextureInstInfo info); [[nodiscard]] Value ImageRead(const Value& handle, const Value& coords, TextureInstInfo info); - [[nodiscard]] void ImageWrite(const Value& handle, const Value& coords, const Value& color, - TextureInstInfo info); + void ImageWrite(const Value& handle, const Value& coords, const Value& color, + TextureInstInfo info); [[nodiscard]] Value ImageAtomicIAdd(const Value& handle, const Value& coords, const Value& value, TextureInstInfo info); diff --git a/src/shader_recompiler/frontend/ir/value.h b/src/shader_recompiler/frontend/ir/value.h index 0c6bf684d..795194d41 100755 --- a/src/shader_recompiler/frontend/ir/value.h +++ b/src/shader_recompiler/frontend/ir/value.h @@ -197,8 +197,8 @@ public: } template - requires(sizeof(FlagsType) <= sizeof(u32) && std::is_trivially_copyable_v) - [[nodiscard]] void SetFlags(FlagsType value) noexcept { + requires(sizeof(FlagsType) <= sizeof(u32) && + std::is_trivially_copyable_v) void SetFlags(FlagsType value) noexcept { std::memcpy(&flags, &value, sizeof(value)); } diff --git a/src/video_core/renderer_vulkan/vk_buffer_cache.cpp b/src/video_core/renderer_vulkan/vk_buffer_cache.cpp index f4b3ee95c..8ac58bc2f 100755 --- a/src/video_core/renderer_vulkan/vk_buffer_cache.cpp +++ b/src/video_core/renderer_vulkan/vk_buffer_cache.cpp @@ -358,7 +358,7 @@ void BufferCacheRuntime::ReserveNullBuffer() { if (null_buffer) { return; } - null_buffer = device.GetLogical().CreateBuffer(VkBufferCreateInfo{ + VkBufferCreateInfo create_info{ .sType = VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO, .pNext = nullptr, .flags = 0, @@ -367,9 +367,13 @@ void BufferCacheRuntime::ReserveNullBuffer() { .sharingMode = VK_SHARING_MODE_EXCLUSIVE, .queueFamilyIndexCount = 0, .pQueueFamilyIndices = nullptr, - }); + }; + if (device.IsExtTransformFeedbackSupported()) { + create_info.usage |= VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT; + } + null_buffer = device.GetLogical().CreateBuffer(create_info); if (device.HasDebuggingToolAttached()) { - null_buffer.SetObjectNameEXT("Null index buffer"); + null_buffer.SetObjectNameEXT("Null buffer"); } null_buffer_commit = memory_allocator.Commit(null_buffer, MemoryUsage::DeviceLocal); diff --git a/src/video_core/renderer_vulkan/vk_compute_pass.cpp b/src/video_core/renderer_vulkan/vk_compute_pass.cpp index 8e426ce2c..73157a15d 100755 --- a/src/video_core/renderer_vulkan/vk_compute_pass.cpp +++ b/src/video_core/renderer_vulkan/vk_compute_pass.cpp @@ -326,7 +326,7 @@ std::pair QuadIndexedPass::Assemble( .sType = VK_STRUCTURE_TYPE_MEMORY_BARRIER, .pNext = nullptr, .srcAccessMask = VK_ACCESS_SHADER_WRITE_BIT, - .dstAccessMask = VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT, + .dstAccessMask = VK_ACCESS_INDEX_READ_BIT, }; const std::array push_constants{base_vertex, index_shift}; const VkDescriptorSet set = descriptor_allocator.Commit();