diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/service/gsp_gpu.cpp | 47 |
1 files changed, 41 insertions, 6 deletions
diff --git a/src/core/hle/service/gsp_gpu.cpp b/src/core/hle/service/gsp_gpu.cpp index 2ace2cade..11fff7b18 100644 --- a/src/core/hle/service/gsp_gpu.cpp +++ b/src/core/hle/service/gsp_gpu.cpp | |||
| @@ -286,6 +286,22 @@ static void FlushDataCache(Service::Interface* self) { | |||
| 286 | } | 286 | } |
| 287 | 287 | ||
| 288 | /** | 288 | /** |
| 289 | * GSP_GPU::SetAxiConfigQoSMode service function | ||
| 290 | * Inputs: | ||
| 291 | * 1 : Mode, unused in emulator | ||
| 292 | * Outputs: | ||
| 293 | * 1 : Result of function, 0 on success, otherwise error code | ||
| 294 | */ | ||
| 295 | static void SetAxiConfigQoSMode(Service::Interface* self) { | ||
| 296 | u32* cmd_buff = Kernel::GetCommandBuffer(); | ||
| 297 | u32 mode = cmd_buff[1]; | ||
| 298 | |||
| 299 | cmd_buff[1] = RESULT_SUCCESS.raw; // No error | ||
| 300 | |||
| 301 | LOG_WARNING(Service_GSP, "(STUBBED) called mode=0x%08X", mode); | ||
| 302 | } | ||
| 303 | |||
| 304 | /** | ||
| 289 | * GSP_GPU::RegisterInterruptRelayQueue service function | 305 | * GSP_GPU::RegisterInterruptRelayQueue service function |
| 290 | * Inputs: | 306 | * Inputs: |
| 291 | * 1 : "Flags" field, purpose is unknown | 307 | * 1 : "Flags" field, purpose is unknown |
| @@ -302,6 +318,12 @@ static void RegisterInterruptRelayQueue(Service::Interface* self) { | |||
| 302 | g_interrupt_event = Kernel::g_handle_table.Get<Kernel::Event>(cmd_buff[3]); | 318 | g_interrupt_event = Kernel::g_handle_table.Get<Kernel::Event>(cmd_buff[3]); |
| 303 | ASSERT_MSG((g_interrupt_event != nullptr), "handle is not valid!"); | 319 | ASSERT_MSG((g_interrupt_event != nullptr), "handle is not valid!"); |
| 304 | 320 | ||
| 321 | g_interrupt_event->name = "GSP_GPU::interrupt_event"; | ||
| 322 | |||
| 323 | using Kernel::MemoryPermission; | ||
| 324 | g_shared_memory = Kernel::SharedMemory::Create(0x1000, MemoryPermission::ReadWrite, | ||
| 325 | MemoryPermission::ReadWrite, "GSPSharedMem"); | ||
| 326 | |||
| 305 | Handle shmem_handle = Kernel::g_handle_table.Create(g_shared_memory).MoveFrom(); | 327 | Handle shmem_handle = Kernel::g_handle_table.Create(g_shared_memory).MoveFrom(); |
| 306 | 328 | ||
| 307 | // This specific code is required for a successful initialization, rather than 0 | 329 | // This specific code is required for a successful initialization, rather than 0 |
| @@ -314,6 +336,22 @@ static void RegisterInterruptRelayQueue(Service::Interface* self) { | |||
| 314 | } | 336 | } |
| 315 | 337 | ||
| 316 | /** | 338 | /** |
| 339 | * GSP_GPU::UnregisterInterruptRelayQueue service function | ||
| 340 | * Outputs: | ||
| 341 | * 1 : Result of function, 0 on success, otherwise error code | ||
| 342 | */ | ||
| 343 | static void UnregisterInterruptRelayQueue(Service::Interface* self) { | ||
| 344 | u32* cmd_buff = Kernel::GetCommandBuffer(); | ||
| 345 | |||
| 346 | g_shared_memory = nullptr; | ||
| 347 | g_interrupt_event = nullptr; | ||
| 348 | |||
| 349 | cmd_buff[1] = RESULT_SUCCESS.raw; | ||
| 350 | |||
| 351 | LOG_WARNING(Service_GSP, "called"); | ||
| 352 | } | ||
| 353 | |||
| 354 | /** | ||
| 317 | * Signals that the specified interrupt type has occurred to userland code | 355 | * Signals that the specified interrupt type has occurred to userland code |
| 318 | * @param interrupt_id ID of interrupt that is being signalled | 356 | * @param interrupt_id ID of interrupt that is being signalled |
| 319 | * @todo This should probably take a thread_id parameter and only signal this thread? | 357 | * @todo This should probably take a thread_id parameter and only signal this thread? |
| @@ -591,11 +629,11 @@ const Interface::FunctionInfo FunctionTable[] = { | |||
| 591 | {0x000D0140, nullptr, "SetDisplayTransfer"}, | 629 | {0x000D0140, nullptr, "SetDisplayTransfer"}, |
| 592 | {0x000E0180, nullptr, "SetTextureCopy"}, | 630 | {0x000E0180, nullptr, "SetTextureCopy"}, |
| 593 | {0x000F0200, nullptr, "SetMemoryFill"}, | 631 | {0x000F0200, nullptr, "SetMemoryFill"}, |
| 594 | {0x00100040, nullptr, "SetAxiConfigQoSMode"}, | 632 | {0x00100040, SetAxiConfigQoSMode, "SetAxiConfigQoSMode"}, |
| 595 | {0x00110040, nullptr, "SetPerfLogMode"}, | 633 | {0x00110040, nullptr, "SetPerfLogMode"}, |
| 596 | {0x00120000, nullptr, "GetPerfLog"}, | 634 | {0x00120000, nullptr, "GetPerfLog"}, |
| 597 | {0x00130042, RegisterInterruptRelayQueue, "RegisterInterruptRelayQueue"}, | 635 | {0x00130042, RegisterInterruptRelayQueue, "RegisterInterruptRelayQueue"}, |
| 598 | {0x00140000, nullptr, "UnregisterInterruptRelayQueue"}, | 636 | {0x00140000, UnregisterInterruptRelayQueue, "UnregisterInterruptRelayQueue"}, |
| 599 | {0x00150002, nullptr, "TryAcquireRight"}, | 637 | {0x00150002, nullptr, "TryAcquireRight"}, |
| 600 | {0x00160042, nullptr, "AcquireRight"}, | 638 | {0x00160042, nullptr, "AcquireRight"}, |
| 601 | {0x00170000, nullptr, "ReleaseRight"}, | 639 | {0x00170000, nullptr, "ReleaseRight"}, |
| @@ -616,10 +654,7 @@ Interface::Interface() { | |||
| 616 | Register(FunctionTable); | 654 | Register(FunctionTable); |
| 617 | 655 | ||
| 618 | g_interrupt_event = nullptr; | 656 | g_interrupt_event = nullptr; |
| 619 | 657 | g_shared_memory = nullptr; | |
| 620 | using Kernel::MemoryPermission; | ||
| 621 | g_shared_memory = Kernel::SharedMemory::Create(0x1000, MemoryPermission::ReadWrite, | ||
| 622 | MemoryPermission::ReadWrite, "GSPSharedMem"); | ||
| 623 | 658 | ||
| 624 | g_thread_id = 0; | 659 | g_thread_id = 0; |
| 625 | } | 660 | } |