summaryrefslogtreecommitdiffstats
path: root/src/video_core/morton.h
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-11-26 04:35:12 +0100
committerGitHub <noreply@github.com>2018-11-26 04:35:12 +0100
commitceb4bc22a46b202340b08489c49214f624b79e2f (patch)
tree52e6fdc7bffb8f2fc16b79ec7e9a7d18120039b3 /src/video_core/morton.h
parentMerge pull request #1800 from encounter/svcgetinfo (diff)
parentmorton: Style changes (diff)
downloadyuzu-ceb4bc22a46b202340b08489c49214f624b79e2f.tar
yuzu-ceb4bc22a46b202340b08489c49214f624b79e2f.tar.gz
yuzu-ceb4bc22a46b202340b08489c49214f624b79e2f.tar.bz2
yuzu-ceb4bc22a46b202340b08489c49214f624b79e2f.tar.lz
yuzu-ceb4bc22a46b202340b08489c49214f624b79e2f.tar.xz
yuzu-ceb4bc22a46b202340b08489c49214f624b79e2f.tar.zst
yuzu-ceb4bc22a46b202340b08489c49214f624b79e2f.zip
Diffstat (limited to 'src/video_core/morton.h')
-rw-r--r--src/video_core/morton.h21
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 @@
+// Copyright 2018 yuzu Emulator Project
+// Licensed under GPLv2 or any later version
+// Refer to the license.txt file included.
+
+#pragma once
+
+#include "common/common_types.h"
+#include "video_core/surface.h"
+
+namespace VideoCore {
+
+enum class MortonSwizzleMode { MortonToLinear, LinearToMorton };
+
+void MortonSwizzle(MortonSwizzleMode mode, VideoCore::Surface::PixelFormat format, u32 stride,
+ u32 block_height, u32 height, u32 block_depth, u32 depth, u8* buffer,
+ std::size_t buffer_size, VAddr addr);
+
+void MortonCopyPixels128(u32 width, u32 height, u32 bytes_per_pixel, u32 linear_bytes_per_pixel,
+ u8* morton_data, u8* linear_data, bool morton_to_linear);
+
+} // namespace VideoCore \ No newline at end of file