diff options
| author | 2018-11-24 23:53:17 -0300 | |
|---|---|---|
| committer | 2018-11-25 00:37:18 -0300 | |
| commit | dad3a6718e942862b2e6b98a9bea3fa3b0fdeb5d (patch) | |
| tree | 9347c330e837eecb8ee39a5b76de7dbdc635ddad /src/video_core/morton.h | |
| parent | Merge pull request #1641 from DarkLordZach/sm-register-unregister (diff) | |
| download | yuzu-dad3a6718e942862b2e6b98a9bea3fa3b0fdeb5d.tar.gz yuzu-dad3a6718e942862b2e6b98a9bea3fa3b0fdeb5d.tar.xz yuzu-dad3a6718e942862b2e6b98a9bea3fa3b0fdeb5d.zip | |
video_core: Move morton functions to their own file
Diffstat (limited to 'src/video_core/morton.h')
| -rw-r--r-- | src/video_core/morton.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/video_core/morton.h b/src/video_core/morton.h new file mode 100644 index 000000000..b9b9eca86 --- /dev/null +++ b/src/video_core/morton.h | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | // Copyright 2018 yuzu Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #pragma once | ||
| 6 | |||
| 7 | #include "common/common_types.h" | ||
| 8 | #include "video_core/surface.h" | ||
| 9 | |||
| 10 | namespace VideoCore { | ||
| 11 | |||
| 12 | enum class MortonSwizzleMode { MortonToLinear, LinearToMorton }; | ||
| 13 | |||
| 14 | void MortonSwizzle(MortonSwizzleMode mode, VideoCore::Surface::PixelFormat format, u32 stride, | ||
| 15 | u32 block_height, u32 height, u32 block_depth, u32 depth, u8* buffer, | ||
| 16 | std::size_t buffer_size, VAddr addr); | ||
| 17 | |||
| 18 | void MortonCopyPixels128(u32 width, u32 height, u32 bytes_per_pixel, u32 linear_bytes_per_pixel, | ||
| 19 | u8* morton_data, u8* linear_data, bool morton_to_linear); | ||
| 20 | |||
| 21 | } // namespace VideoCore \ No newline at end of file | ||