diff options
| -rw-r--r-- | src/core/CMakeLists.txt | 4 | ||||
| -rw-r--r-- | src/core/hle/service/es/es.cpp | 57 | ||||
| -rw-r--r-- | src/core/hle/service/es/es.h | 16 | ||||
| -rw-r--r-- | src/core/hle/service/pm/pm.cpp | 70 | ||||
| -rw-r--r-- | src/core/hle/service/pm/pm.h | 16 | ||||
| -rw-r--r-- | src/core/hle/service/service.cpp | 4 | ||||
| -rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer_cache.cpp | 9 | ||||
| -rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer_cache.h | 17 | ||||
| -rw-r--r-- | src/yuzu/debugger/wait_tree.cpp | 4 | 
9 files changed, 188 insertions, 9 deletions
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 833605475..d513ce70a 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -136,6 +136,8 @@ add_library(core STATIC      hle/service/bcat/bcat.h      hle/service/bcat/module.cpp      hle/service/bcat/module.h +    hle/service/es/es.cpp +    hle/service/es/es.h      hle/service/fatal/fatal.cpp      hle/service/fatal/fatal.h      hle/service/fatal/fatal_p.cpp @@ -201,6 +203,8 @@ add_library(core STATIC      hle/service/pctl/module.h      hle/service/pctl/pctl.cpp      hle/service/pctl/pctl.h +    hle/service/pm/pm.cpp +    hle/service/pm/pm.h      hle/service/prepo/prepo.cpp      hle/service/prepo/prepo.h      hle/service/service.cpp diff --git a/src/core/hle/service/es/es.cpp b/src/core/hle/service/es/es.cpp new file mode 100644 index 000000000..d40f18565 --- /dev/null +++ b/src/core/hle/service/es/es.cpp @@ -0,0 +1,57 @@ +// Copyright 2018 yuzu emulator team +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +#include "core/hle/service/service.h" + +namespace Service::ES { + +class ETicket final : public ServiceFramework<ETicket> { +public: +    explicit ETicket() : ServiceFramework{"es"} { +        static const FunctionInfo functions[] = { +            {1, nullptr, "ImportTicket"}, +            {2, nullptr, "ImportTicketCertificateSet"}, +            {3, nullptr, "DeleteTicket"}, +            {4, nullptr, "DeletePersonalizedTicket"}, +            {5, nullptr, "DeleteAllCommonTicket"}, +            {6, nullptr, "DeleteAllPersonalizedTicket"}, +            {7, nullptr, "DeleteAllPersonalizedTicketEx"}, +            {8, nullptr, "GetTitleKey"}, +            {9, nullptr, "CountCommonTicket"}, +            {10, nullptr, "CountPersonalizedTicket"}, +            {11, nullptr, "ListCommonTicket"}, +            {12, nullptr, "ListPersonalizedTicket"}, +            {13, nullptr, "ListMissingPersonalizedTicket"}, +            {14, nullptr, "GetCommonTicketSize"}, +            {15, nullptr, "GetPersonalizedTicketSize"}, +            {16, nullptr, "GetCommonTicketData"}, +            {17, nullptr, "GetPersonalizedTicketData"}, +            {18, nullptr, "OwnTicket"}, +            {19, nullptr, "GetTicketInfo"}, +            {20, nullptr, "ListLightTicketInfo"}, +            {21, nullptr, "SignData"}, +            {22, nullptr, "GetCommonTicketAndCertificateSize"}, +            {23, nullptr, "GetCommonTicketAndCertificateData"}, +            {24, nullptr, "ImportPrepurchaseRecord"}, +            {25, nullptr, "DeletePrepurchaseRecord"}, +            {26, nullptr, "DeleteAllPrepurchaseRecord"}, +            {27, nullptr, "CountPrepurchaseRecord"}, +            {28, nullptr, "ListPrepurchaseRecord"}, +            {29, nullptr, "ListPrepurchaseRecordInfo"}, +            {30, nullptr, "Unknown1"}, +            {31, nullptr, "Unknown2"}, +            {32, nullptr, "Unknown3"}, +            {33, nullptr, "Unknown4"}, +            {34, nullptr, "Unknown5"}, +            {35, nullptr, "Unknown6"}, +        }; +        RegisterHandlers(functions); +    } +}; + +void InstallInterfaces(SM::ServiceManager& service_manager) { +    std::make_shared<ETicket>()->InstallAsService(service_manager); +} + +} // namespace Service::ES diff --git a/src/core/hle/service/es/es.h b/src/core/hle/service/es/es.h new file mode 100644 index 000000000..afe70465b --- /dev/null +++ b/src/core/hle/service/es/es.h @@ -0,0 +1,16 @@ +// Copyright 2018 yuzu emulator team +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +#pragma once + +namespace Service::SM { +class ServiceManager; +} + +namespace Service::ES { + +/// Registers all ES services with the specified service manager. +void InstallInterfaces(SM::ServiceManager& service_manager); + +} // namespace Service::ES diff --git a/src/core/hle/service/pm/pm.cpp b/src/core/hle/service/pm/pm.cpp new file mode 100644 index 000000000..e20a25689 --- /dev/null +++ b/src/core/hle/service/pm/pm.cpp @@ -0,0 +1,70 @@ +// Copyright 2018 yuzu emulator team +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +#include "core/hle/service/service.h" + +namespace Service::PM { + +class BootMode final : public ServiceFramework<BootMode> { +public: +    explicit BootMode() : ServiceFramework{"pm:bm"} { +        static const FunctionInfo functions[] = { +            {0, nullptr, "GetBootMode"}, +            {1, nullptr, "SetMaintenanceBoot"}, +        }; +        RegisterHandlers(functions); +    } +}; + +class DebugMonitor final : public ServiceFramework<DebugMonitor> { +public: +    explicit DebugMonitor() : ServiceFramework{"pm:dmnt"} { +        static const FunctionInfo functions[] = { +            {0, nullptr, "IsDebugMode"}, +            {1, nullptr, "GetDebugProcesses"}, +            {2, nullptr, "StartDebugProcess"}, +            {3, nullptr, "GetTitlePid"}, +            {4, nullptr, "EnableDebugForTitleId"}, +            {5, nullptr, "GetApplicationPid"}, +            {6, nullptr, "EnableDebugForApplication"}, +        }; +        RegisterHandlers(functions); +    } +}; + +class Info final : public ServiceFramework<Info> { +public: +    explicit Info() : ServiceFramework{"pm:info"} { +        static const FunctionInfo functions[] = { +            {0, nullptr, "GetTitleId"}, +        }; +        RegisterHandlers(functions); +    } +}; + +class Shell final : public ServiceFramework<Shell> { +public: +    explicit Shell() : ServiceFramework{"pm:shell"} { +        static const FunctionInfo functions[] = { +            {0, nullptr, "LaunchProcess"}, +            {1, nullptr, "TerminateProcessByPid"}, +            {2, nullptr, "TerminateProcessByTitleId"}, +            {3, nullptr, "GetProcessEventWaiter"}, +            {4, nullptr, "GetProcessEventType"}, +            {5, nullptr, "NotifyBootFinished"}, +            {6, nullptr, "GetApplicationPid"}, +            {7, nullptr, "BoostSystemMemoryResourceLimit"}, +        }; +        RegisterHandlers(functions); +    } +}; + +void InstallInterfaces(SM::ServiceManager& sm) { +    std::make_shared<BootMode>()->InstallAsService(sm); +    std::make_shared<DebugMonitor>()->InstallAsService(sm); +    std::make_shared<Info>()->InstallAsService(sm); +    std::make_shared<Shell>()->InstallAsService(sm); +} + +} // namespace Service::PM diff --git a/src/core/hle/service/pm/pm.h b/src/core/hle/service/pm/pm.h new file mode 100644 index 000000000..9fc19fed6 --- /dev/null +++ b/src/core/hle/service/pm/pm.h @@ -0,0 +1,16 @@ +// Copyright 2018 yuzu emulator team +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +#pragma once + +namespace Service::SM { +class ServiceManager; +} + +namespace Service::PM { + +/// Registers all PM services with the specified service manager. +void InstallInterfaces(SM::ServiceManager& service_manager); + +} // namespace Service::PM diff --git a/src/core/hle/service/service.cpp b/src/core/hle/service/service.cpp index 0d036bfaa..4daf13fa3 100644 --- a/src/core/hle/service/service.cpp +++ b/src/core/hle/service/service.cpp @@ -21,6 +21,7 @@  #include "core/hle/service/apm/apm.h"  #include "core/hle/service/audio/audio.h"  #include "core/hle/service/bcat/bcat.h" +#include "core/hle/service/es/es.h"  #include "core/hle/service/fatal/fatal.h"  #include "core/hle/service/filesystem/filesystem.h"  #include "core/hle/service/friend/friend.h" @@ -32,6 +33,7 @@  #include "core/hle/service/ns/ns.h"  #include "core/hle/service/nvdrv/nvdrv.h"  #include "core/hle/service/pctl/pctl.h" +#include "core/hle/service/pm/pm.h"  #include "core/hle/service/prepo/prepo.h"  #include "core/hle/service/service.h"  #include "core/hle/service/set/settings.h" @@ -187,6 +189,7 @@ void Init(std::shared_ptr<SM::ServiceManager>& sm) {      APM::InstallInterfaces(*sm);      BCAT::InstallInterfaces(*sm);      Audio::InstallInterfaces(*sm); +    ES::InstallInterfaces(*sm);      Fatal::InstallInterfaces(*sm);      FileSystem::InstallInterfaces(*sm);      Friend::InstallInterfaces(*sm); @@ -199,6 +202,7 @@ void Init(std::shared_ptr<SM::ServiceManager>& sm) {      Nvidia::InstallInterfaces(*sm);      PCTL::InstallInterfaces(*sm);      PlayReport::InstallInterfaces(*sm); +    PM::InstallInterfaces(*sm);      Sockets::InstallInterfaces(*sm);      SPL::InstallInterfaces(*sm);      SSL::InstallInterfaces(*sm); diff --git a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp index 91ce0357b..f52ac23f1 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp @@ -113,6 +113,7 @@ static constexpr std::array<FormatTuple, SurfaceParams::MaxPixelFormat> tex_form      {GL_R32F, GL_RED, GL_FLOAT, ComponentType::Float, false},           // R32F      {GL_R16F, GL_RED, GL_HALF_FLOAT, ComponentType::Float, false},      // R16F      {GL_R16, GL_RED, GL_UNSIGNED_SHORT, ComponentType::UNorm, false},   // R16UNORM +    {GL_SRGB8_ALPHA8, GL_RGBA, GL_UNSIGNED_INT_8_8_8_8_REV, ComponentType::UNorm, false}, // SRGBA8      // DepthStencil formats      {GL_DEPTH24_STENCIL8, GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8, ComponentType::UNorm, @@ -209,9 +210,10 @@ static constexpr std::array<void (*)(u32, u32, u32, u8*, Tegra::GPUVAddr),          MortonCopy<true, PixelFormat::G8R8>,         MortonCopy<true, PixelFormat::BGRA8>,          MortonCopy<true, PixelFormat::RGBA32F>,      MortonCopy<true, PixelFormat::RG32F>,          MortonCopy<true, PixelFormat::R32F>,         MortonCopy<true, PixelFormat::R16F>, -        MortonCopy<true, PixelFormat::R16UNORM>,     MortonCopy<true, PixelFormat::Z24S8>, -        MortonCopy<true, PixelFormat::S8Z24>,        MortonCopy<true, PixelFormat::Z32F>, -        MortonCopy<true, PixelFormat::Z16>,          MortonCopy<true, PixelFormat::Z32FS8>, +        MortonCopy<true, PixelFormat::R16UNORM>,     MortonCopy<true, PixelFormat::SRGBA8>, +        MortonCopy<true, PixelFormat::Z24S8>,        MortonCopy<true, PixelFormat::S8Z24>, +        MortonCopy<true, PixelFormat::Z32F>,         MortonCopy<true, PixelFormat::Z16>, +        MortonCopy<true, PixelFormat::Z32FS8>,  };  static constexpr std::array<void (*)(u32, u32, u32, u8*, Tegra::GPUVAddr), @@ -239,6 +241,7 @@ static constexpr std::array<void (*)(u32, u32, u32, u8*, Tegra::GPUVAddr),          MortonCopy<false, PixelFormat::R32F>,          MortonCopy<false, PixelFormat::R16F>,          MortonCopy<false, PixelFormat::R16UNORM>, +        MortonCopy<false, PixelFormat::SRGBA8>,          MortonCopy<false, PixelFormat::Z24S8>,          MortonCopy<false, PixelFormat::S8Z24>,          MortonCopy<false, PixelFormat::Z32F>, diff --git a/src/video_core/renderer_opengl/gl_rasterizer_cache.h b/src/video_core/renderer_opengl/gl_rasterizer_cache.h index fc864c56f..ffa2019f7 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer_cache.h +++ b/src/video_core/renderer_opengl/gl_rasterizer_cache.h @@ -43,15 +43,16 @@ struct SurfaceParams {          R32F = 18,          R16F = 19,          R16UNORM = 20, +        SRGBA8 = 21,          MaxColorFormat,          // DepthStencil formats -        Z24S8 = 21, -        S8Z24 = 22, -        Z32F = 23, -        Z16 = 24, -        Z32FS8 = 25, +        Z24S8 = 22, +        S8Z24 = 23, +        Z32F = 24, +        Z16 = 25, +        Z32FS8 = 26,          MaxDepthStencilFormat, @@ -110,6 +111,7 @@ struct SurfaceParams {              1, // R32F              1, // R16F              1, // R16UNORM +            1, // SRGBA8              1, // Z24S8              1, // S8Z24              1, // Z32F @@ -147,6 +149,7 @@ struct SurfaceParams {              32,  // R32F              16,  // R16F              16,  // R16UNORM +            32,  // SRGBA8              32,  // Z24S8              32,  // S8Z24              32,  // Z32F @@ -182,8 +185,9 @@ struct SurfaceParams {      static PixelFormat PixelFormatFromRenderTargetFormat(Tegra::RenderTargetFormat format) {          switch (format) { -        case Tegra::RenderTargetFormat::RGBA8_UNORM:          case Tegra::RenderTargetFormat::RGBA8_SRGB: +            return PixelFormat::SRGBA8; +        case Tegra::RenderTargetFormat::RGBA8_UNORM:              return PixelFormat::ABGR8;          case Tegra::RenderTargetFormat::BGRA8_UNORM:              return PixelFormat::BGRA8; @@ -278,6 +282,7 @@ struct SurfaceParams {          // TODO(Subv): Properly implement this          switch (format) {          case PixelFormat::ABGR8: +        case PixelFormat::SRGBA8:              return Tegra::Texture::TextureFormat::A8R8G8B8;          case PixelFormat::B5G6R5:              return Tegra::Texture::TextureFormat::B5G6R5; diff --git a/src/yuzu/debugger/wait_tree.cpp b/src/yuzu/debugger/wait_tree.cpp index 416cc1dfa..2b45b8573 100644 --- a/src/yuzu/debugger/wait_tree.cpp +++ b/src/yuzu/debugger/wait_tree.cpp @@ -209,6 +209,9 @@ QString WaitTreeThread::GetText() const {      case ThreadStatus::WaitSleep:          status = tr("sleeping");          break; +    case ThreadStatus::WaitIPC: +        status = tr("waiting for IPC reply"); +        break;      case ThreadStatus::WaitSynchAll:      case ThreadStatus::WaitSynchAny:          status = tr("waiting for objects"); @@ -240,6 +243,7 @@ QColor WaitTreeThread::GetColor() const {      case ThreadStatus::Ready:          return QColor(Qt::GlobalColor::darkBlue);      case ThreadStatus::WaitHLEEvent: +    case ThreadStatus::WaitIPC:          return QColor(Qt::GlobalColor::darkRed);      case ThreadStatus::WaitSleep:          return QColor(Qt::GlobalColor::darkYellow);  | 
