image_info.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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 "video_core/engines/fermi_2d.h"
  6. #include "video_core/engines/maxwell_3d.h"
  7. #include "video_core/surface.h"
  8. #include "video_core/texture_cache/types.h"
  9. namespace VideoCommon {
  10. using Tegra::Texture::TICEntry;
  11. using VideoCore::Surface::PixelFormat;
  12. struct ImageInfo {
  13. ImageInfo() = default;
  14. explicit ImageInfo(const TICEntry& config) noexcept;
  15. explicit ImageInfo(const Tegra::Engines::Maxwell3D::Regs& regs, size_t index) noexcept;
  16. explicit ImageInfo(const Tegra::Engines::Maxwell3D::Regs& regs) noexcept;
  17. explicit ImageInfo(const Tegra::Engines::Fermi2D::Surface& config) noexcept;
  18. PixelFormat format = PixelFormat::Invalid;
  19. ImageType type = ImageType::e1D;
  20. SubresourceExtent resources;
  21. Extent3D size{1, 1, 1};
  22. union {
  23. Extent3D block{0, 0, 0};
  24. u32 pitch;
  25. };
  26. u32 layer_stride = 0;
  27. u32 maybe_unaligned_layer_stride = 0;
  28. u32 num_samples = 1;
  29. u32 tile_width_spacing = 0;
  30. bool rescaleable = false;
  31. bool downscaleable = false;
  32. };
  33. } // namespace VideoCommon