summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/kernel/k_session_request.h31
-rw-r--r--src/video_core/texture_cache/format_lookup_table.cpp2
2 files changed, 17 insertions, 16 deletions
diff --git a/src/core/hle/kernel/k_session_request.h b/src/core/hle/kernel/k_session_request.h
index fcf521597..e5558bc2c 100644
--- a/src/core/hle/kernel/k_session_request.h
+++ b/src/core/hle/kernel/k_session_request.h
@@ -3,6 +3,8 @@
3 3
4#pragma once 4#pragma once
5 5
6#include <array>
7
6#include "core/hle/kernel/k_auto_object.h" 8#include "core/hle/kernel/k_auto_object.h"
7#include "core/hle/kernel/k_event.h" 9#include "core/hle/kernel/k_event.h"
8#include "core/hle/kernel/k_memory_block.h" 10#include "core/hle/kernel/k_memory_block.h"
@@ -52,8 +54,7 @@ public:
52 }; 54 };
53 55
54 public: 56 public:
55 explicit SessionMappings(KernelCore& kernel_) 57 explicit SessionMappings(KernelCore& kernel_) : kernel(kernel_) {}
56 : kernel(kernel_), m_mappings(nullptr), m_num_send(), m_num_recv(), m_num_exch() {}
57 58
58 void Initialize() {} 59 void Initialize() {}
59 void Finalize(); 60 void Finalize();
@@ -149,17 +150,15 @@ public:
149 150
150 private: 151 private:
151 KernelCore& kernel; 152 KernelCore& kernel;
152 Mapping m_static_mappings[NumStaticMappings]; 153 std::array<Mapping, NumStaticMappings> m_static_mappings;
153 Mapping* m_mappings; 154 Mapping* m_mappings{};
154 u8 m_num_send; 155 u8 m_num_send{};
155 u8 m_num_recv; 156 u8 m_num_recv{};
156 u8 m_num_exch; 157 u8 m_num_exch{};
157 }; 158 };
158 159
159public: 160public:
160 explicit KSessionRequest(KernelCore& kernel_) 161 explicit KSessionRequest(KernelCore& kernel_) : KAutoObject(kernel_), m_mappings(kernel_) {}
161 : KAutoObject(kernel_), m_mappings(kernel_), m_thread(nullptr), m_server(nullptr),
162 m_event(nullptr) {}
163 162
164 static KSessionRequest* Create(KernelCore& kernel) { 163 static KSessionRequest* Create(KernelCore& kernel) {
165 KSessionRequest* req = KSessionRequest::Allocate(kernel); 164 KSessionRequest* req = KSessionRequest::Allocate(kernel);
@@ -281,7 +280,7 @@ public:
281 280
282private: 281private:
283 // NOTE: This is public and virtual in Nintendo's kernel. 282 // NOTE: This is public and virtual in Nintendo's kernel.
284 void Finalize() { 283 void Finalize() override {
285 m_mappings.Finalize(); 284 m_mappings.Finalize();
286 285
287 if (m_thread) { 286 if (m_thread) {
@@ -297,11 +296,11 @@ private:
297 296
298private: 297private:
299 SessionMappings m_mappings; 298 SessionMappings m_mappings;
300 KThread* m_thread; 299 KThread* m_thread{};
301 KProcess* m_server; 300 KProcess* m_server{};
302 KEvent* m_event; 301 KEvent* m_event{};
303 uintptr_t m_address; 302 uintptr_t m_address{};
304 size_t m_size; 303 size_t m_size{};
305}; 304};
306 305
307} // namespace Kernel 306} // namespace Kernel
diff --git a/src/video_core/texture_cache/format_lookup_table.cpp b/src/video_core/texture_cache/format_lookup_table.cpp
index ad935d386..08aa8ca33 100644
--- a/src/video_core/texture_cache/format_lookup_table.cpp
+++ b/src/video_core/texture_cache/format_lookup_table.cpp
@@ -150,6 +150,8 @@ PixelFormat PixelFormatFromTextureInfo(TextureFormat format, ComponentType red,
150 return PixelFormat::D24_UNORM_S8_UINT; 150 return PixelFormat::D24_UNORM_S8_UINT;
151 case Hash(TextureFormat::D32S8, FLOAT, UINT, UNORM, UNORM, LINEAR): 151 case Hash(TextureFormat::D32S8, FLOAT, UINT, UNORM, UNORM, LINEAR):
152 return PixelFormat::D32_FLOAT_S8_UINT; 152 return PixelFormat::D32_FLOAT_S8_UINT;
153 case Hash(TextureFormat::R32_B24G8, FLOAT, UINT, UNORM, UNORM, LINEAR):
154 return PixelFormat::D32_FLOAT_S8_UINT;
153 case Hash(TextureFormat::BC1_RGBA, UNORM, LINEAR): 155 case Hash(TextureFormat::BC1_RGBA, UNORM, LINEAR):
154 return PixelFormat::BC1_RGBA_UNORM; 156 return PixelFormat::BC1_RGBA_UNORM;
155 case Hash(TextureFormat::BC1_RGBA, UNORM, SRGB): 157 case Hash(TextureFormat::BC1_RGBA, UNORM, SRGB):