summaryrefslogtreecommitdiff
path: root/src/core/hle
diff options
context:
space:
mode:
authorGravatar James Rowe2018-01-11 20:07:44 -0700
committerGravatar James Rowe2018-01-12 19:11:03 -0700
commit1d28b2e142f845773e2b90e267d9632e196a99b9 (patch)
tree027a3586a0fc927731afb3711c328c6dafc8551f /src/core/hle
parentMassive removal of unused modules (diff)
downloadyuzu-1d28b2e142f845773e2b90e267d9632e196a99b9.tar.gz
yuzu-1d28b2e142f845773e2b90e267d9632e196a99b9.tar.xz
yuzu-1d28b2e142f845773e2b90e267d9632e196a99b9.zip
Remove references to PICA and rasterizers in video_core
Diffstat (limited to 'src/core/hle')
-rw-r--r--src/core/hle/service/dsp_dsp.cpp17
-rw-r--r--src/core/hle/service/dsp_dsp.h26
-rw-r--r--src/core/hle/service/gsp_gpu.cpp11
-rw-r--r--src/core/hle/service/gsp_gpu.h195
4 files changed, 0 insertions, 249 deletions
diff --git a/src/core/hle/service/dsp_dsp.cpp b/src/core/hle/service/dsp_dsp.cpp
deleted file mode 100644
index a8958373a..000000000
--- a/src/core/hle/service/dsp_dsp.cpp
+++ /dev/null
@@ -1,17 +0,0 @@
1// Copyright 2014 Citra Emulator Project
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#include "audio_core/hle/pipe.h"
6#include "core/hle/service/dsp_dsp.h"
7
8using DspPipe = DSP::HLE::DspPipe;
9
10namespace Service {
11namespace DSP_DSP {
12
13void SignalPipeInterrupt(DspPipe pipe) {
14}
15
16} // namespace DSP_DSP
17} // namespace Service
diff --git a/src/core/hle/service/dsp_dsp.h b/src/core/hle/service/dsp_dsp.h
deleted file mode 100644
index 18ac76d9a..000000000
--- a/src/core/hle/service/dsp_dsp.h
+++ /dev/null
@@ -1,26 +0,0 @@
1// Copyright 2014 Citra Emulator Project
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#pragma once
6
7#include <string>
8#include "core/hle/service/service.h"
9
10namespace DSP {
11namespace HLE {
12enum class DspPipe;
13}
14}
15
16namespace Service {
17namespace DSP_DSP {
18
19/**
20 * Signal a specific DSP related interrupt of type == InterruptType::Pipe, pipe == pipe.
21 * @param pipe The DSP pipe for which to signal an interrupt for.
22 */
23void SignalPipeInterrupt(DSP::HLE::DspPipe pipe);
24
25} // namespace DSP_DSP
26} // namespace Service
diff --git a/src/core/hle/service/gsp_gpu.cpp b/src/core/hle/service/gsp_gpu.cpp
deleted file mode 100644
index 8f29e04a5..000000000
--- a/src/core/hle/service/gsp_gpu.cpp
+++ /dev/null
@@ -1,11 +0,0 @@
1// Copyright 2014 Citra Emulator Project
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#include "core/hle/service/gsp_gpu.h"
6
7namespace Service {
8namespace GSP {
9
10} // namespace GSP
11} // namespace Service
diff --git a/src/core/hle/service/gsp_gpu.h b/src/core/hle/service/gsp_gpu.h
deleted file mode 100644
index 3c97763d9..000000000
--- a/src/core/hle/service/gsp_gpu.h
+++ /dev/null
@@ -1,195 +0,0 @@
1// Copyright 2014 Citra Emulator Project
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#pragma once
6
7#include <cstddef>
8#include <string>
9#include "common/bit_field.h"
10#include "common/common_types.h"
11#include "core/hle/result.h"
12#include "core/hle/service/service.h"
13
14namespace Service {
15namespace GSP {
16
17/// GSP interrupt ID
18enum class InterruptId : u8 {
19 PSC0 = 0x00,
20 PSC1 = 0x01,
21 PDC0 = 0x02, // Seems called every vertical screen line
22 PDC1 = 0x03, // Seems called every frame
23 PPF = 0x04,
24 P3D = 0x05,
25 DMA = 0x06,
26};
27
28/// GSP command ID
29enum class CommandId : u32 {
30 REQUEST_DMA = 0x00,
31 /// Submits a commandlist for execution by the GPU.
32 SUBMIT_GPU_CMDLIST = 0x01,
33
34 // Fills a given memory range with a particular value
35 SET_MEMORY_FILL = 0x02,
36
37 // Copies an image and optionally performs color-conversion or scaling.
38 // This is highly similar to the GameCube's EFB copy feature
39 SET_DISPLAY_TRANSFER = 0x03,
40
41 // Conceptionally similar to SET_DISPLAY_TRANSFER and presumable uses the same hardware path
42 SET_TEXTURE_COPY = 0x04,
43 /// Flushes up to 3 cache regions in a single command.
44 CACHE_FLUSH = 0x05,
45};
46
47/// GSP thread interrupt relay queue
48struct InterruptRelayQueue {
49 // Index of last interrupt in the queue
50 u8 index;
51 // Number of interrupts remaining to be processed by the userland code
52 u8 number_interrupts;
53 // Error code - zero on success, otherwise an error has occurred
54 u8 error_code;
55 u8 padding1;
56
57 u32 missed_PDC0;
58 u32 missed_PDC1;
59
60 InterruptId slot[0x34]; ///< Interrupt ID slots
61};
62static_assert(sizeof(InterruptRelayQueue) == 0x40, "InterruptRelayQueue struct has incorrect size");
63
64struct FrameBufferInfo {
65 BitField<0, 1, u32> active_fb; // 0 = first, 1 = second
66
67 u32 address_left;
68 u32 address_right;
69 u32 stride; // maps to 0x1EF00X90 ?
70 u32 format; // maps to 0x1EF00X70 ?
71 u32 shown_fb; // maps to 0x1EF00X78 ?
72 u32 unknown;
73};
74static_assert(sizeof(FrameBufferInfo) == 0x1c, "Struct has incorrect size");
75
76struct FrameBufferUpdate {
77 BitField<0, 1, u8> index; // Index used for GSP::SetBufferSwap
78 BitField<0, 1, u8> is_dirty; // true if GSP should update GPU framebuffer registers
79 u16 pad1;
80
81 FrameBufferInfo framebuffer_info[2];
82
83 u32 pad2;
84};
85static_assert(sizeof(FrameBufferUpdate) == 0x40, "Struct has incorrect size");
86// TODO: Not sure if this padding is correct.
87// Chances are the second block is stored at offset 0x24 rather than 0x20.
88#ifndef _MSC_VER
89static_assert(offsetof(FrameBufferUpdate, framebuffer_info[1]) == 0x20,
90 "FrameBufferInfo element has incorrect alignment");
91#endif
92
93/// GSP command
94struct Command {
95 BitField<0, 8, CommandId> id;
96
97 union {
98 struct {
99 u32 source_address;
100 u32 dest_address;
101 u32 size;
102 } dma_request;
103
104 struct {
105 u32 address;
106 u32 size;
107 u32 flags;
108 u32 unused[3];
109 u32 do_flush;
110 } submit_gpu_cmdlist;
111
112 struct {
113 u32 start1;
114 u32 value1;
115 u32 end1;
116
117 u32 start2;
118 u32 value2;
119 u32 end2;
120
121 u16 control1;
122 u16 control2;
123 } memory_fill;
124
125 struct {
126 u32 in_buffer_address;
127 u32 out_buffer_address;
128 u32 in_buffer_size;
129 u32 out_buffer_size;
130 u32 flags;
131 } display_transfer;
132
133 struct {
134 u32 in_buffer_address;
135 u32 out_buffer_address;
136 u32 size;
137 u32 in_width_gap;
138 u32 out_width_gap;
139 u32 flags;
140 } texture_copy;
141
142 struct {
143 struct {
144 u32 address;
145 u32 size;
146 } regions[3];
147 } cache_flush;
148
149 u8 raw_data[0x1C];
150 };
151};
152static_assert(sizeof(Command) == 0x20, "Command struct has incorrect size");
153
154/// GSP shared memory GX command buffer header
155struct CommandBuffer {
156 union {
157 u32 hex;
158
159 // Current command index. This index is updated by GSP module after loading the command
160 // data, right before the command is processed. When this index is updated by GSP module,
161 // the total commands field is decreased by one as well.
162 BitField<0, 8, u32> index;
163
164 // Total commands to process, must not be value 0 when GSP module handles commands. This
165 // must be <=15 when writing a command to shared memory. This is incremented by the
166 // application when writing a command to shared memory, after increasing this value
167 // TriggerCmdReqQueue is only used if this field is value 1.
168 BitField<8, 8, u32> number_commands;
169 };
170
171 u32 unk[7];
172
173 Command commands[0xF];
174};
175static_assert(sizeof(CommandBuffer) == 0x200, "CommandBuffer struct has incorrect size");
176
177/**
178 * Signals that the specified interrupt type has occurred to userland code
179 * @param interrupt_id ID of interrupt that is being signalled
180 */
181void SignalInterrupt(InterruptId interrupt_id);
182
183ResultCode SetBufferSwap(u32 screen_id, const FrameBufferInfo& info);
184
185/**
186 * Retrieves the framebuffer info stored in the GSP shared memory for the
187 * specified screen index and thread id.
188 * @param thread_id GSP thread id of the process that accesses the structure that we are requesting.
189 * @param screen_index Index of the screen we are requesting (Top = 0, Bottom = 1).
190 * @returns FramebufferUpdate Information about the specified framebuffer.
191 */
192FrameBufferUpdate* GetFrameBufferInfo(u32 thread_id, u32 screen_index);
193
194} // namespace GSP
195} // namespace Service