diff options
author | bunnei <bunneidev@gmail.com> | 2018-03-23 23:30:48 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-23 23:30:48 -0400 |
commit | a10baacf9e5ab48af7fb0ccbdc75371c9287d3ba (patch) | |
tree | 9ed56f99b9d2564f9250d3754e429eb0c8b43323 /src/video_core/gpu.h | |
parent | a397a9e9a4bad1ed03229082408b7fa424295530 (diff) | |
parent | d561e4acc8bd3f9a7d677fe713ab0a748ff7dd9c (diff) |
Merge pull request #265 from bunnei/tegra-progress-2
Tegra progress 2
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 @@ #include <unordered_map> #include <vector> #include "common/common_types.h" +#include "core/hle/service/nvflinger/buffer_queue.h" #include "video_core/memory_manager.h" namespace Tegra { +/** + * Struct describing framebuffer configuration + */ +struct FramebufferConfig { + enum class PixelFormat : u32 { + ABGR8 = 1, + }; + + /** + * Returns the number of bytes per pixel. + */ + static u32 BytesPerPixel(PixelFormat format) { + switch (format) { + case PixelFormat::ABGR8: + return 4; + } + + UNREACHABLE(); + } + + VAddr address; + u32 offset; + u32 width; + u32 height; + u32 stride; + PixelFormat pixel_format; + + using TransformFlags = Service::NVFlinger::BufferQueue::BufferTransformFlags; + TransformFlags transform_flags; +}; + namespace Engines { class Fermi2D; class Maxwell3D; @@ -36,6 +68,10 @@ public: std::unique_ptr<MemoryManager> memory_manager; + Engines::Maxwell3D& Maxwell3D() { + return *maxwell_3d; + } + private: static constexpr u32 InvalidGraphMacroEntry = 0xFFFFFFFF; |