summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-01-11 04:26:00 +0100
committerbunnei <bunneidev@gmail.com>2018-01-11 05:28:56 +0100
commit236d463c52afb4dbd3d36e3a34ff7fac5b4046d4 (patch)
tree5dd0e54ef5038b07e11703c1d92c7d1e3825e535
parentrenderer_opengl: Add MortonCopyPixels function for Switch framebuffer. (diff)
downloadyuzu-236d463c52afb4dbd3d36e3a34ff7fac5b4046d4.tar
yuzu-236d463c52afb4dbd3d36e3a34ff7fac5b4046d4.tar.gz
yuzu-236d463c52afb4dbd3d36e3a34ff7fac5b4046d4.tar.bz2
yuzu-236d463c52afb4dbd3d36e3a34ff7fac5b4046d4.tar.lz
yuzu-236d463c52afb4dbd3d36e3a34ff7fac5b4046d4.tar.xz
yuzu-236d463c52afb4dbd3d36e3a34ff7fac5b4046d4.tar.zst
yuzu-236d463c52afb4dbd3d36e3a34ff7fac5b4046d4.zip
-rw-r--r--src/video_core/renderer_base.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/video_core/renderer_base.h b/src/video_core/renderer_base.h
index 589aca857..f18917da3 100644
--- a/src/video_core/renderer_base.h
+++ b/src/video_core/renderer_base.h
@@ -15,6 +15,32 @@ public:
/// Used to reference a framebuffer
enum kFramebuffer { kFramebuffer_VirtualXFB = 0, kFramebuffer_EFB, kFramebuffer_Texture };
+ /// Struct describing framebuffer metadata
+ struct FramebufferInfo {
+ 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;
+ };
+
virtual ~RendererBase() {}
/// Swap buffers (render frame)