framebuffer_config.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. // Copyright 2020 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 "common/math_util.h"
  7. namespace Tegra {
  8. /**
  9. * Struct describing framebuffer configuration
  10. */
  11. struct FramebufferConfig {
  12. enum class PixelFormat : u32 {
  13. A8B8G8R8_UNORM = 1,
  14. RGB565_UNORM = 4,
  15. B8G8R8A8_UNORM = 5,
  16. };
  17. enum class TransformFlags : u32 {
  18. /// No transform flags are set
  19. Unset = 0x00,
  20. /// Flip source image horizontally (around the vertical axis)
  21. FlipH = 0x01,
  22. /// Flip source image vertically (around the horizontal axis)
  23. FlipV = 0x02,
  24. /// Rotate source image 90 degrees clockwise
  25. Rotate90 = 0x04,
  26. /// Rotate source image 180 degrees
  27. Rotate180 = 0x03,
  28. /// Rotate source image 270 degrees clockwise
  29. Rotate270 = 0x07,
  30. };
  31. VAddr address{};
  32. u32 offset{};
  33. u32 width{};
  34. u32 height{};
  35. u32 stride{};
  36. PixelFormat pixel_format{};
  37. TransformFlags transform_flags{};
  38. Common::Rectangle<int> crop_rect;
  39. };
  40. } // namespace Tegra