diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2019-04-23 18:41:55 +0200 |
---|---|---|
committer | FernandoS27 <fsahmkow27@gmail.com> | 2019-04-23 21:28:18 +0200 |
commit | b3118ee316863e1f4a35548f69bc1194bb740627 (patch) | |
tree | 59118dae69b2e490b7b7856af8ae954d9cae9891 /src/video_core/engines/maxwell_dma.h | |
parent | Add Swizzle Parameters to the DMA engine (diff) | |
download | yuzu-b3118ee316863e1f4a35548f69bc1194bb740627.tar yuzu-b3118ee316863e1f4a35548f69bc1194bb740627.tar.gz yuzu-b3118ee316863e1f4a35548f69bc1194bb740627.tar.bz2 yuzu-b3118ee316863e1f4a35548f69bc1194bb740627.tar.lz yuzu-b3118ee316863e1f4a35548f69bc1194bb740627.tar.xz yuzu-b3118ee316863e1f4a35548f69bc1194bb740627.tar.zst yuzu-b3118ee316863e1f4a35548f69bc1194bb740627.zip |
Diffstat (limited to 'src/video_core/engines/maxwell_dma.h')
-rw-r--r-- | src/video_core/engines/maxwell_dma.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/video_core/engines/maxwell_dma.h b/src/video_core/engines/maxwell_dma.h index 0b2e26199..8eab1332e 100644 --- a/src/video_core/engines/maxwell_dma.h +++ b/src/video_core/engines/maxwell_dma.h @@ -6,6 +6,7 @@ #include <array> #include <cstddef> +#include <vector> #include "common/bit_field.h" #include "common/common_funcs.h" #include "common/common_types.h" @@ -155,6 +156,13 @@ public: BitField<16, 2, u32> component_size; BitField<20, 3, u32> src_num_components; BitField<24, 3, u32> dst_num_components; + + u32 SrcBytePerPixel() const { + return src_num_components.Value() * component_size.Value(); + } + u32 DstBytePerPixel() const { + return dst_num_components.Value() * component_size.Value(); + } } swizzle_config; Parameters dst_params; @@ -176,6 +184,9 @@ private: MemoryManager& memory_manager; + std::vector<u8> read_buffer; + std::vector<u8> write_buffer; + /// Performs the copy from the source buffer to the destination buffer as configured in the /// registers. void HandleCopy(); |