diff options
Diffstat (limited to 'src/video_core/gpu.h')
| -rw-r--r-- | src/video_core/gpu.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/video_core/gpu.h b/src/video_core/gpu.h index 2a9064ba3..206b3e05e 100644 --- a/src/video_core/gpu.h +++ b/src/video_core/gpu.h | |||
| @@ -8,10 +8,42 @@ | |||
| 8 | #include <unordered_map> | 8 | #include <unordered_map> |
| 9 | #include <vector> | 9 | #include <vector> |
| 10 | #include "common/common_types.h" | 10 | #include "common/common_types.h" |
| 11 | #include "core/hle/service/nvflinger/buffer_queue.h" | ||
| 11 | #include "video_core/memory_manager.h" | 12 | #include "video_core/memory_manager.h" |
| 12 | 13 | ||
| 13 | namespace Tegra { | 14 | namespace Tegra { |
| 14 | 15 | ||
| 16 | /** | ||
| 17 | * Struct describing framebuffer configuration | ||
| 18 | */ | ||
| 19 | struct FramebufferConfig { | ||
| 20 | enum class PixelFormat : u32 { | ||
| 21 | ABGR8 = 1, | ||
| 22 | }; | ||
| 23 | |||
| 24 | /** | ||
| 25 | * Returns the number of bytes per pixel. | ||
| 26 | */ | ||
| 27 | static u32 BytesPerPixel(PixelFormat format) { | ||
| 28 | switch (format) { | ||
| 29 | case PixelFormat::ABGR8: | ||
| 30 | return 4; | ||
| 31 | } | ||
| 32 | |||
| 33 | UNREACHABLE(); | ||
| 34 | } | ||
| 35 | |||
| 36 | VAddr address; | ||
| 37 | u32 offset; | ||
| 38 | u32 width; | ||
| 39 | u32 height; | ||
| 40 | u32 stride; | ||
| 41 | PixelFormat pixel_format; | ||
| 42 | |||
| 43 | using TransformFlags = Service::NVFlinger::BufferQueue::BufferTransformFlags; | ||
| 44 | TransformFlags transform_flags; | ||
| 45 | }; | ||
| 46 | |||
| 15 | namespace Engines { | 47 | namespace Engines { |
| 16 | class Fermi2D; | 48 | class Fermi2D; |
| 17 | class Maxwell3D; | 49 | class Maxwell3D; |
| @@ -36,6 +68,10 @@ public: | |||
| 36 | 68 | ||
| 37 | std::unique_ptr<MemoryManager> memory_manager; | 69 | std::unique_ptr<MemoryManager> memory_manager; |
| 38 | 70 | ||
| 71 | Engines::Maxwell3D& Maxwell3D() { | ||
| 72 | return *maxwell_3d; | ||
| 73 | } | ||
| 74 | |||
| 39 | private: | 75 | private: |
| 40 | static constexpr u32 InvalidGraphMacroEntry = 0xFFFFFFFF; | 76 | static constexpr u32 InvalidGraphMacroEntry = 0xFFFFFFFF; |
| 41 | 77 | ||