diff options
Diffstat (limited to 'src/core/hle/service/gsp.h')
-rw-r--r-- | src/core/hle/service/gsp.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/core/hle/service/gsp.h b/src/core/hle/service/gsp.h index b25dbb7bc..a09d59dbb 100644 --- a/src/core/hle/service/gsp.h +++ b/src/core/hle/service/gsp.h @@ -4,6 +4,8 @@ #pragma once +#include <cstddef> + #include "common/bit_field.h" #include "core/hle/service/service.h" @@ -64,6 +66,34 @@ struct InterruptRelayQueue { static_assert(sizeof(InterruptRelayQueue) == 0x40, "InterruptRelayQueue struct has incorrect size"); +struct FrameBufferInfo { + BitField<0, 1, u32> active_fb; // 0 = first, 1 = second + + u32 address_left; + u32 address_right; + u32 stride; // maps to 0x1EF00X90 ? + u32 format; // maps to 0x1EF00X70 ? + u32 shown_fb; // maps to 0x1EF00X78 ? + u32 unknown; +}; +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; |