diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/service/gsp_gpu.cpp | 4 | ||||
| -rw-r--r-- | src/core/hle/service/gsp_gpu.h | 25 |
2 files changed, 12 insertions, 17 deletions
diff --git a/src/core/hle/service/gsp_gpu.cpp b/src/core/hle/service/gsp_gpu.cpp index 00a941658..4ca2b9bd0 100644 --- a/src/core/hle/service/gsp_gpu.cpp +++ b/src/core/hle/service/gsp_gpu.cpp | |||
| @@ -210,12 +210,12 @@ void SignalInterrupt(InterruptId interrupt_id) { | |||
| 210 | } | 210 | } |
| 211 | for (int thread_id = 0; thread_id < 0x4; ++thread_id) { | 211 | for (int thread_id = 0; thread_id < 0x4; ++thread_id) { |
| 212 | InterruptRelayQueue* interrupt_relay_queue = GetInterruptRelayQueue(thread_id); | 212 | InterruptRelayQueue* interrupt_relay_queue = GetInterruptRelayQueue(thread_id); |
| 213 | interrupt_relay_queue->number_interrupts = interrupt_relay_queue->number_interrupts + 1; | ||
| 214 | |||
| 215 | u8 next = interrupt_relay_queue->index; | 213 | u8 next = interrupt_relay_queue->index; |
| 216 | next += interrupt_relay_queue->number_interrupts; | 214 | next += interrupt_relay_queue->number_interrupts; |
| 217 | next = next % 0x34; // 0x34 is the number of interrupt slots | 215 | next = next % 0x34; // 0x34 is the number of interrupt slots |
| 218 | 216 | ||
| 217 | interrupt_relay_queue->number_interrupts += 1; | ||
| 218 | |||
| 219 | interrupt_relay_queue->slot[next] = interrupt_id; | 219 | interrupt_relay_queue->slot[next] = interrupt_id; |
| 220 | interrupt_relay_queue->error_code = 0x0; // No error | 220 | interrupt_relay_queue->error_code = 0x0; // No error |
| 221 | 221 | ||
diff --git a/src/core/hle/service/gsp_gpu.h b/src/core/hle/service/gsp_gpu.h index 932b6170f..65abb194a 100644 --- a/src/core/hle/service/gsp_gpu.h +++ b/src/core/hle/service/gsp_gpu.h | |||
| @@ -45,21 +45,16 @@ enum class CommandId : u32 { | |||
| 45 | 45 | ||
| 46 | /// GSP thread interrupt relay queue | 46 | /// GSP thread interrupt relay queue |
| 47 | struct InterruptRelayQueue { | 47 | struct InterruptRelayQueue { |
| 48 | union { | 48 | // Index of last interrupt in the queue |
| 49 | u32 hex; | 49 | u8 index; |
| 50 | 50 | // Number of interrupts remaining to be processed by the userland code | |
| 51 | // Index of last interrupt in the queue | 51 | u8 number_interrupts; |
| 52 | BitField<0,8,u32> index; | 52 | // Error code - zero on success, otherwise an error has occurred |
| 53 | 53 | u8 error_code; | |
| 54 | // Number of interrupts remaining to be processed by the userland code | 54 | u8 padding1; |
| 55 | BitField<8,8,u32> number_interrupts; | 55 | |
| 56 | 56 | u32 missed_PDC0; | |
| 57 | // Error code - zero on success, otherwise an error has occurred | 57 | u32 missed_PDC1; |
| 58 | BitField<16,8,u32> error_code; | ||
| 59 | }; | ||
| 60 | |||
| 61 | u32 unk0; | ||
| 62 | u32 unk1; | ||
| 63 | 58 | ||
| 64 | InterruptId slot[0x34]; ///< Interrupt ID slots | 59 | InterruptId slot[0x34]; ///< Interrupt ID slots |
| 65 | }; | 60 | }; |