summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorGravatar bunnei2014-06-01 10:41:23 -0400
committerGravatar bunnei2014-06-01 10:41:23 -0400
commit7dd18a8df97f7497447ff121d8ad07c5a708a5c5 (patch)
tree0a229eaa4933f09cb68ff048f8c38d097e0a6e5d /src/core
parentsvc: updated waitSychronization to not overwrite handle on return, added stub... (diff)
downloadyuzu-7dd18a8df97f7497447ff121d8ad07c5a708a5c5.tar.gz
yuzu-7dd18a8df97f7497447ff121d8ad07c5a708a5c5.tar.xz
yuzu-7dd18a8df97f7497447ff121d8ad07c5a708a5c5.zip
gsp: always pass through synchronization barrier for commands
Diffstat (limited to 'src/core')
-rw-r--r--src/core/hle/service/gsp.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/core/hle/service/gsp.cpp b/src/core/hle/service/gsp.cpp
index 575db86c1..2635a2eb8 100644
--- a/src/core/hle/service/gsp.cpp
+++ b/src/core/hle/service/gsp.cpp
@@ -8,6 +8,7 @@
8 8
9#include "core/mem_map.h" 9#include "core/mem_map.h"
10#include "core/hle/hle.h" 10#include "core/hle/hle.h"
11#include "core/hle/kernel/event.h"
11#include "core/hle/service/gsp.h" 12#include "core/hle/service/gsp.h"
12 13
13#include "core/hw/lcd.h" 14#include "core/hw/lcd.h"
@@ -52,6 +53,7 @@ void GX_FinishCommand(u32 thread_id) {
52 53
53namespace GSP_GPU { 54namespace GSP_GPU {
54 55
56Handle g_event_handle = 0;
55u32 g_thread_id = 0; 57u32 g_thread_id = 0;
56 58
57enum { 59enum {
@@ -100,7 +102,20 @@ void ReadHWRegs(Service::Interface* self) {
100void RegisterInterruptRelayQueue(Service::Interface* self) { 102void RegisterInterruptRelayQueue(Service::Interface* self) {
101 u32* cmd_buff = Service::GetCommandBuffer(); 103 u32* cmd_buff = Service::GetCommandBuffer();
102 u32 flags = cmd_buff[1]; 104 u32 flags = cmd_buff[1];
103 u32 event_handle = cmd_buff[3]; // TODO(bunnei): Implement event handling 105 u32 event_handle = cmd_buff[3];
106
107 _assert_msg_(GSP, event_handle, "called, but event is NULL!");
108
109 g_event_handle = event_handle;
110
111 Kernel::SetEventLocked(event_handle, false);
112
113 // Hack - This function will permanently set the state of the GSP event such that GPU command
114 // synchronization barriers always passthrough. Correct solution would be to set this after the
115 // GPU as processed all queued up commands, but due to the emulator being single-threaded they
116 // will always be ready.
117 Kernel::SetPermanentLock(event_handle, true);
118
104 cmd_buff[2] = g_thread_id; // ThreadID 119 cmd_buff[2] = g_thread_id; // ThreadID
105} 120}
106 121