summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/CMakeLists.txt4
-rw-r--r--src/core/hle/service/es/es.cpp57
-rw-r--r--src/core/hle/service/es/es.h16
-rw-r--r--src/core/hle/service/pm/pm.cpp70
-rw-r--r--src/core/hle/service/pm/pm.h16
-rw-r--r--src/core/hle/service/service.cpp4
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer_cache.cpp9
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer_cache.h17
-rw-r--r--src/yuzu/debugger/wait_tree.cpp4
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
136 hle/service/bcat/bcat.h 136 hle/service/bcat/bcat.h
137 hle/service/bcat/module.cpp 137 hle/service/bcat/module.cpp
138 hle/service/bcat/module.h 138 hle/service/bcat/module.h
139 hle/service/es/es.cpp
140 hle/service/es/es.h
139 hle/service/fatal/fatal.cpp 141 hle/service/fatal/fatal.cpp
140 hle/service/fatal/fatal.h 142 hle/service/fatal/fatal.h
141 hle/service/fatal/fatal_p.cpp 143 hle/service/fatal/fatal_p.cpp
@@ -201,6 +203,8 @@ add_library(core STATIC
201 hle/service/pctl/module.h 203 hle/service/pctl/module.h
202 hle/service/pctl/pctl.cpp 204 hle/service/pctl/pctl.cpp
203 hle/service/pctl/pctl.h 205 hle/service/pctl/pctl.h
206 hle/service/pm/pm.cpp
207 hle/service/pm/pm.h
204 hle/service/prepo/prepo.cpp 208 hle/service/prepo/prepo.cpp
205 hle/service/prepo/prepo.h 209 hle/service/prepo/prepo.h
206 hle/service/service.cpp 210 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 @@
1// Copyright 2018 yuzu emulator team
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#include "core/hle/service/service.h"
6
7namespace Service::ES {
8
9class ETicket final : public ServiceFramework<ETicket> {
10public:
11 explicit ETicket() : ServiceFramework{"es"} {
12 static const FunctionInfo functions[] = {
13 {1, nullptr, "ImportTicket"},
14 {2, nullptr, "ImportTicketCertificateSet"},
15 {3, nullptr, "DeleteTicket"},
16 {4, nullptr, "DeletePersonalizedTicket"},
17 {5, nullptr, "DeleteAllCommonTicket"},
18 {6, nullptr, "DeleteAllPersonalizedTicket"},
19 {7, nullptr, "DeleteAllPersonalizedTicketEx"},
20 {8, nullptr, "GetTitleKey"},
21 {9, nullptr, "CountCommonTicket"},
22 {10, nullptr, "CountPersonalizedTicket"},
23 {11, nullptr, "ListCommonTicket"},
24 {12, nullptr, "ListPersonalizedTicket"},
25 {13, nullptr, "ListMissingPersonalizedTicket"},
26 {14, nullptr, "GetCommonTicketSize"},
27 {15, nullptr, "GetPersonalizedTicketSize"},
28 {16, nullptr, "GetCommonTicketData"},
29 {17, nullptr, "GetPersonalizedTicketData"},
30 {18, nullptr, "OwnTicket"},
31 {19, nullptr, "GetTicketInfo"},
32 {20, nullptr, "ListLightTicketInfo"},
33 {21, nullptr, "SignData"},
34 {22, nullptr, "GetCommonTicketAndCertificateSize"},
35 {23, nullptr, "GetCommonTicketAndCertificateData"},
36 {24, nullptr, "ImportPrepurchaseRecord"},
37 {25, nullptr, "DeletePrepurchaseRecord"},
38 {26, nullptr, "DeleteAllPrepurchaseRecord"},
39 {27, nullptr, "CountPrepurchaseRecord"},
40 {28, nullptr, "ListPrepurchaseRecord"},
41 {29, nullptr, "ListPrepurchaseRecordInfo"},
42 {30, nullptr, "Unknown1"},
43 {31, nullptr, "Unknown2"},
44 {32, nullptr, "Unknown3"},
45 {33, nullptr, "Unknown4"},
46 {34, nullptr, "Unknown5"},
47 {35, nullptr, "Unknown6"},
48 };
49 RegisterHandlers(functions);
50 }
51};
52
53void InstallInterfaces(SM::ServiceManager& service_manager) {
54 std::make_shared<ETicket>()->InstallAsService(service_manager);
55}
56
57} // 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 @@
1// Copyright 2018 yuzu emulator team
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#pragma once
6
7namespace Service::SM {
8class ServiceManager;
9}
10
11namespace Service::ES {
12
13/// Registers all ES services with the specified service manager.
14void InstallInterfaces(SM::ServiceManager& service_manager);
15
16} // 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 @@
1// Copyright 2018 yuzu emulator team
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#include "core/hle/service/service.h"
6
7namespace Service::PM {
8
9class BootMode final : public ServiceFramework<BootMode> {
10public:
11 explicit BootMode() : ServiceFramework{"pm:bm"} {
12 static const FunctionInfo functions[] = {
13 {0, nullptr, "GetBootMode"},
14 {1, nullptr, "SetMaintenanceBoot"},
15 };
16 RegisterHandlers(functions);
17 }
18};
19
20class DebugMonitor final : public ServiceFramework<DebugMonitor> {
21public:
22 explicit DebugMonitor() : ServiceFramework{"pm:dmnt"} {
23 static const FunctionInfo functions[] = {
24 {0, nullptr, "IsDebugMode"},
25 {1, nullptr, "GetDebugProcesses"},
26 {2, nullptr, "StartDebugProcess"},
27 {3, nullptr, "GetTitlePid"},
28 {4, nullptr, "EnableDebugForTitleId"},
29 {5, nullptr, "GetApplicationPid"},
30 {6, nullptr, "EnableDebugForApplication"},
31 };
32 RegisterHandlers(functions);
33 }
34};
35
36class Info final : public ServiceFramework<Info> {
37public:
38 explicit Info() : ServiceFramework{"pm:info"} {
39 static const FunctionInfo functions[] = {
40 {0, nullptr, "GetTitleId"},
41 };
42 RegisterHandlers(functions);
43 }
44};
45
46class Shell final : public ServiceFramework<Shell> {
47public:
48 explicit Shell() : ServiceFramework{"pm:shell"} {
49 static const FunctionInfo functions[] = {
50 {0, nullptr, "LaunchProcess"},
51 {1, nullptr, "TerminateProcessByPid"},
52 {2, nullptr, "TerminateProcessByTitleId"},
53 {3, nullptr, "GetProcessEventWaiter"},
54 {4, nullptr, "GetProcessEventType"},
55 {5, nullptr, "NotifyBootFinished"},
56 {6, nullptr, "GetApplicationPid"},
57 {7, nullptr, "BoostSystemMemoryResourceLimit"},
58 };
59 RegisterHandlers(functions);
60 }
61};
62
63void InstallInterfaces(SM::ServiceManager& sm) {
64 std::make_shared<BootMode>()->InstallAsService(sm);
65 std::make_shared<DebugMonitor>()->InstallAsService(sm);
66 std::make_shared<Info>()->InstallAsService(sm);
67 std::make_shared<Shell>()->InstallAsService(sm);
68}
69
70} // 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 @@
1// Copyright 2018 yuzu emulator team
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#pragma once
6
7namespace Service::SM {
8class ServiceManager;
9}
10
11namespace Service::PM {
12
13/// Registers all PM services with the specified service manager.
14void InstallInterfaces(SM::ServiceManager& service_manager);
15
16} // 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 @@
21#include "core/hle/service/apm/apm.h" 21#include "core/hle/service/apm/apm.h"
22#include "core/hle/service/audio/audio.h" 22#include "core/hle/service/audio/audio.h"
23#include "core/hle/service/bcat/bcat.h" 23#include "core/hle/service/bcat/bcat.h"
24#include "core/hle/service/es/es.h"
24#include "core/hle/service/fatal/fatal.h" 25#include "core/hle/service/fatal/fatal.h"
25#include "core/hle/service/filesystem/filesystem.h" 26#include "core/hle/service/filesystem/filesystem.h"
26#include "core/hle/service/friend/friend.h" 27#include "core/hle/service/friend/friend.h"
@@ -32,6 +33,7 @@
32#include "core/hle/service/ns/ns.h" 33#include "core/hle/service/ns/ns.h"
33#include "core/hle/service/nvdrv/nvdrv.h" 34#include "core/hle/service/nvdrv/nvdrv.h"
34#include "core/hle/service/pctl/pctl.h" 35#include "core/hle/service/pctl/pctl.h"
36#include "core/hle/service/pm/pm.h"
35#include "core/hle/service/prepo/prepo.h" 37#include "core/hle/service/prepo/prepo.h"
36#include "core/hle/service/service.h" 38#include "core/hle/service/service.h"
37#include "core/hle/service/set/settings.h" 39#include "core/hle/service/set/settings.h"
@@ -187,6 +189,7 @@ void Init(std::shared_ptr<SM::ServiceManager>& sm) {
187 APM::InstallInterfaces(*sm); 189 APM::InstallInterfaces(*sm);
188 BCAT::InstallInterfaces(*sm); 190 BCAT::InstallInterfaces(*sm);
189 Audio::InstallInterfaces(*sm); 191 Audio::InstallInterfaces(*sm);
192 ES::InstallInterfaces(*sm);
190 Fatal::InstallInterfaces(*sm); 193 Fatal::InstallInterfaces(*sm);
191 FileSystem::InstallInterfaces(*sm); 194 FileSystem::InstallInterfaces(*sm);
192 Friend::InstallInterfaces(*sm); 195 Friend::InstallInterfaces(*sm);
@@ -199,6 +202,7 @@ void Init(std::shared_ptr<SM::ServiceManager>& sm) {
199 Nvidia::InstallInterfaces(*sm); 202 Nvidia::InstallInterfaces(*sm);
200 PCTL::InstallInterfaces(*sm); 203 PCTL::InstallInterfaces(*sm);
201 PlayReport::InstallInterfaces(*sm); 204 PlayReport::InstallInterfaces(*sm);
205 PM::InstallInterfaces(*sm);
202 Sockets::InstallInterfaces(*sm); 206 Sockets::InstallInterfaces(*sm);
203 SPL::InstallInterfaces(*sm); 207 SPL::InstallInterfaces(*sm);
204 SSL::InstallInterfaces(*sm); 208 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
113 {GL_R32F, GL_RED, GL_FLOAT, ComponentType::Float, false}, // R32F 113 {GL_R32F, GL_RED, GL_FLOAT, ComponentType::Float, false}, // R32F
114 {GL_R16F, GL_RED, GL_HALF_FLOAT, ComponentType::Float, false}, // R16F 114 {GL_R16F, GL_RED, GL_HALF_FLOAT, ComponentType::Float, false}, // R16F
115 {GL_R16, GL_RED, GL_UNSIGNED_SHORT, ComponentType::UNorm, false}, // R16UNORM 115 {GL_R16, GL_RED, GL_UNSIGNED_SHORT, ComponentType::UNorm, false}, // R16UNORM
116 {GL_SRGB8_ALPHA8, GL_RGBA, GL_UNSIGNED_INT_8_8_8_8_REV, ComponentType::UNorm, false}, // SRGBA8
116 117
117 // DepthStencil formats 118 // DepthStencil formats
118 {GL_DEPTH24_STENCIL8, GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8, ComponentType::UNorm, 119 {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),
209 MortonCopy<true, PixelFormat::G8R8>, MortonCopy<true, PixelFormat::BGRA8>, 210 MortonCopy<true, PixelFormat::G8R8>, MortonCopy<true, PixelFormat::BGRA8>,
210 MortonCopy<true, PixelFormat::RGBA32F>, MortonCopy<true, PixelFormat::RG32F>, 211 MortonCopy<true, PixelFormat::RGBA32F>, MortonCopy<true, PixelFormat::RG32F>,
211 MortonCopy<true, PixelFormat::R32F>, MortonCopy<true, PixelFormat::R16F>, 212 MortonCopy<true, PixelFormat::R32F>, MortonCopy<true, PixelFormat::R16F>,
212 MortonCopy<true, PixelFormat::R16UNORM>, MortonCopy<true, PixelFormat::Z24S8>, 213 MortonCopy<true, PixelFormat::R16UNORM>, MortonCopy<true, PixelFormat::SRGBA8>,
213 MortonCopy<true, PixelFormat::S8Z24>, MortonCopy<true, PixelFormat::Z32F>, 214 MortonCopy<true, PixelFormat::Z24S8>, MortonCopy<true, PixelFormat::S8Z24>,
214 MortonCopy<true, PixelFormat::Z16>, MortonCopy<true, PixelFormat::Z32FS8>, 215 MortonCopy<true, PixelFormat::Z32F>, MortonCopy<true, PixelFormat::Z16>,
216 MortonCopy<true, PixelFormat::Z32FS8>,
215}; 217};
216 218
217static constexpr std::array<void (*)(u32, u32, u32, u8*, Tegra::GPUVAddr), 219static 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),
239 MortonCopy<false, PixelFormat::R32F>, 241 MortonCopy<false, PixelFormat::R32F>,
240 MortonCopy<false, PixelFormat::R16F>, 242 MortonCopy<false, PixelFormat::R16F>,
241 MortonCopy<false, PixelFormat::R16UNORM>, 243 MortonCopy<false, PixelFormat::R16UNORM>,
244 MortonCopy<false, PixelFormat::SRGBA8>,
242 MortonCopy<false, PixelFormat::Z24S8>, 245 MortonCopy<false, PixelFormat::Z24S8>,
243 MortonCopy<false, PixelFormat::S8Z24>, 246 MortonCopy<false, PixelFormat::S8Z24>,
244 MortonCopy<false, PixelFormat::Z32F>, 247 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 {
43 R32F = 18, 43 R32F = 18,
44 R16F = 19, 44 R16F = 19,
45 R16UNORM = 20, 45 R16UNORM = 20,
46 SRGBA8 = 21,
46 47
47 MaxColorFormat, 48 MaxColorFormat,
48 49
49 // DepthStencil formats 50 // DepthStencil formats
50 Z24S8 = 21, 51 Z24S8 = 22,
51 S8Z24 = 22, 52 S8Z24 = 23,
52 Z32F = 23, 53 Z32F = 24,
53 Z16 = 24, 54 Z16 = 25,
54 Z32FS8 = 25, 55 Z32FS8 = 26,
55 56
56 MaxDepthStencilFormat, 57 MaxDepthStencilFormat,
57 58
@@ -110,6 +111,7 @@ struct SurfaceParams {
110 1, // R32F 111 1, // R32F
111 1, // R16F 112 1, // R16F
112 1, // R16UNORM 113 1, // R16UNORM
114 1, // SRGBA8
113 1, // Z24S8 115 1, // Z24S8
114 1, // S8Z24 116 1, // S8Z24
115 1, // Z32F 117 1, // Z32F
@@ -147,6 +149,7 @@ struct SurfaceParams {
147 32, // R32F 149 32, // R32F
148 16, // R16F 150 16, // R16F
149 16, // R16UNORM 151 16, // R16UNORM
152 32, // SRGBA8
150 32, // Z24S8 153 32, // Z24S8
151 32, // S8Z24 154 32, // S8Z24
152 32, // Z32F 155 32, // Z32F
@@ -182,8 +185,9 @@ struct SurfaceParams {
182 185
183 static PixelFormat PixelFormatFromRenderTargetFormat(Tegra::RenderTargetFormat format) { 186 static PixelFormat PixelFormatFromRenderTargetFormat(Tegra::RenderTargetFormat format) {
184 switch (format) { 187 switch (format) {
185 case Tegra::RenderTargetFormat::RGBA8_UNORM:
186 case Tegra::RenderTargetFormat::RGBA8_SRGB: 188 case Tegra::RenderTargetFormat::RGBA8_SRGB:
189 return PixelFormat::SRGBA8;
190 case Tegra::RenderTargetFormat::RGBA8_UNORM:
187 return PixelFormat::ABGR8; 191 return PixelFormat::ABGR8;
188 case Tegra::RenderTargetFormat::BGRA8_UNORM: 192 case Tegra::RenderTargetFormat::BGRA8_UNORM:
189 return PixelFormat::BGRA8; 193 return PixelFormat::BGRA8;
@@ -278,6 +282,7 @@ struct SurfaceParams {
278 // TODO(Subv): Properly implement this 282 // TODO(Subv): Properly implement this
279 switch (format) { 283 switch (format) {
280 case PixelFormat::ABGR8: 284 case PixelFormat::ABGR8:
285 case PixelFormat::SRGBA8:
281 return Tegra::Texture::TextureFormat::A8R8G8B8; 286 return Tegra::Texture::TextureFormat::A8R8G8B8;
282 case PixelFormat::B5G6R5: 287 case PixelFormat::B5G6R5:
283 return Tegra::Texture::TextureFormat::B5G6R5; 288 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 {
209 case ThreadStatus::WaitSleep: 209 case ThreadStatus::WaitSleep:
210 status = tr("sleeping"); 210 status = tr("sleeping");
211 break; 211 break;
212 case ThreadStatus::WaitIPC:
213 status = tr("waiting for IPC reply");
214 break;
212 case ThreadStatus::WaitSynchAll: 215 case ThreadStatus::WaitSynchAll:
213 case ThreadStatus::WaitSynchAny: 216 case ThreadStatus::WaitSynchAny:
214 status = tr("waiting for objects"); 217 status = tr("waiting for objects");
@@ -240,6 +243,7 @@ QColor WaitTreeThread::GetColor() const {
240 case ThreadStatus::Ready: 243 case ThreadStatus::Ready:
241 return QColor(Qt::GlobalColor::darkBlue); 244 return QColor(Qt::GlobalColor::darkBlue);
242 case ThreadStatus::WaitHLEEvent: 245 case ThreadStatus::WaitHLEEvent:
246 case ThreadStatus::WaitIPC:
243 return QColor(Qt::GlobalColor::darkRed); 247 return QColor(Qt::GlobalColor::darkRed);
244 case ThreadStatus::WaitSleep: 248 case ThreadStatus::WaitSleep:
245 return QColor(Qt::GlobalColor::darkYellow); 249 return QColor(Qt::GlobalColor::darkYellow);