Clang Format and Documentation.

This commit is contained in:
Fernando Sahmkow 2020-04-28 13:53:47 -04:00
parent 37c690576f
commit 9df67b2095
10 changed files with 20 additions and 10 deletions

View file

@ -8,6 +8,7 @@ add_library(video_core STATIC
dma_pusher.h dma_pusher.h
engines/const_buffer_engine_interface.h engines/const_buffer_engine_interface.h
engines/const_buffer_info.h engines/const_buffer_info.h
engines/engine_interface.h
engines/engine_upload.cpp engines/engine_upload.cpp
engines/engine_upload.h engines/engine_upload.h
engines/fermi_2d.cpp engines/fermi_2d.cpp

View file

@ -15,7 +15,8 @@ public:
virtual void CallMethod(u32 method, u32 method_argument, bool is_last_call) = 0; virtual void CallMethod(u32 method, u32 method_argument, bool is_last_call) = 0;
/// Write multiple values to the register identified by method. /// 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

View file

@ -41,7 +41,8 @@ public:
void CallMethod(u32 method, u32 method_argument, bool is_last_call) override; void CallMethod(u32 method, u32 method_argument, bool is_last_call) override;
/// Write multiple values to the register identified by method. /// 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 { enum class Origin : u32 {
Center = 0, Center = 0,

View file

@ -24,7 +24,7 @@ KeplerCompute::KeplerCompute(Core::System& system, VideoCore::RasterizerInterfac
KeplerCompute::~KeplerCompute() = default; 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, ASSERT_MSG(method < Regs::NUM_REGS,
"Invalid KeplerCompute register, increase the size of the Regs structure"); "Invalid KeplerCompute register, increase the size of the Regs structure");

View file

@ -204,7 +204,8 @@ public:
void CallMethod(u32 method, u32 method_argument, bool is_last_call) override; void CallMethod(u32 method, u32 method_argument, bool is_last_call) override;
/// Write multiple values to the register identified by method. /// 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; Texture::FullTextureInfo GetTexture(std::size_t offset) const;

View file

@ -42,7 +42,8 @@ public:
void CallMethod(u32 method, u32 method_argument, bool is_last_call) override; void CallMethod(u32 method, u32 method_argument, bool is_last_call) override;
/// Write multiple values to the register identified by method. /// 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 { struct Regs {
static constexpr size_t NUM_REGS = 0x7F; static constexpr size_t NUM_REGS = 0x7F;

View file

@ -1361,7 +1361,8 @@ public:
void CallMethod(u32 method, u32 method_argument, bool is_last_call) override; void CallMethod(u32 method, u32 method_argument, bool is_last_call) override;
/// Write multiple values to the register identified by method. /// 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. /// Write the value to the register identified by method.
void CallMethodFromMME(u32 method, u32 method_argument); void CallMethodFromMME(u32 method, u32 method_argument);

View file

@ -37,7 +37,8 @@ public:
void CallMethod(u32 method, u32 method_argument, bool is_last_call) override; void CallMethod(u32 method, u32 method_argument, bool is_last_call) override;
/// Write multiple values to the register identified by method. /// 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 { struct Regs {
static constexpr std::size_t NUM_REGS = 0x1D6; static constexpr std::size_t NUM_REGS = 0x1D6;

View file

@ -305,13 +305,15 @@ void GPU::CallEngineMethod(const MethodCall& method_call) {
maxwell_3d->CallMethod(method_call.method, method_call.argument, method_call.IsLastCall()); maxwell_3d->CallMethod(method_call.method, method_call.argument, method_call.IsLastCall());
break; break;
case EngineID::KEPLER_COMPUTE_B: 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; break;
case EngineID::MAXWELL_DMA_COPY_A: case EngineID::MAXWELL_DMA_COPY_A:
maxwell_dma->CallMethod(method_call.method, method_call.argument, method_call.IsLastCall()); maxwell_dma->CallMethod(method_call.method, method_call.argument, method_call.IsLastCall());
break; break;
case EngineID::KEPLER_INLINE_TO_MEMORY_B: 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; break;
default: default:
UNIMPLEMENTED_MSG("Unimplemented engine"); UNIMPLEMENTED_MSG("Unimplemented engine");

View file

@ -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, 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); 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, u64 GetGOBOffset(u32 width, u32 height, u32 dst_x, u32 dst_y, u32 block_height,
u32 bytes_per_pixel); u32 bytes_per_pixel);