From 90e5694230c0b5a946f7cec6f8083476016a42be Mon Sep 17 00:00:00 2001 From: Fernando Sahmkow Date: Mon, 27 Apr 2020 21:47:58 -0400 Subject: VideoCore/Engines: Refactor Engines CallMethod. --- src/video_core/engines/engine_interface.h | 21 +++++++++++++++++++++ src/video_core/engines/fermi_2d.cpp | 10 +++++----- src/video_core/engines/fermi_2d.h | 7 ++++--- src/video_core/engines/kepler_compute.cpp | 13 ++++++------- src/video_core/engines/kepler_compute.h | 7 ++++--- src/video_core/engines/kepler_memory.cpp | 13 ++++++------- src/video_core/engines/kepler_memory.h | 7 ++++--- src/video_core/engines/maxwell_3d.cpp | 28 ++++++++++++---------------- src/video_core/engines/maxwell_3d.h | 9 +++++---- src/video_core/engines/maxwell_dma.cpp | 10 +++++----- src/video_core/engines/maxwell_dma.h | 7 ++++--- 11 files changed, 76 insertions(+), 56 deletions(-) create mode 100644 src/video_core/engines/engine_interface.h (limited to 'src/video_core/engines') diff --git a/src/video_core/engines/engine_interface.h b/src/video_core/engines/engine_interface.h new file mode 100644 index 000000000..c8f20408d --- /dev/null +++ b/src/video_core/engines/engine_interface.h @@ -0,0 +1,21 @@ +// Copyright 2020 yuzu Emulator Project +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +#pragma once + +#include +#include "common/common_types.h" + +namespace Tegra::Engines { + +class EngineInterface { +public: + /// Write the value to the register identified by method. + 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; +}; + +} diff --git a/src/video_core/engines/fermi_2d.cpp b/src/video_core/engines/fermi_2d.cpp index 8a47614d2..ff10ff40d 100644 --- a/src/video_core/engines/fermi_2d.cpp +++ b/src/video_core/engines/fermi_2d.cpp @@ -12,13 +12,13 @@ namespace Tegra::Engines { Fermi2D::Fermi2D(VideoCore::RasterizerInterface& rasterizer) : rasterizer{rasterizer} {} -void Fermi2D::CallMethod(const GPU::MethodCall& method_call) { - ASSERT_MSG(method_call.method < Regs::NUM_REGS, +void Fermi2D::CallMethod(u32 method, u32 method_argument, bool is_last_call) { + ASSERT_MSG(method < Regs::NUM_REGS, "Invalid Fermi2D register, increase the size of the Regs structure"); - regs.reg_array[method_call.method] = method_call.argument; + regs.reg_array[method] = method_argument; - switch (method_call.method) { + switch (method) { // Trigger the surface copy on the last register write. This is blit_src_y, but this is 64-bit, // so trigger on the second 32-bit write. case FERMI2D_REG_INDEX(blit_src_y) + 1: { @@ -30,7 +30,7 @@ void Fermi2D::CallMethod(const GPU::MethodCall& method_call) { void Fermi2D::CallMultiMethod(u32 method, const u32* base_start, u32 amount, u32 methods_pending) { for (std::size_t i = 0; i < amount; i++) { - CallMethod({method, base_start[i], 0, methods_pending - static_cast(i)}); + CallMethod(method, base_start[i], methods_pending - static_cast(i) <= 1); } } diff --git a/src/video_core/engines/fermi_2d.h b/src/video_core/engines/fermi_2d.h index 939a5966d..77c2a0e39 100644 --- a/src/video_core/engines/fermi_2d.h +++ b/src/video_core/engines/fermi_2d.h @@ -10,6 +10,7 @@ #include "common/common_funcs.h" #include "common/common_types.h" #include "common/math_util.h" +#include "video_core/engines/engine_interface.h" #include "video_core/gpu.h" namespace Tegra { @@ -31,16 +32,16 @@ namespace Tegra::Engines { #define FERMI2D_REG_INDEX(field_name) \ (offsetof(Tegra::Engines::Fermi2D::Regs, field_name) / sizeof(u32)) -class Fermi2D final { +class Fermi2D final : public EngineInterface { public: explicit Fermi2D(VideoCore::RasterizerInterface& rasterizer); ~Fermi2D() = default; /// Write the value to the register identified by method. - void CallMethod(const GPU::MethodCall& method_call); + 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); + 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 00a12175f..88717b431 100644 --- a/src/video_core/engines/kepler_compute.cpp +++ b/src/video_core/engines/kepler_compute.cpp @@ -24,20 +24,19 @@ KeplerCompute::KeplerCompute(Core::System& system, VideoCore::RasterizerInterfac KeplerCompute::~KeplerCompute() = default; -void KeplerCompute::CallMethod(const GPU::MethodCall& method_call) { - ASSERT_MSG(method_call.method < Regs::NUM_REGS, +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"); - regs.reg_array[method_call.method] = method_call.argument; + regs.reg_array[method] = method_argument; - switch (method_call.method) { + switch (method) { case KEPLER_COMPUTE_REG_INDEX(exec_upload): { upload_state.ProcessExec(regs.exec_upload.linear != 0); break; } case KEPLER_COMPUTE_REG_INDEX(data_upload): { - const bool is_last_call = method_call.IsLastCall(); - upload_state.ProcessData(method_call.argument, is_last_call); + upload_state.ProcessData(method_argument, is_last_call); if (is_last_call) { system.GPU().Maxwell3D().OnMemoryWrite(); } @@ -54,7 +53,7 @@ void KeplerCompute::CallMethod(const GPU::MethodCall& method_call) { void KeplerCompute::CallMultiMethod(u32 method, const u32* base_start, u32 amount, u32 methods_pending) { for (std::size_t i = 0; i < amount; i++) { - CallMethod({method, base_start[i], 0, methods_pending - static_cast(i)}); + CallMethod(method, base_start[i], methods_pending - static_cast(i) <= 1); } } diff --git a/src/video_core/engines/kepler_compute.h b/src/video_core/engines/kepler_compute.h index fe55fdfd0..abeb41e84 100644 --- a/src/video_core/engines/kepler_compute.h +++ b/src/video_core/engines/kepler_compute.h @@ -11,6 +11,7 @@ #include "common/common_funcs.h" #include "common/common_types.h" #include "video_core/engines/const_buffer_engine_interface.h" +#include "video_core/engines/engine_interface.h" #include "video_core/engines/engine_upload.h" #include "video_core/engines/shader_type.h" #include "video_core/gpu.h" @@ -39,7 +40,7 @@ namespace Tegra::Engines { #define KEPLER_COMPUTE_REG_INDEX(field_name) \ (offsetof(Tegra::Engines::KeplerCompute::Regs, field_name) / sizeof(u32)) -class KeplerCompute final : public ConstBufferEngineInterface { +class KeplerCompute final : public ConstBufferEngineInterface, public EngineInterface { public: explicit KeplerCompute(Core::System& system, VideoCore::RasterizerInterface& rasterizer, MemoryManager& memory_manager); @@ -200,10 +201,10 @@ public: "KeplerCompute LaunchParams has wrong size"); /// Write the value to the register identified by method. - void CallMethod(const GPU::MethodCall& method_call); + 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); + 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.cpp b/src/video_core/engines/kepler_memory.cpp index 586ff15dc..dc71b2eec 100644 --- a/src/video_core/engines/kepler_memory.cpp +++ b/src/video_core/engines/kepler_memory.cpp @@ -19,20 +19,19 @@ KeplerMemory::KeplerMemory(Core::System& system, MemoryManager& memory_manager) KeplerMemory::~KeplerMemory() = default; -void KeplerMemory::CallMethod(const GPU::MethodCall& method_call) { - ASSERT_MSG(method_call.method < Regs::NUM_REGS, +void KeplerMemory::CallMethod(u32 method, u32 method_argument, bool is_last_call) { + ASSERT_MSG(method < Regs::NUM_REGS, "Invalid KeplerMemory register, increase the size of the Regs structure"); - regs.reg_array[method_call.method] = method_call.argument; + regs.reg_array[method] = method_argument; - switch (method_call.method) { + switch (method) { case KEPLERMEMORY_REG_INDEX(exec): { upload_state.ProcessExec(regs.exec.linear != 0); break; } case KEPLERMEMORY_REG_INDEX(data): { - const bool is_last_call = method_call.IsLastCall(); - upload_state.ProcessData(method_call.argument, is_last_call); + upload_state.ProcessData(method_argument, is_last_call); if (is_last_call) { system.GPU().Maxwell3D().OnMemoryWrite(); } @@ -44,7 +43,7 @@ void KeplerMemory::CallMethod(const GPU::MethodCall& method_call) { void KeplerMemory::CallMultiMethod(u32 method, const u32* base_start, u32 amount, u32 methods_pending) { for (std::size_t i = 0; i < amount; i++) { - CallMethod({method, base_start[i], 0, methods_pending - static_cast(i)}); + CallMethod(method, base_start[i], methods_pending - static_cast(i) <= 1); } } diff --git a/src/video_core/engines/kepler_memory.h b/src/video_core/engines/kepler_memory.h index bb26fb030..193caf206 100644 --- a/src/video_core/engines/kepler_memory.h +++ b/src/video_core/engines/kepler_memory.h @@ -10,6 +10,7 @@ #include "common/bit_field.h" #include "common/common_funcs.h" #include "common/common_types.h" +#include "video_core/engines/engine_interface.h" #include "video_core/engines/engine_upload.h" #include "video_core/gpu.h" @@ -32,16 +33,16 @@ namespace Tegra::Engines { #define KEPLERMEMORY_REG_INDEX(field_name) \ (offsetof(Tegra::Engines::KeplerMemory::Regs, field_name) / sizeof(u32)) -class KeplerMemory final { +class KeplerMemory final : public EngineInterface { public: KeplerMemory(Core::System& system, MemoryManager& memory_manager); ~KeplerMemory(); /// Write the value to the register identified by method. - void CallMethod(const GPU::MethodCall& method_call); + 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); + 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.cpp b/src/video_core/engines/maxwell_3d.cpp index 39e3b66a2..264edaa02 100644 --- a/src/video_core/engines/maxwell_3d.cpp +++ b/src/video_core/engines/maxwell_3d.cpp @@ -125,12 +125,10 @@ void Maxwell3D::CallMacroMethod(u32 method, std::size_t num_parameters, const u3 } } -void Maxwell3D::CallMethod(const GPU::MethodCall& method_call) { - const u32 method = method_call.method; - +void Maxwell3D::CallMethod(u32 method, u32 method_argument, bool is_last_call) { if (method == cb_data_state.current) { - regs.reg_array[method] = method_call.argument; - ProcessCBData(method_call.argument); + regs.reg_array[method] = method_argument; + ProcessCBData(method_argument); return; } else if (cb_data_state.current != null_cb_data) { FinishCBData(); @@ -153,10 +151,10 @@ void Maxwell3D::CallMethod(const GPU::MethodCall& method_call) { executing_macro = method; } - macro_params.push_back(method_call.argument); + macro_params.push_back(method_argument); // Call the macro when there are no more parameters in the command buffer - if (method_call.IsLastCall()) { + if (is_last_call) { CallMacroMethod(executing_macro, macro_params.size(), macro_params.data()); macro_params.clear(); } @@ -166,7 +164,7 @@ void Maxwell3D::CallMethod(const GPU::MethodCall& method_call) { ASSERT_MSG(method < Regs::NUM_REGS, "Invalid Maxwell3D register, increase the size of the Regs structure"); - u32 arg = method_call.argument; + u32 arg = method_argument; // Keep track of the register value in shadow_state when requested. if (shadow_state.shadow_ram_control == Regs::ShadowRamControl::Track || shadow_state.shadow_ram_control == Regs::ShadowRamControl::TrackWithFilter) { @@ -185,7 +183,7 @@ void Maxwell3D::CallMethod(const GPU::MethodCall& method_call) { switch (method) { case MAXWELL3D_REG_INDEX(shadow_ram_control): { - shadow_state.shadow_ram_control = static_cast(method_call.argument); + shadow_state.shadow_ram_control = static_cast(method_argument); break; } case MAXWELL3D_REG_INDEX(macros.data): { @@ -268,7 +266,6 @@ void Maxwell3D::CallMethod(const GPU::MethodCall& method_call) { break; } case MAXWELL3D_REG_INDEX(data_upload): { - const bool is_last_call = method_call.IsLastCall(); upload_state.ProcessData(arg, is_last_call); if (is_last_call) { OnMemoryWrite(); @@ -326,7 +323,7 @@ void Maxwell3D::CallMultiMethod(u32 method, const u32* base_start, u32 amount, } default: { for (std::size_t i = 0; i < amount; i++) { - CallMethod({method, base_start[i], 0, methods_pending - static_cast(i)}); + CallMethod(method, base_start[i], methods_pending - static_cast(i) <= 1); } } } @@ -356,16 +353,15 @@ void Maxwell3D::StepInstance(const MMEDrawMode expected_mode, const u32 count) { StepInstance(expected_mode, count); } -void Maxwell3D::CallMethodFromMME(const GPU::MethodCall& method_call) { - const u32 method = method_call.method; +void Maxwell3D::CallMethodFromMME(u32 method, u32 method_argument) { if (mme_inline[method]) { - regs.reg_array[method] = method_call.argument; + regs.reg_array[method] = method_argument; if (method == MAXWELL3D_REG_INDEX(vertex_buffer.count) || method == MAXWELL3D_REG_INDEX(index_array.count)) { const MMEDrawMode expected_mode = method == MAXWELL3D_REG_INDEX(vertex_buffer.count) ? MMEDrawMode::Array : MMEDrawMode::Indexed; - StepInstance(expected_mode, method_call.argument); + StepInstance(expected_mode, method_argument); } else if (method == MAXWELL3D_REG_INDEX(draw.vertex_begin_gl)) { mme_draw.instance_mode = (regs.draw.instance_next != 0) || (regs.draw.instance_cont != 0); @@ -377,7 +373,7 @@ void Maxwell3D::CallMethodFromMME(const GPU::MethodCall& method_call) { if (mme_draw.current_mode != MMEDrawMode::Undefined) { FlushMMEInlineDraw(); } - CallMethod(method_call); + CallMethod(method, method_argument, true); } } diff --git a/src/video_core/engines/maxwell_3d.h b/src/video_core/engines/maxwell_3d.h index 3dfba8197..3d1e49c7c 100644 --- a/src/video_core/engines/maxwell_3d.h +++ b/src/video_core/engines/maxwell_3d.h @@ -19,6 +19,7 @@ #include "common/math_util.h" #include "video_core/engines/const_buffer_engine_interface.h" #include "video_core/engines/const_buffer_info.h" +#include "video_core/engines/engine_interface.h" #include "video_core/engines/engine_upload.h" #include "video_core/engines/shader_type.h" #include "video_core/gpu.h" @@ -48,7 +49,7 @@ namespace Tegra::Engines { #define MAXWELL3D_REG_INDEX(field_name) \ (offsetof(Tegra::Engines::Maxwell3D::Regs, field_name) / sizeof(u32)) -class Maxwell3D final : public ConstBufferEngineInterface { +class Maxwell3D final : public ConstBufferEngineInterface, public EngineInterface { public: explicit Maxwell3D(Core::System& system, VideoCore::RasterizerInterface& rasterizer, MemoryManager& memory_manager); @@ -1357,13 +1358,13 @@ public: u32 GetRegisterValue(u32 method) const; /// Write the value to the register identified by method. - void CallMethod(const GPU::MethodCall& method_call); + 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); + 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(const GPU::MethodCall& method_call); + void CallMethodFromMME(u32 method, u32 method_argument); void FlushMMEInlineDraw(); diff --git a/src/video_core/engines/maxwell_dma.cpp b/src/video_core/engines/maxwell_dma.cpp index 6630005b0..22ca730bc 100644 --- a/src/video_core/engines/maxwell_dma.cpp +++ b/src/video_core/engines/maxwell_dma.cpp @@ -17,16 +17,16 @@ namespace Tegra::Engines { MaxwellDMA::MaxwellDMA(Core::System& system, MemoryManager& memory_manager) : system{system}, memory_manager{memory_manager} {} -void MaxwellDMA::CallMethod(const GPU::MethodCall& method_call) { - ASSERT_MSG(method_call.method < Regs::NUM_REGS, +void MaxwellDMA::CallMethod(u32 method, u32 method_argument, bool is_last_call) { + ASSERT_MSG(method < Regs::NUM_REGS, "Invalid MaxwellDMA register, increase the size of the Regs structure"); - regs.reg_array[method_call.method] = method_call.argument; + regs.reg_array[method] = method_argument; #define MAXWELLDMA_REG_INDEX(field_name) \ (offsetof(Tegra::Engines::MaxwellDMA::Regs, field_name) / sizeof(u32)) - switch (method_call.method) { + switch (method) { case MAXWELLDMA_REG_INDEX(exec): { HandleCopy(); break; @@ -39,7 +39,7 @@ void MaxwellDMA::CallMethod(const GPU::MethodCall& method_call) { void MaxwellDMA::CallMultiMethod(u32 method, const u32* base_start, u32 amount, u32 methods_pending) { for (std::size_t i = 0; i < amount; i++) { - CallMethod({method, base_start[i], 0, methods_pending - static_cast(i)}); + CallMethod(method, base_start[i], methods_pending - static_cast(i) <= 1); } } diff --git a/src/video_core/engines/maxwell_dma.h b/src/video_core/engines/maxwell_dma.h index c43ed8194..65739f2e3 100644 --- a/src/video_core/engines/maxwell_dma.h +++ b/src/video_core/engines/maxwell_dma.h @@ -10,6 +10,7 @@ #include "common/bit_field.h" #include "common/common_funcs.h" #include "common/common_types.h" +#include "video_core/engines/engine_interface.h" #include "video_core/gpu.h" namespace Core { @@ -27,16 +28,16 @@ namespace Tegra::Engines { * https://github.com/envytools/envytools/blob/master/rnndb/fifo/gk104_copy.xml */ -class MaxwellDMA final { +class MaxwellDMA final : public EngineInterface { public: explicit MaxwellDMA(Core::System& system, MemoryManager& memory_manager); ~MaxwellDMA() = default; /// Write the value to the register identified by method. - void CallMethod(const GPU::MethodCall& method_call); + 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); + void CallMultiMethod(u32 method, const u32* base_start, u32 amount, u32 methods_pending) override; struct Regs { static constexpr std::size_t NUM_REGS = 0x1D6; -- cgit v1.2.3 From 37c690576f8b7b9b4207973807b826411452f0c3 Mon Sep 17 00:00:00 2001 From: Fernando Sahmkow Date: Mon, 27 Apr 2020 23:57:24 -0400 Subject: MaxwellDMA: Optimize micro copies. --- src/video_core/engines/maxwell_dma.cpp | 40 ++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) (limited to 'src/video_core/engines') diff --git a/src/video_core/engines/maxwell_dma.cpp b/src/video_core/engines/maxwell_dma.cpp index 22ca730bc..01d7df405 100644 --- a/src/video_core/engines/maxwell_dma.cpp +++ b/src/video_core/engines/maxwell_dma.cpp @@ -90,7 +90,47 @@ void MaxwellDMA::HandleCopy() { ASSERT(regs.exec.enable_2d == 1); if (regs.exec.is_dst_linear && !regs.exec.is_src_linear) { + ASSERT(regs.src_params.BlockDepth() == 0); + // Optimized path for micro copies. + if (regs.dst_pitch * regs.y_count < Texture::GetGOBSize() && regs.dst_pitch <= 64) { + const u32 bytes_per_pixel = regs.dst_pitch / regs.x_count; + const std::size_t src_size = Texture::GetGOBSize(); + const std::size_t dst_size = regs.dst_pitch * regs.y_count; + u32 pos_x = regs.src_params.pos_x; + u32 pos_y = regs.src_params.pos_y; + const u64 offset = + Texture::GetGOBOffset(regs.src_params.size_x, regs.src_params.size_y, pos_x, pos_y, + regs.src_params.BlockDepth(), bytes_per_pixel); + const u32 x_in_gob = 64 / bytes_per_pixel; + pos_x = pos_x % x_in_gob; + pos_y = pos_y % 8; + + if (read_buffer.size() < src_size) { + read_buffer.resize(src_size); + } + + if (write_buffer.size() < dst_size) { + write_buffer.resize(dst_size); + } + + if (Settings::IsGPULevelExtreme()) { + memory_manager.ReadBlock(source + offset, read_buffer.data(), src_size); + memory_manager.ReadBlock(dest, write_buffer.data(), dst_size); + } else { + memory_manager.ReadBlockUnsafe(source + offset, read_buffer.data(), src_size); + memory_manager.ReadBlockUnsafe(dest, write_buffer.data(), dst_size); + } + + Texture::UnswizzleSubrect(regs.x_count, regs.y_count, regs.dst_pitch, + regs.src_params.size_x, bytes_per_pixel, read_buffer.data(), + write_buffer.data(), regs.src_params.BlockHeight(), pos_x, + pos_y); + + memory_manager.WriteBlock(dest, write_buffer.data(), dst_size); + + return; + } // If the input is tiled and the output is linear, deswizzle the input and copy it over. const u32 bytes_per_pixel = regs.dst_pitch / regs.x_count; const std::size_t src_size = Texture::CalculateSize( -- cgit v1.2.3 From 9df67b20956c8d0ecaf9fea4a3c82858a66adcca Mon Sep 17 00:00:00 2001 From: Fernando Sahmkow Date: Tue, 28 Apr 2020 13:53:47 -0400 Subject: Clang Format and Documentation. --- src/video_core/engines/engine_interface.h | 5 +++-- src/video_core/engines/fermi_2d.h | 3 ++- src/video_core/engines/kepler_compute.cpp | 2 +- src/video_core/engines/kepler_compute.h | 3 ++- src/video_core/engines/kepler_memory.h | 3 ++- src/video_core/engines/maxwell_3d.h | 3 ++- src/video_core/engines/maxwell_dma.h | 3 ++- 7 files changed, 14 insertions(+), 8 deletions(-) (limited to 'src/video_core/engines') 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; -- cgit v1.2.3