From 14b24a75b37545faf49584864cb85555f22a0154 Mon Sep 17 00:00:00 2001 From: Tony Wasserka Date: Tue, 19 Aug 2014 20:57:43 +0200 Subject: GSP: Update framebuffer information when necessary. --- src/core/hle/service/gsp.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/core/hle/service/gsp.h') diff --git a/src/core/hle/service/gsp.h b/src/core/hle/service/gsp.h index 884cfd65a..a09d59dbb 100644 --- a/src/core/hle/service/gsp.h +++ b/src/core/hle/service/gsp.h @@ -4,6 +4,8 @@ #pragma once +#include + #include "common/bit_field.h" #include "core/hle/service/service.h" @@ -76,6 +78,22 @@ struct FrameBufferInfo { }; static_assert(sizeof(FrameBufferInfo) == 0x1c, "Struct has incorrect size"); +struct FrameBufferUpdate { + BitField<0, 1, u8> index; // Index used for GSP::SetBufferSwap + BitField<0, 1, u8> is_dirty; // true if GSP should update GPU framebuffer registers + u16 pad1; + + FrameBufferInfo framebuffer_info[2]; + + u32 pad2; +}; +static_assert(sizeof(FrameBufferUpdate) == 0x40, "Struct has incorrect size"); +// TODO: Not sure if this padding is correct. +// Chances are the second block is stored at offset 0x24 rather than 0x20. +#ifndef _MSC_VER +static_assert(offsetof(FrameBufferUpdate, framebuffer_info[1]) == 0x20, "FrameBufferInfo element has incorrect alignment"); +#endif + /// GSP command struct Command { BitField<0, 8, CommandId> id; -- cgit v1.2.3