diff options
author | Liam <byteslice@airmail.cc> | 2022-12-25 04:24:56 +0100 |
---|---|---|
committer | Fernando Sahmkow <fsahmkow27@gmail.com> | 2023-01-01 22:43:58 +0100 |
commit | 4814d87385a3e06a70514be4ecb2739cba358bdf (patch) | |
tree | c13a876c13fb53e8aceed2a6eaad925e1138f896 | |
parent | MacroHLE: Final cleanup and fixes. (diff) | |
download | yuzu-4814d87385a3e06a70514be4ecb2739cba358bdf.tar yuzu-4814d87385a3e06a70514be4ecb2739cba358bdf.tar.gz yuzu-4814d87385a3e06a70514be4ecb2739cba358bdf.tar.bz2 yuzu-4814d87385a3e06a70514be4ecb2739cba358bdf.tar.lz yuzu-4814d87385a3e06a70514be4ecb2739cba358bdf.tar.xz yuzu-4814d87385a3e06a70514be4ecb2739cba358bdf.tar.zst yuzu-4814d87385a3e06a70514be4ecb2739cba358bdf.zip |
-rw-r--r-- | src/video_core/macro/macro_hle.cpp | 3 | ||||
-rw-r--r-- | src/video_core/renderer_vulkan/vk_rasterizer.cpp | 8 | ||||
-rw-r--r-- | src/video_core/renderer_vulkan/vk_staging_buffer_pool.cpp | 3 | ||||
-rw-r--r-- | src/video_core/vulkan_common/vulkan_device.cpp | 27 |
4 files changed, 38 insertions, 3 deletions
diff --git a/src/video_core/macro/macro_hle.cpp b/src/video_core/macro/macro_hle.cpp index 3481fcd41..c08b4abb3 100644 --- a/src/video_core/macro/macro_hle.cpp +++ b/src/video_core/macro/macro_hle.cpp @@ -410,7 +410,8 @@ HLEMacro::HLEMacro(Engines::Maxwell3D& maxwell3d_) : maxwell3d{maxwell3d_} { builders.emplace(0x3F5E74B9C9A50164ULL, std::function<std::unique_ptr<CachedMacro>(Engines::Maxwell3D&)>( [](Engines::Maxwell3D& maxwell3d__) -> std::unique_ptr<CachedMacro> { - return std::make_unique<HLE_MultiDrawIndexedIndirectCount>(maxwell3d__); + return std::make_unique<HLE_MultiDrawIndexedIndirectCount>( + maxwell3d__); })); builders.emplace(0xEAD26C3E2109B06BULL, std::function<std::unique_ptr<CachedMacro>(Engines::Maxwell3D&)>( diff --git a/src/video_core/renderer_vulkan/vk_rasterizer.cpp b/src/video_core/renderer_vulkan/vk_rasterizer.cpp index 3ab2defa2..da76b9a22 100644 --- a/src/video_core/renderer_vulkan/vk_rasterizer.cpp +++ b/src/video_core/renderer_vulkan/vk_rasterizer.cpp @@ -229,9 +229,13 @@ void RasterizerVulkan::DrawIndirect() { const auto& params = maxwell3d->draw_manager->GetIndirectParams(); buffer_cache.SetDrawIndirect(¶ms); PrepareDraw(params.is_indexed, [this, ¶ms] { - const auto [buffer, offset] = buffer_cache.GetDrawIndirectBuffer(); + const auto indirect_buffer = buffer_cache.GetDrawIndirectBuffer(); + const auto& buffer = indirect_buffer.first; + const auto& offset = indirect_buffer.second; if (params.include_count) { - const auto [draw_buffer, offset_base] = buffer_cache.GetDrawIndirectCount(); + const auto count = buffer_cache.GetDrawIndirectCount(); + const auto& draw_buffer = count.first; + const auto& offset_base = count.second; scheduler.Record([draw_buffer_obj = draw_buffer->Handle(), buffer_obj = buffer->Handle(), offset_base, offset, params](vk::CommandBuffer cmdbuf) { diff --git a/src/video_core/renderer_vulkan/vk_staging_buffer_pool.cpp b/src/video_core/renderer_vulkan/vk_staging_buffer_pool.cpp index 202806331..66d2e6a70 100644 --- a/src/video_core/renderer_vulkan/vk_staging_buffer_pool.cpp +++ b/src/video_core/renderer_vulkan/vk_staging_buffer_pool.cpp @@ -199,6 +199,9 @@ StagingBufferRef StagingBufferPool::GetStreamBuffer(size_t size) { .buffer = *stream_buffer, .offset = static_cast<VkDeviceSize>(offset), .mapped_span = std::span<u8>(stream_pointer + offset, size), + .usage{}, + .log2_level{}, + .index{}, }; } diff --git a/src/video_core/vulkan_common/vulkan_device.cpp b/src/video_core/vulkan_common/vulkan_device.cpp index ea62edb13..13d953772 100644 --- a/src/video_core/vulkan_common/vulkan_device.cpp +++ b/src/video_core/vulkan_common/vulkan_device.cpp @@ -576,6 +576,7 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR .pNext = nullptr, .extendedDynamicState2 = VK_TRUE, .extendedDynamicState2LogicOp = ext_extended_dynamic_state_2_extra ? VK_TRUE : VK_FALSE, + .extendedDynamicState2PatchControlPoints = VK_FALSE, }; SetNext(next, dynamic_state_2); } else { @@ -587,8 +588,14 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR dynamic_state_3 = { .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_3_FEATURES_EXT, .pNext = nullptr, + .extendedDynamicState3TessellationDomainOrigin = VK_FALSE, .extendedDynamicState3DepthClampEnable = ext_extended_dynamic_state_3_enables ? VK_TRUE : VK_FALSE, + .extendedDynamicState3PolygonMode = VK_FALSE, + .extendedDynamicState3RasterizationSamples = VK_FALSE, + .extendedDynamicState3SampleMask = VK_FALSE, + .extendedDynamicState3AlphaToCoverageEnable = VK_FALSE, + .extendedDynamicState3AlphaToOneEnable = VK_FALSE, .extendedDynamicState3LogicOpEnable = ext_extended_dynamic_state_3_enables ? VK_TRUE : VK_FALSE, .extendedDynamicState3ColorBlendEnable = @@ -597,6 +604,26 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR ext_extended_dynamic_state_3_blend ? VK_TRUE : VK_FALSE, .extendedDynamicState3ColorWriteMask = ext_extended_dynamic_state_3_blend ? VK_TRUE : VK_FALSE, + .extendedDynamicState3RasterizationStream = VK_FALSE, + .extendedDynamicState3ConservativeRasterizationMode = VK_FALSE, + .extendedDynamicState3ExtraPrimitiveOverestimationSize = VK_FALSE, + .extendedDynamicState3DepthClipEnable = VK_FALSE, + .extendedDynamicState3SampleLocationsEnable = VK_FALSE, + .extendedDynamicState3ColorBlendAdvanced = VK_FALSE, + .extendedDynamicState3ProvokingVertexMode = VK_FALSE, + .extendedDynamicState3LineRasterizationMode = VK_FALSE, + .extendedDynamicState3LineStippleEnable = VK_FALSE, + .extendedDynamicState3DepthClipNegativeOneToOne = VK_FALSE, + .extendedDynamicState3ViewportWScalingEnable = VK_FALSE, + .extendedDynamicState3ViewportSwizzle = VK_FALSE, + .extendedDynamicState3CoverageToColorEnable = VK_FALSE, + .extendedDynamicState3CoverageToColorLocation = VK_FALSE, + .extendedDynamicState3CoverageModulationMode = VK_FALSE, + .extendedDynamicState3CoverageModulationTableEnable = VK_FALSE, + .extendedDynamicState3CoverageModulationTable = VK_FALSE, + .extendedDynamicState3CoverageReductionMode = VK_FALSE, + .extendedDynamicState3RepresentativeFragmentTestEnable = VK_FALSE, + .extendedDynamicState3ShadingRateImageEnable = VK_FALSE, }; SetNext(next, dynamic_state_3); } else { |