morton.h 744 B

123456789101112131415161718192021
  1. // Copyright 2018 yuzu Emulator Project
  2. // Licensed under GPLv2 or any later version
  3. // Refer to the license.txt file included.
  4. #pragma once
  5. #include "common/common_types.h"
  6. #include "video_core/surface.h"
  7. namespace VideoCore {
  8. enum class MortonSwizzleMode { MortonToLinear, LinearToMorton };
  9. void MortonSwizzle(MortonSwizzleMode mode, VideoCore::Surface::PixelFormat format, u32 stride,
  10. u32 block_height, u32 height, u32 block_depth, u32 depth, u32 tile_width_spacing,
  11. u8* buffer, u8* addr);
  12. void MortonCopyPixels128(MortonSwizzleMode mode, u32 width, u32 height, u32 bytes_per_pixel,
  13. u32 linear_bytes_per_pixel, u8* morton_data, u8* linear_data);
  14. } // namespace VideoCore