diff options
author | bunnei <bunneidev@gmail.com> | 2014-07-23 06:10:37 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2014-08-07 00:19:56 +0200 |
commit | cad2f21985e2bfc7bed3dfa766bb3aa9ceba0d29 (patch) | |
tree | 62611042058172a517abfb1155601a844b564937 /src/core/hle/service/gsp.h | |
parent | GSP: Added reinitialization of other state objects. (diff) | |
download | yuzu-cad2f21985e2bfc7bed3dfa766bb3aa9ceba0d29.tar yuzu-cad2f21985e2bfc7bed3dfa766bb3aa9ceba0d29.tar.gz yuzu-cad2f21985e2bfc7bed3dfa766bb3aa9ceba0d29.tar.bz2 yuzu-cad2f21985e2bfc7bed3dfa766bb3aa9ceba0d29.tar.lz yuzu-cad2f21985e2bfc7bed3dfa766bb3aa9ceba0d29.tar.xz yuzu-cad2f21985e2bfc7bed3dfa766bb3aa9ceba0d29.tar.zst yuzu-cad2f21985e2bfc7bed3dfa766bb3aa9ceba0d29.zip |
Diffstat (limited to 'src/core/hle/service/gsp.h')
-rw-r--r-- | src/core/hle/service/gsp.h | 46 |
1 files changed, 27 insertions, 19 deletions
diff --git a/src/core/hle/service/gsp.h b/src/core/hle/service/gsp.h index 66b99e94a..fccebef7e 100644 --- a/src/core/hle/service/gsp.h +++ b/src/core/hle/service/gsp.h @@ -41,8 +41,8 @@ enum class CommandId : u32 { SET_COMMAND_LIST_FIRST = 0x05, }; -/// GSP thread interrupt queue header -struct InterruptQueue { +/// GSP thread interrupt relay queue +struct InterruptRelayQueue { union { u32 hex; @@ -61,23 +61,8 @@ struct InterruptQueue { InterruptId slot[0x34]; ///< Interrupt ID slots }; -static_assert(sizeof(InterruptQueue) == 0x40, "InterruptQueue struct has incorrect size"); - -/// GSP shared memory GX command buffer header -union CmdBufferHeader { - u32 hex; - - // Current command index. This index is updated by GSP module after loading the command data, - // right before the command is processed. When this index is updated by GSP module, the total - // commands field is decreased by one as well. - BitField<0,8,u32> index; - - // Total commands to process, must not be value 0 when GSP module handles commands. This must be - // <=15 when writing a command to shared memory. This is incremented by the application when - // writing a command to shared memory, after increasing this value TriggerCmdReqQueue is only - // used if this field is value 1. - BitField<8,8,u32> number_commands; -}; +static_assert(sizeof(InterruptRelayQueue) == 0x40, + "InterruptRelayQueue struct has incorrect size"); /// GSP command struct Command { @@ -117,6 +102,29 @@ struct Command { }; static_assert(sizeof(Command) == 0x20, "Command struct has incorrect size"); +/// GSP shared memory GX command buffer header +struct CommandBuffer { + union { + u32 hex; + + // Current command index. This index is updated by GSP module after loading the command + // data, right before the command is processed. When this index is updated by GSP module, + // the total commands field is decreased by one as well. + BitField<0,8,u32> index; + + // Total commands to process, must not be value 0 when GSP module handles commands. This + // must be <=15 when writing a command to shared memory. This is incremented by the + // application when writing a command to shared memory, after increasing this value + // TriggerCmdReqQueue is only used if this field is value 1. + BitField<8,8,u32> number_commands; + }; + + u32 unk[7]; + + Command commands[0xF]; +}; +static_assert(sizeof(CommandBuffer) == 0x200, "CommandBuffer struct has incorrect size"); + /// Interface to "srv:" service class Interface : public Service::Interface { public: |