diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2020-04-28 19:53:47 +0200 |
---|---|---|
committer | Fernando Sahmkow <fsahmkow27@gmail.com> | 2020-04-28 20:02:51 +0200 |
commit | 9df67b20956c8d0ecaf9fea4a3c82858a66adcca (patch) | |
tree | e44689a65b28ea298bd793a8461618ffadebf9f7 | |
parent | MaxwellDMA: Optimize micro copies. (diff) | |
download | yuzu-9df67b20956c8d0ecaf9fea4a3c82858a66adcca.tar yuzu-9df67b20956c8d0ecaf9fea4a3c82858a66adcca.tar.gz yuzu-9df67b20956c8d0ecaf9fea4a3c82858a66adcca.tar.bz2 yuzu-9df67b20956c8d0ecaf9fea4a3c82858a66adcca.tar.lz yuzu-9df67b20956c8d0ecaf9fea4a3c82858a66adcca.tar.xz yuzu-9df67b20956c8d0ecaf9fea4a3c82858a66adcca.tar.zst yuzu-9df67b20956c8d0ecaf9fea4a3c82858a66adcca.zip |
-rw-r--r-- | src/video_core/CMakeLists.txt | 1 | ||||
-rw-r--r-- | src/video_core/engines/engine_interface.h | 5 | ||||
-rw-r--r-- | src/video_core/engines/fermi_2d.h | 3 | ||||
-rw-r--r-- | src/video_core/engines/kepler_compute.cpp | 2 | ||||
-rw-r--r-- | src/video_core/engines/kepler_compute.h | 3 | ||||
-rw-r--r-- | src/video_core/engines/kepler_memory.h | 3 | ||||
-rw-r--r-- | src/video_core/engines/maxwell_3d.h | 3 | ||||
-rw-r--r-- | src/video_core/engines/maxwell_dma.h | 3 | ||||
-rw-r--r-- | src/video_core/gpu.cpp | 6 | ||||
-rw-r--r-- | src/video_core/textures/decoders.h | 1 |
10 files changed, 20 insertions, 10 deletions
diff --git a/src/video_core/CMakeLists.txt b/src/video_core/CMakeLists.txt index 8ede4ba9b..4e86bc4f7 100644 --- a/src/video_core/CMakeLists.txt +++ b/src/video_core/CMakeLists.txt @@ -8,6 +8,7 @@ add_library(video_core STATIC dma_pusher.h engines/const_buffer_engine_interface.h engines/const_buffer_info.h + engines/engine_interface.h engines/engine_upload.cpp engines/engine_upload.h engines/fermi_2d.cpp diff --git a/src/video_core/engines/engine_interface.h b/src/video_core/engines/engine_interface.h index c8f20408d..18a9db7e6 100644 --- a/src/video_core/engines/engine_interface.h +++ b/src/video_core/engines/engine_interface.h @@ -15,7 +15,8 @@ public: virtual void CallMethod(u32 method, u32 method_argument, bool is_last_call) = 0; /// Write multiple values to the register identified by method. - virtual void CallMultiMethod(u32 method, const u32* base_start, u32 amount, u32 methods_pending) = 0; + virtual void CallMultiMethod(u32 method, const u32* base_start, u32 amount, + u32 methods_pending) = 0; }; -} +} // namespace Tegra::Engines diff --git a/src/video_core/engines/fermi_2d.h b/src/video_core/engines/fermi_2d.h index 77c2a0e39..8f37d053f 100644 --- a/src/video_core/engines/fermi_2d.h +++ b/src/video_core/engines/fermi_2d.h @@ -41,7 +41,8 @@ public: void CallMethod(u32 method, u32 method_argument, bool is_last_call) override; /// Write multiple values to the register identified by method. - void CallMultiMethod(u32 method, const u32* base_start, u32 amount, u32 methods_pending) override; + void CallMultiMethod(u32 method, const u32* base_start, u32 amount, + u32 methods_pending) override; enum class Origin : u32 { Center = 0, diff --git a/src/video_core/engines/kepler_compute.cpp b/src/video_core/engines/kepler_compute.cpp index 88717b431..f6237fc6a 100644 --- a/src/video_core/engines/kepler_compute.cpp +++ b/src/video_core/engines/kepler_compute.cpp @@ -24,7 +24,7 @@ KeplerCompute::KeplerCompute(Core::System& system, VideoCore::RasterizerInterfac KeplerCompute::~KeplerCompute() = default; -void KeplerCompute::CallMethod(u32 method, u32 method_argument, bool is_last_call) { +void KeplerCompute::CallMethod(u32 method, u32 method_argument, bool is_last_call) { ASSERT_MSG(method < Regs::NUM_REGS, "Invalid KeplerCompute register, increase the size of the Regs structure"); diff --git a/src/video_core/engines/kepler_compute.h b/src/video_core/engines/kepler_compute.h index abeb41e84..18ceedfaf 100644 --- a/src/video_core/engines/kepler_compute.h +++ b/src/video_core/engines/kepler_compute.h @@ -204,7 +204,8 @@ public: void CallMethod(u32 method, u32 method_argument, bool is_last_call) override; /// Write multiple values to the register identified by method. - void CallMultiMethod(u32 method, const u32* base_start, u32 amount, u32 methods_pending) override; + void CallMultiMethod(u32 method, const u32* base_start, u32 amount, + u32 methods_pending) override; Texture::FullTextureInfo GetTexture(std::size_t offset) const; diff --git a/src/video_core/engines/kepler_memory.h b/src/video_core/engines/kepler_memory.h index 193caf206..5b7f71a00 100644 --- a/src/video_core/engines/kepler_memory.h +++ b/src/video_core/engines/kepler_memory.h @@ -42,7 +42,8 @@ public: void CallMethod(u32 method, u32 method_argument, bool is_last_call) override; /// Write multiple values to the register identified by method. - void CallMultiMethod(u32 method, const u32* base_start, u32 amount, u32 methods_pending) override; + void CallMultiMethod(u32 method, const u32* base_start, u32 amount, + u32 methods_pending) override; struct Regs { static constexpr size_t NUM_REGS = 0x7F; diff --git a/src/video_core/engines/maxwell_3d.h b/src/video_core/engines/maxwell_3d.h index 3d1e49c7c..9d3f181ff 100644 --- a/src/video_core/engines/maxwell_3d.h +++ b/src/video_core/engines/maxwell_3d.h @@ -1361,7 +1361,8 @@ public: void CallMethod(u32 method, u32 method_argument, bool is_last_call) override; /// Write multiple values to the register identified by method. - void CallMultiMethod(u32 method, const u32* base_start, u32 amount, u32 methods_pending) override; + void CallMultiMethod(u32 method, const u32* base_start, u32 amount, + u32 methods_pending) override; /// Write the value to the register identified by method. void CallMethodFromMME(u32 method, u32 method_argument); diff --git a/src/video_core/engines/maxwell_dma.h b/src/video_core/engines/maxwell_dma.h index 65739f2e3..502dd8509 100644 --- a/src/video_core/engines/maxwell_dma.h +++ b/src/video_core/engines/maxwell_dma.h @@ -37,7 +37,8 @@ public: void CallMethod(u32 method, u32 method_argument, bool is_last_call) override; /// Write multiple values to the register identified by method. - void CallMultiMethod(u32 method, const u32* base_start, u32 amount, u32 methods_pending) override; + void CallMultiMethod(u32 method, const u32* base_start, u32 amount, + u32 methods_pending) override; struct Regs { static constexpr std::size_t NUM_REGS = 0x1D6; diff --git a/src/video_core/gpu.cpp b/src/video_core/gpu.cpp index f10d69fd5..c4f33838c 100644 --- a/src/video_core/gpu.cpp +++ b/src/video_core/gpu.cpp @@ -305,13 +305,15 @@ void GPU::CallEngineMethod(const MethodCall& method_call) { maxwell_3d->CallMethod(method_call.method, method_call.argument, method_call.IsLastCall()); break; case EngineID::KEPLER_COMPUTE_B: - kepler_compute->CallMethod(method_call.method, method_call.argument, method_call.IsLastCall()); + kepler_compute->CallMethod(method_call.method, method_call.argument, + method_call.IsLastCall()); break; case EngineID::MAXWELL_DMA_COPY_A: maxwell_dma->CallMethod(method_call.method, method_call.argument, method_call.IsLastCall()); break; case EngineID::KEPLER_INLINE_TO_MEMORY_B: - kepler_memory->CallMethod(method_call.method, method_call.argument, method_call.IsLastCall()); + kepler_memory->CallMethod(method_call.method, method_call.argument, + method_call.IsLastCall()); break; default: UNIMPLEMENTED_MSG("Unimplemented engine"); diff --git a/src/video_core/textures/decoders.h b/src/video_core/textures/decoders.h index e0ff83754..06f3ebf87 100644 --- a/src/video_core/textures/decoders.h +++ b/src/video_core/textures/decoders.h @@ -59,6 +59,7 @@ void UnswizzleSubrect(u32 subrect_width, u32 subrect_height, u32 dest_pitch, u32 void SwizzleKepler(u32 width, u32 height, u32 dst_x, u32 dst_y, u32 block_height, std::size_t copy_size, const u8* source_data, u8* swizzle_data); +/// Obtains the offset of the gob for positions 'dst_x' & 'dst_y' u64 GetGOBOffset(u32 width, u32 height, u32 dst_x, u32 dst_y, u32 block_height, u32 bytes_per_pixel); |