From 7c3a26383927fa6ac523c330be0be82a4a5b9b5e Mon Sep 17 00:00:00 2001 From: bunnei Date: Thu, 22 Mar 2018 19:48:20 -0400 Subject: gpu: Expose Maxwell3D engine. --- src/video_core/gpu.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/video_core/gpu.h') diff --git a/src/video_core/gpu.h b/src/video_core/gpu.h index 2a9064ba3..f9a725dee 100644 --- a/src/video_core/gpu.h +++ b/src/video_core/gpu.h @@ -36,6 +36,10 @@ public: std::unique_ptr memory_manager; + Engines::Maxwell3D& Maxwell3D() { + return *maxwell_3d; + } + private: static constexpr u32 InvalidGraphMacroEntry = 0xFFFFFFFF; -- cgit v1.2.3 From bfe45774f16e958bf34ed0d58a1d31e2325df47d Mon Sep 17 00:00:00 2001 From: bunnei Date: Thu, 22 Mar 2018 21:04:30 -0400 Subject: video_core: Move FramebufferInfo to FramebufferConfig in GPU. --- src/video_core/gpu.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'src/video_core/gpu.h') diff --git a/src/video_core/gpu.h b/src/video_core/gpu.h index f9a725dee..f3c5e366a 100644 --- a/src/video_core/gpu.h +++ b/src/video_core/gpu.h @@ -12,6 +12,35 @@ 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; + bool flip_vertical; +}; + namespace Engines { class Fermi2D; class Maxwell3D; -- cgit v1.2.3 From ec4e1a3685d458147ac76f4cf53ea86632d0debd Mon Sep 17 00:00:00 2001 From: bunnei Date: Fri, 23 Mar 2018 14:58:27 -0400 Subject: renderer_opengl: Better handling of framebuffer transform flags. --- src/video_core/gpu.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/video_core/gpu.h') diff --git a/src/video_core/gpu.h b/src/video_core/gpu.h index f3c5e366a..206b3e05e 100644 --- a/src/video_core/gpu.h +++ b/src/video_core/gpu.h @@ -8,6 +8,7 @@ #include #include #include "common/common_types.h" +#include "core/hle/service/nvflinger/buffer_queue.h" #include "video_core/memory_manager.h" namespace Tegra { @@ -38,7 +39,9 @@ struct FramebufferConfig { u32 height; u32 stride; PixelFormat pixel_format; - bool flip_vertical; + + using TransformFlags = Service::NVFlinger::BufferQueue::BufferTransformFlags; + TransformFlags transform_flags; }; namespace Engines { -- cgit v1.2.3