summaryrefslogtreecommitdiff
path: root/src/core/hle/service/gsp.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle/service/gsp.h')
-rw-r--r--src/core/hle/service/gsp.h52
1 files changed, 41 insertions, 11 deletions
diff --git a/src/core/hle/service/gsp.h b/src/core/hle/service/gsp.h
index fb50a928a..f36afb697 100644
--- a/src/core/hle/service/gsp.h
+++ b/src/core/hle/service/gsp.h
@@ -4,6 +4,7 @@
4 4
5#pragma once 5#pragma once
6 6
7#include "common/bit_field.h"
7#include "core/hle/service/service.h" 8#include "core/hle/service/service.h"
8 9
9//////////////////////////////////////////////////////////////////////////////////////////////////// 10////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -12,21 +13,50 @@
12namespace GSP_GPU { 13namespace GSP_GPU {
13 14
14enum class GXCommandId : u32 { 15enum class GXCommandId : u32 {
15 REQUEST_DMA = 0x00000000, 16 REQUEST_DMA = 0x00,
16 SET_COMMAND_LIST_LAST = 0x00000001, 17 SET_COMMAND_LIST_LAST = 0x01,
17 SET_MEMORY_FILL = 0x01000102, // TODO: Confirm? 18 SET_MEMORY_FILL = 0x02,
18 SET_DISPLAY_TRANSFER = 0x00000003, 19 SET_DISPLAY_TRANSFER = 0x03,
19 SET_TEXTURE_COPY = 0x00000004, 20 SET_TEXTURE_COPY = 0x04,
20 SET_COMMAND_LIST_FIRST = 0x00000005, 21 SET_COMMAND_LIST_FIRST = 0x05,
21}; 22};
22 23
23union GXCommand { 24struct GXCommand {
24 struct { 25 BitField<0, 8, GXCommandId> id;
25 GXCommandId id; 26
26 }; 27 union {
28 struct {
29 u32 source_address;
30 u32 dest_address;
31 u32 size;
32 } dma_request;
33
34 struct {
35 u32 address;
36 u32 size;
37 } set_command_list_last;
27 38
28 u32 data[0x20]; 39 struct {
40 u32 start1;
41 u32 value1;
42 u32 end1;
43 u32 start2;
44 u32 value2;
45 u32 end2;
46 } memory_fill;
47
48 struct {
49 u32 in_buffer_address;
50 u32 out_buffer_address;
51 u32 in_buffer_size;
52 u32 out_buffer_size;
53 u32 flags;
54 } image_copy;
55
56 u8 raw_data[0x1C];
57 };
29}; 58};
59static_assert(sizeof(GXCommand) == 0x20, "GXCommand struct has incorrect size");
30 60
31/// Interface to "srv:" service 61/// Interface to "srv:" service
32class Interface : public Service::Interface { 62class Interface : public Service::Interface {