diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/audio_core/audio_renderer.cpp | 5 | ||||
| -rw-r--r-- | src/audio_core/audio_renderer.h | 1 | ||||
| -rw-r--r-- | src/audio_core/behavior_info.cpp | 6 | ||||
| -rw-r--r-- | src/audio_core/behavior_info.h | 6 | ||||
| -rw-r--r-- | src/audio_core/command_generator.h | 1 | ||||
| -rw-r--r-- | src/audio_core/common.h | 1 | ||||
| -rw-r--r-- | src/audio_core/stream.cpp | 1 | ||||
| -rw-r--r-- | src/video_core/renderer_vulkan/vk_command_pool.cpp | 5 | ||||
| -rw-r--r-- | src/video_core/renderer_vulkan/vk_command_pool.h | 9 | ||||
| -rw-r--r-- | src/video_core/shader/registry.cpp | 50 | ||||
| -rw-r--r-- | src/video_core/shader/registry.h | 2 |
11 files changed, 43 insertions, 44 deletions
diff --git a/src/audio_core/audio_renderer.cpp b/src/audio_core/audio_renderer.cpp index 56dc892b1..a7e851bb8 100644 --- a/src/audio_core/audio_renderer.cpp +++ b/src/audio_core/audio_renderer.cpp | |||
| @@ -3,16 +3,13 @@ | |||
| 3 | // Refer to the license.txt file included. | 3 | // Refer to the license.txt file included. |
| 4 | 4 | ||
| 5 | #include <vector> | 5 | #include <vector> |
| 6 | #include "audio_core/algorithm/interpolate.h" | 6 | |
| 7 | #include "audio_core/audio_out.h" | 7 | #include "audio_core/audio_out.h" |
| 8 | #include "audio_core/audio_renderer.h" | 8 | #include "audio_core/audio_renderer.h" |
| 9 | #include "audio_core/codec.h" | ||
| 10 | #include "audio_core/common.h" | 9 | #include "audio_core/common.h" |
| 11 | #include "audio_core/info_updater.h" | 10 | #include "audio_core/info_updater.h" |
| 12 | #include "audio_core/voice_context.h" | 11 | #include "audio_core/voice_context.h" |
| 13 | #include "common/assert.h" | ||
| 14 | #include "common/logging/log.h" | 12 | #include "common/logging/log.h" |
| 15 | #include "core/core.h" | ||
| 16 | #include "core/hle/kernel/writable_event.h" | 13 | #include "core/hle/kernel/writable_event.h" |
| 17 | #include "core/memory.h" | 14 | #include "core/memory.h" |
| 18 | #include "core/settings.h" | 15 | #include "core/settings.h" |
diff --git a/src/audio_core/audio_renderer.h b/src/audio_core/audio_renderer.h index 2bca795ba..2fd93e058 100644 --- a/src/audio_core/audio_renderer.h +++ b/src/audio_core/audio_renderer.h | |||
| @@ -21,7 +21,6 @@ | |||
| 21 | #include "common/common_funcs.h" | 21 | #include "common/common_funcs.h" |
| 22 | #include "common/common_types.h" | 22 | #include "common/common_types.h" |
| 23 | #include "common/swap.h" | 23 | #include "common/swap.h" |
| 24 | #include "core/hle/kernel/object.h" | ||
| 25 | #include "core/hle/result.h" | 24 | #include "core/hle/result.h" |
| 26 | 25 | ||
| 27 | namespace Core::Timing { | 26 | namespace Core::Timing { |
diff --git a/src/audio_core/behavior_info.cpp b/src/audio_core/behavior_info.cpp index 5d62adb0b..3c2e3e6f1 100644 --- a/src/audio_core/behavior_info.cpp +++ b/src/audio_core/behavior_info.cpp | |||
| @@ -57,15 +57,15 @@ bool BehaviorInfo::IsLongSizePreDelaySupported() const { | |||
| 57 | return AudioCommon::IsRevisionSupported(3, user_revision); | 57 | return AudioCommon::IsRevisionSupported(3, user_revision); |
| 58 | } | 58 | } |
| 59 | 59 | ||
| 60 | bool BehaviorInfo::IsAudioRenererProcessingTimeLimit80PercentSupported() const { | 60 | bool BehaviorInfo::IsAudioRendererProcessingTimeLimit80PercentSupported() const { |
| 61 | return AudioCommon::IsRevisionSupported(5, user_revision); | 61 | return AudioCommon::IsRevisionSupported(5, user_revision); |
| 62 | } | 62 | } |
| 63 | 63 | ||
| 64 | bool BehaviorInfo::IsAudioRenererProcessingTimeLimit75PercentSupported() const { | 64 | bool BehaviorInfo::IsAudioRendererProcessingTimeLimit75PercentSupported() const { |
| 65 | return AudioCommon::IsRevisionSupported(4, user_revision); | 65 | return AudioCommon::IsRevisionSupported(4, user_revision); |
| 66 | } | 66 | } |
| 67 | 67 | ||
| 68 | bool BehaviorInfo::IsAudioRenererProcessingTimeLimit70PercentSupported() const { | 68 | bool BehaviorInfo::IsAudioRendererProcessingTimeLimit70PercentSupported() const { |
| 69 | return AudioCommon::IsRevisionSupported(1, user_revision); | 69 | return AudioCommon::IsRevisionSupported(1, user_revision); |
| 70 | } | 70 | } |
| 71 | 71 | ||
diff --git a/src/audio_core/behavior_info.h b/src/audio_core/behavior_info.h index 50948e8df..512a4ebe3 100644 --- a/src/audio_core/behavior_info.h +++ b/src/audio_core/behavior_info.h | |||
| @@ -49,9 +49,9 @@ public: | |||
| 49 | bool IsAdpcmLoopContextBugFixed() const; | 49 | bool IsAdpcmLoopContextBugFixed() const; |
| 50 | bool IsSplitterSupported() const; | 50 | bool IsSplitterSupported() const; |
| 51 | bool IsLongSizePreDelaySupported() const; | 51 | bool IsLongSizePreDelaySupported() const; |
| 52 | bool IsAudioRenererProcessingTimeLimit80PercentSupported() const; | 52 | bool IsAudioRendererProcessingTimeLimit80PercentSupported() const; |
| 53 | bool IsAudioRenererProcessingTimeLimit75PercentSupported() const; | 53 | bool IsAudioRendererProcessingTimeLimit75PercentSupported() const; |
| 54 | bool IsAudioRenererProcessingTimeLimit70PercentSupported() const; | 54 | bool IsAudioRendererProcessingTimeLimit70PercentSupported() const; |
| 55 | bool IsElapsedFrameCountSupported() const; | 55 | bool IsElapsedFrameCountSupported() const; |
| 56 | bool IsMemoryPoolForceMappingEnabled() const; | 56 | bool IsMemoryPoolForceMappingEnabled() const; |
| 57 | bool IsFlushVoiceWaveBuffersSupported() const; | 57 | bool IsFlushVoiceWaveBuffersSupported() const; |
diff --git a/src/audio_core/command_generator.h b/src/audio_core/command_generator.h index 967d24078..53e57748b 100644 --- a/src/audio_core/command_generator.h +++ b/src/audio_core/command_generator.h | |||
| @@ -7,7 +7,6 @@ | |||
| 7 | #include <array> | 7 | #include <array> |
| 8 | #include "audio_core/common.h" | 8 | #include "audio_core/common.h" |
| 9 | #include "audio_core/voice_context.h" | 9 | #include "audio_core/voice_context.h" |
| 10 | #include "common/common_funcs.h" | ||
| 11 | #include "common/common_types.h" | 10 | #include "common/common_types.h" |
| 12 | 11 | ||
| 13 | namespace Core::Memory { | 12 | namespace Core::Memory { |
diff --git a/src/audio_core/common.h b/src/audio_core/common.h index 72ebce221..7b4a1e9e8 100644 --- a/src/audio_core/common.h +++ b/src/audio_core/common.h | |||
| @@ -3,6 +3,7 @@ | |||
| 3 | // Refer to the license.txt file included. | 3 | // Refer to the license.txt file included. |
| 4 | 4 | ||
| 5 | #pragma once | 5 | #pragma once |
| 6 | |||
| 6 | #include "common/common_funcs.h" | 7 | #include "common/common_funcs.h" |
| 7 | #include "common/common_types.h" | 8 | #include "common/common_types.h" |
| 8 | #include "common/swap.h" | 9 | #include "common/swap.h" |
diff --git a/src/audio_core/stream.cpp b/src/audio_core/stream.cpp index cb33926bc..4bbb1e0c4 100644 --- a/src/audio_core/stream.cpp +++ b/src/audio_core/stream.cpp | |||
| @@ -12,7 +12,6 @@ | |||
| 12 | #include "common/assert.h" | 12 | #include "common/assert.h" |
| 13 | #include "common/logging/log.h" | 13 | #include "common/logging/log.h" |
| 14 | #include "core/core_timing.h" | 14 | #include "core/core_timing.h" |
| 15 | #include "core/core_timing_util.h" | ||
| 16 | #include "core/settings.h" | 15 | #include "core/settings.h" |
| 17 | 16 | ||
| 18 | namespace AudioCore { | 17 | namespace AudioCore { |
diff --git a/src/video_core/renderer_vulkan/vk_command_pool.cpp b/src/video_core/renderer_vulkan/vk_command_pool.cpp index f1abd4b1a..6339f4fe0 100644 --- a/src/video_core/renderer_vulkan/vk_command_pool.cpp +++ b/src/video_core/renderer_vulkan/vk_command_pool.cpp | |||
| @@ -12,6 +12,11 @@ namespace Vulkan { | |||
| 12 | 12 | ||
| 13 | constexpr size_t COMMAND_BUFFER_POOL_SIZE = 0x1000; | 13 | constexpr size_t COMMAND_BUFFER_POOL_SIZE = 0x1000; |
| 14 | 14 | ||
| 15 | struct CommandPool::Pool { | ||
| 16 | vk::CommandPool handle; | ||
| 17 | vk::CommandBuffers cmdbufs; | ||
| 18 | }; | ||
| 19 | |||
| 15 | CommandPool::CommandPool(MasterSemaphore& master_semaphore, const VKDevice& device) | 20 | CommandPool::CommandPool(MasterSemaphore& master_semaphore, const VKDevice& device) |
| 16 | : ResourcePool(master_semaphore, COMMAND_BUFFER_POOL_SIZE), device{device} {} | 21 | : ResourcePool(master_semaphore, COMMAND_BUFFER_POOL_SIZE), device{device} {} |
| 17 | 22 | ||
diff --git a/src/video_core/renderer_vulkan/vk_command_pool.h b/src/video_core/renderer_vulkan/vk_command_pool.h index 3aee239b9..b9cb3fb5d 100644 --- a/src/video_core/renderer_vulkan/vk_command_pool.h +++ b/src/video_core/renderer_vulkan/vk_command_pool.h | |||
| @@ -2,6 +2,8 @@ | |||
| 2 | // Licensed under GPLv2 or any later version | 2 | // Licensed under GPLv2 or any later version |
| 3 | // Refer to the license.txt file included. | 3 | // Refer to the license.txt file included. |
| 4 | 4 | ||
| 5 | #pragma once | ||
| 6 | |||
| 5 | #include <cstddef> | 7 | #include <cstddef> |
| 6 | #include <vector> | 8 | #include <vector> |
| 7 | 9 | ||
| @@ -16,17 +18,14 @@ class VKDevice; | |||
| 16 | class CommandPool final : public ResourcePool { | 18 | class CommandPool final : public ResourcePool { |
| 17 | public: | 19 | public: |
| 18 | explicit CommandPool(MasterSemaphore& master_semaphore, const VKDevice& device); | 20 | explicit CommandPool(MasterSemaphore& master_semaphore, const VKDevice& device); |
| 19 | virtual ~CommandPool(); | 21 | ~CommandPool() override; |
| 20 | 22 | ||
| 21 | void Allocate(size_t begin, size_t end) override; | 23 | void Allocate(size_t begin, size_t end) override; |
| 22 | 24 | ||
| 23 | VkCommandBuffer Commit(); | 25 | VkCommandBuffer Commit(); |
| 24 | 26 | ||
| 25 | private: | 27 | private: |
| 26 | struct Pool { | 28 | struct Pool; |
| 27 | vk::CommandPool handle; | ||
| 28 | vk::CommandBuffers cmdbufs; | ||
| 29 | }; | ||
| 30 | 29 | ||
| 31 | const VKDevice& device; | 30 | const VKDevice& device; |
| 32 | std::vector<Pool> pools; | 31 | std::vector<Pool> pools; |
diff --git a/src/video_core/shader/registry.cpp b/src/video_core/shader/registry.cpp index cdf274e54..148d91fcb 100644 --- a/src/video_core/shader/registry.cpp +++ b/src/video_core/shader/registry.cpp | |||
| @@ -24,44 +24,45 @@ GraphicsInfo MakeGraphicsInfo(ShaderType shader_stage, ConstBufferEngineInterfac | |||
| 24 | if (shader_stage == ShaderType::Compute) { | 24 | if (shader_stage == ShaderType::Compute) { |
| 25 | return {}; | 25 | return {}; |
| 26 | } | 26 | } |
| 27 | auto& graphics = static_cast<Tegra::Engines::Maxwell3D&>(engine); | 27 | |
| 28 | 28 | auto& graphics = dynamic_cast<Tegra::Engines::Maxwell3D&>(engine); | |
| 29 | GraphicsInfo info; | 29 | |
| 30 | info.tfb_layouts = graphics.regs.tfb_layouts; | 30 | return { |
| 31 | info.tfb_varying_locs = graphics.regs.tfb_varying_locs; | 31 | .tfb_layouts = graphics.regs.tfb_layouts, |
| 32 | info.primitive_topology = graphics.regs.draw.topology; | 32 | .tfb_varying_locs = graphics.regs.tfb_varying_locs, |
| 33 | info.tessellation_primitive = graphics.regs.tess_mode.prim; | 33 | .primitive_topology = graphics.regs.draw.topology, |
| 34 | info.tessellation_spacing = graphics.regs.tess_mode.spacing; | 34 | .tessellation_primitive = graphics.regs.tess_mode.prim, |
| 35 | info.tfb_enabled = graphics.regs.tfb_enabled; | 35 | .tessellation_spacing = graphics.regs.tess_mode.spacing, |
| 36 | info.tessellation_clockwise = graphics.regs.tess_mode.cw; | 36 | .tfb_enabled = graphics.regs.tfb_enabled != 0, |
| 37 | return info; | 37 | .tessellation_clockwise = graphics.regs.tess_mode.cw.Value() != 0, |
| 38 | }; | ||
| 38 | } | 39 | } |
| 39 | 40 | ||
| 40 | ComputeInfo MakeComputeInfo(ShaderType shader_stage, ConstBufferEngineInterface& engine) { | 41 | ComputeInfo MakeComputeInfo(ShaderType shader_stage, ConstBufferEngineInterface& engine) { |
| 41 | if (shader_stage != ShaderType::Compute) { | 42 | if (shader_stage != ShaderType::Compute) { |
| 42 | return {}; | 43 | return {}; |
| 43 | } | 44 | } |
| 44 | auto& compute = static_cast<Tegra::Engines::KeplerCompute&>(engine); | 45 | |
| 46 | auto& compute = dynamic_cast<Tegra::Engines::KeplerCompute&>(engine); | ||
| 45 | const auto& launch = compute.launch_description; | 47 | const auto& launch = compute.launch_description; |
| 46 | 48 | ||
| 47 | ComputeInfo info; | 49 | return { |
| 48 | info.workgroup_size = {launch.block_dim_x, launch.block_dim_y, launch.block_dim_z}; | 50 | .workgroup_size = {launch.block_dim_x, launch.block_dim_y, launch.block_dim_z}, |
| 49 | info.local_memory_size_in_words = launch.local_pos_alloc; | 51 | .shared_memory_size_in_words = launch.shared_alloc, |
| 50 | info.shared_memory_size_in_words = launch.shared_alloc; | 52 | .local_memory_size_in_words = launch.local_pos_alloc, |
| 51 | return info; | 53 | }; |
| 52 | } | 54 | } |
| 53 | 55 | ||
| 54 | } // Anonymous namespace | 56 | } // Anonymous namespace |
| 55 | 57 | ||
| 56 | Registry::Registry(Tegra::Engines::ShaderType shader_stage, const SerializedRegistryInfo& info) | 58 | Registry::Registry(ShaderType shader_stage, const SerializedRegistryInfo& info) |
| 57 | : stage{shader_stage}, stored_guest_driver_profile{info.guest_driver_profile}, | 59 | : stage{shader_stage}, stored_guest_driver_profile{info.guest_driver_profile}, |
| 58 | bound_buffer{info.bound_buffer}, graphics_info{info.graphics}, compute_info{info.compute} {} | 60 | bound_buffer{info.bound_buffer}, graphics_info{info.graphics}, compute_info{info.compute} {} |
| 59 | 61 | ||
| 60 | Registry::Registry(Tegra::Engines::ShaderType shader_stage, | 62 | Registry::Registry(ShaderType shader_stage, ConstBufferEngineInterface& engine_) |
| 61 | Tegra::Engines::ConstBufferEngineInterface& engine) | 63 | : stage{shader_stage}, engine{&engine_}, bound_buffer{engine_.GetBoundBuffer()}, |
| 62 | : stage{shader_stage}, engine{&engine}, bound_buffer{engine.GetBoundBuffer()}, | 64 | graphics_info{MakeGraphicsInfo(shader_stage, engine_)}, compute_info{MakeComputeInfo( |
| 63 | graphics_info{MakeGraphicsInfo(shader_stage, engine)}, compute_info{MakeComputeInfo( | 65 | shader_stage, engine_)} {} |
| 64 | shader_stage, engine)} {} | ||
| 65 | 66 | ||
| 66 | Registry::~Registry() = default; | 67 | Registry::~Registry() = default; |
| 67 | 68 | ||
| @@ -113,8 +114,7 @@ std::optional<Tegra::Engines::SamplerDescriptor> Registry::ObtainSeparateSampler | |||
| 113 | return value; | 114 | return value; |
| 114 | } | 115 | } |
| 115 | 116 | ||
| 116 | std::optional<Tegra::Engines::SamplerDescriptor> Registry::ObtainBindlessSampler(u32 buffer, | 117 | std::optional<SamplerDescriptor> Registry::ObtainBindlessSampler(u32 buffer, u32 offset) { |
| 117 | u32 offset) { | ||
| 118 | const std::pair key = {buffer, offset}; | 118 | const std::pair key = {buffer, offset}; |
| 119 | const auto iter = bindless_samplers.find(key); | 119 | const auto iter = bindless_samplers.find(key); |
| 120 | if (iter != bindless_samplers.end()) { | 120 | if (iter != bindless_samplers.end()) { |
diff --git a/src/video_core/shader/registry.h b/src/video_core/shader/registry.h index 231206765..4bebefdde 100644 --- a/src/video_core/shader/registry.h +++ b/src/video_core/shader/registry.h | |||
| @@ -94,7 +94,7 @@ public: | |||
| 94 | explicit Registry(Tegra::Engines::ShaderType shader_stage, const SerializedRegistryInfo& info); | 94 | explicit Registry(Tegra::Engines::ShaderType shader_stage, const SerializedRegistryInfo& info); |
| 95 | 95 | ||
| 96 | explicit Registry(Tegra::Engines::ShaderType shader_stage, | 96 | explicit Registry(Tegra::Engines::ShaderType shader_stage, |
| 97 | Tegra::Engines::ConstBufferEngineInterface& engine); | 97 | Tegra::Engines::ConstBufferEngineInterface& engine_); |
| 98 | 98 | ||
| 99 | ~Registry(); | 99 | ~Registry(); |
| 100 | 100 | ||