diff options
| -rw-r--r-- | src/core/CMakeLists.txt | 6 | ||||
| -rw-r--r-- | src/core/hle/kernel/svc.cpp | 11 | ||||
| -rw-r--r-- | src/core/hle/service/friend/friend.cpp | 10 | ||||
| -rw-r--r-- | src/core/hle/service/friend/friend_u.cpp | 18 | ||||
| -rw-r--r-- | src/core/hle/service/friend/friend_u.h | 16 | ||||
| -rw-r--r-- | src/core/hle/service/friend/interface.cpp (renamed from src/core/hle/service/friend/friend_a.cpp) | 9 | ||||
| -rw-r--r-- | src/core/hle/service/friend/interface.h (renamed from src/core/hle/service/friend/friend_a.h) | 4 | ||||
| -rw-r--r-- | src/core/loader/deconstructed_rom_directory.cpp | 29 | ||||
| -rw-r--r-- | src/video_core/engines/maxwell_3d.cpp | 8 | ||||
| -rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer_cache.cpp | 7 | ||||
| -rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer_cache.h | 27 | ||||
| -rw-r--r-- | src/video_core/textures/decoders.cpp | 3 |
12 files changed, 54 insertions, 94 deletions
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 6b6efbc00..b7d52babc 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt | |||
| @@ -146,10 +146,8 @@ add_library(core STATIC | |||
| 146 | hle/service/filesystem/fsp_srv.h | 146 | hle/service/filesystem/fsp_srv.h |
| 147 | hle/service/friend/friend.cpp | 147 | hle/service/friend/friend.cpp |
| 148 | hle/service/friend/friend.h | 148 | hle/service/friend/friend.h |
| 149 | hle/service/friend/friend_a.cpp | 149 | hle/service/friend/interface.cpp |
| 150 | hle/service/friend/friend_a.h | 150 | hle/service/friend/interface.h |
| 151 | hle/service/friend/friend_u.cpp | ||
| 152 | hle/service/friend/friend_u.h | ||
| 153 | hle/service/hid/hid.cpp | 151 | hle/service/hid/hid.cpp |
| 154 | hle/service/hid/hid.h | 152 | hle/service/hid/hid.h |
| 155 | hle/service/lm/lm.cpp | 153 | hle/service/lm/lm.cpp |
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp index 7b41c9cfd..da7cacb57 100644 --- a/src/core/hle/kernel/svc.cpp +++ b/src/core/hle/kernel/svc.cpp | |||
| @@ -165,11 +165,14 @@ static ResultCode WaitSynchronization(Handle* index, VAddr handles_address, u64 | |||
| 165 | using ObjectPtr = SharedPtr<WaitObject>; | 165 | using ObjectPtr = SharedPtr<WaitObject>; |
| 166 | std::vector<ObjectPtr> objects(handle_count); | 166 | std::vector<ObjectPtr> objects(handle_count); |
| 167 | 167 | ||
| 168 | for (int i = 0; i < handle_count; ++i) { | 168 | for (u64 i = 0; i < handle_count; ++i) { |
| 169 | Handle handle = Memory::Read32(handles_address + i * sizeof(Handle)); | 169 | const Handle handle = Memory::Read32(handles_address + i * sizeof(Handle)); |
| 170 | auto object = g_handle_table.Get<WaitObject>(handle); | 170 | const auto object = g_handle_table.Get<WaitObject>(handle); |
| 171 | if (object == nullptr) | 171 | |
| 172 | if (object == nullptr) { | ||
| 172 | return ERR_INVALID_HANDLE; | 173 | return ERR_INVALID_HANDLE; |
| 174 | } | ||
| 175 | |||
| 173 | objects[i] = object; | 176 | objects[i] = object; |
| 174 | } | 177 | } |
| 175 | 178 | ||
diff --git a/src/core/hle/service/friend/friend.cpp b/src/core/hle/service/friend/friend.cpp index c98a46e05..fb4d89068 100644 --- a/src/core/hle/service/friend/friend.cpp +++ b/src/core/hle/service/friend/friend.cpp | |||
| @@ -5,8 +5,7 @@ | |||
| 5 | #include "common/logging/log.h" | 5 | #include "common/logging/log.h" |
| 6 | #include "core/hle/ipc_helpers.h" | 6 | #include "core/hle/ipc_helpers.h" |
| 7 | #include "core/hle/service/friend/friend.h" | 7 | #include "core/hle/service/friend/friend.h" |
| 8 | #include "core/hle/service/friend/friend_a.h" | 8 | #include "core/hle/service/friend/interface.h" |
| 9 | #include "core/hle/service/friend/friend_u.h" | ||
| 10 | 9 | ||
| 11 | namespace Service::Friend { | 10 | namespace Service::Friend { |
| 12 | 11 | ||
| @@ -21,8 +20,11 @@ Module::Interface::Interface(std::shared_ptr<Module> module, const char* name) | |||
| 21 | 20 | ||
| 22 | void InstallInterfaces(SM::ServiceManager& service_manager) { | 21 | void InstallInterfaces(SM::ServiceManager& service_manager) { |
| 23 | auto module = std::make_shared<Module>(); | 22 | auto module = std::make_shared<Module>(); |
| 24 | std::make_shared<Friend_A>(module)->InstallAsService(service_manager); | 23 | std::make_shared<Friend>(module, "friend:a")->InstallAsService(service_manager); |
| 25 | std::make_shared<Friend_U>(module)->InstallAsService(service_manager); | 24 | std::make_shared<Friend>(module, "friend:m")->InstallAsService(service_manager); |
| 25 | std::make_shared<Friend>(module, "friend:s")->InstallAsService(service_manager); | ||
| 26 | std::make_shared<Friend>(module, "friend:u")->InstallAsService(service_manager); | ||
| 27 | std::make_shared<Friend>(module, "friend:v")->InstallAsService(service_manager); | ||
| 26 | } | 28 | } |
| 27 | 29 | ||
| 28 | } // namespace Service::Friend | 30 | } // namespace Service::Friend |
diff --git a/src/core/hle/service/friend/friend_u.cpp b/src/core/hle/service/friend/friend_u.cpp deleted file mode 100644 index 90b30883f..000000000 --- a/src/core/hle/service/friend/friend_u.cpp +++ /dev/null | |||
| @@ -1,18 +0,0 @@ | |||
| 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/friend/friend_u.h" | ||
| 6 | |||
| 7 | namespace Service::Friend { | ||
| 8 | |||
| 9 | Friend_U::Friend_U(std::shared_ptr<Module> module) | ||
| 10 | : Module::Interface(std::move(module), "friend:u") { | ||
| 11 | static const FunctionInfo functions[] = { | ||
| 12 | {0, &Friend_U::CreateFriendService, "CreateFriendService"}, | ||
| 13 | {1, nullptr, "CreateNotificationService"}, | ||
| 14 | }; | ||
| 15 | RegisterHandlers(functions); | ||
| 16 | } | ||
| 17 | |||
| 18 | } // namespace Service::Friend | ||
diff --git a/src/core/hle/service/friend/friend_u.h b/src/core/hle/service/friend/friend_u.h deleted file mode 100644 index 0d953d807..000000000 --- a/src/core/hle/service/friend/friend_u.h +++ /dev/null | |||
| @@ -1,16 +0,0 @@ | |||
| 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 | |||
| 7 | #include "core/hle/service/friend/friend.h" | ||
| 8 | |||
| 9 | namespace Service::Friend { | ||
| 10 | |||
| 11 | class Friend_U final : public Module::Interface { | ||
| 12 | public: | ||
| 13 | explicit Friend_U(std::shared_ptr<Module> module); | ||
| 14 | }; | ||
| 15 | |||
| 16 | } // namespace Service::Friend | ||
diff --git a/src/core/hle/service/friend/friend_a.cpp b/src/core/hle/service/friend/interface.cpp index a2cc81926..27c6a09e2 100644 --- a/src/core/hle/service/friend/friend_a.cpp +++ b/src/core/hle/service/friend/interface.cpp | |||
| @@ -2,15 +2,16 @@ | |||
| 2 | // Licensed under GPLv2 or any later version | 2 | // Licensed under GPLv2 or any later version |
| 3 | // Refer to the license.txt file included. | 3 | // Refer to the license.txt file included. |
| 4 | 4 | ||
| 5 | #include "core/hle/service/friend/friend_a.h" | 5 | #include "core/hle/service/friend/interface.h" |
| 6 | 6 | ||
| 7 | namespace Service::Friend { | 7 | namespace Service::Friend { |
| 8 | 8 | ||
| 9 | Friend_A::Friend_A(std::shared_ptr<Module> module) | 9 | Friend::Friend(std::shared_ptr<Module> module, const char* name) |
| 10 | : Module::Interface(std::move(module), "friend:a") { | 10 | : Interface(std::move(module), name) { |
| 11 | static const FunctionInfo functions[] = { | 11 | static const FunctionInfo functions[] = { |
| 12 | {0, &Friend_A::CreateFriendService, "CreateFriendService"}, | 12 | {0, &Friend::CreateFriendService, "CreateFriendService"}, |
| 13 | {1, nullptr, "CreateNotificationService"}, | 13 | {1, nullptr, "CreateNotificationService"}, |
| 14 | {2, nullptr, "CreateDaemonSuspendSessionService"}, | ||
| 14 | }; | 15 | }; |
| 15 | RegisterHandlers(functions); | 16 | RegisterHandlers(functions); |
| 16 | } | 17 | } |
diff --git a/src/core/hle/service/friend/friend_a.h b/src/core/hle/service/friend/interface.h index 81257583b..89dae8471 100644 --- a/src/core/hle/service/friend/friend_a.h +++ b/src/core/hle/service/friend/interface.h | |||
| @@ -8,9 +8,9 @@ | |||
| 8 | 8 | ||
| 9 | namespace Service::Friend { | 9 | namespace Service::Friend { |
| 10 | 10 | ||
| 11 | class Friend_A final : public Module::Interface { | 11 | class Friend final : public Module::Interface { |
| 12 | public: | 12 | public: |
| 13 | explicit Friend_A(std::shared_ptr<Module> module); | 13 | explicit Friend(std::shared_ptr<Module> module, const char* name); |
| 14 | }; | 14 | }; |
| 15 | 15 | ||
| 16 | } // namespace Service::Friend | 16 | } // namespace Service::Friend |
diff --git a/src/core/loader/deconstructed_rom_directory.cpp b/src/core/loader/deconstructed_rom_directory.cpp index 18bd62a08..b0277a875 100644 --- a/src/core/loader/deconstructed_rom_directory.cpp +++ b/src/core/loader/deconstructed_rom_directory.cpp | |||
| @@ -6,7 +6,6 @@ | |||
| 6 | #include "common/common_funcs.h" | 6 | #include "common/common_funcs.h" |
| 7 | #include "common/file_util.h" | 7 | #include "common/file_util.h" |
| 8 | #include "common/logging/log.h" | 8 | #include "common/logging/log.h" |
| 9 | #include "common/string_util.h" | ||
| 10 | #include "core/file_sys/content_archive.h" | 9 | #include "core/file_sys/content_archive.h" |
| 11 | #include "core/gdbstub/gdbstub.h" | 10 | #include "core/gdbstub/gdbstub.h" |
| 12 | #include "core/hle/kernel/process.h" | 11 | #include "core/hle/kernel/process.h" |
| @@ -18,34 +17,6 @@ | |||
| 18 | 17 | ||
| 19 | namespace Loader { | 18 | namespace Loader { |
| 20 | 19 | ||
| 21 | static std::string FindRomFS(const std::string& directory) { | ||
| 22 | std::string filepath_romfs; | ||
| 23 | const auto callback = [&filepath_romfs](u64*, const std::string& directory, | ||
| 24 | const std::string& virtual_name) -> bool { | ||
| 25 | const std::string physical_name = directory + virtual_name; | ||
| 26 | if (FileUtil::IsDirectory(physical_name)) { | ||
| 27 | // Skip directories | ||
| 28 | return true; | ||
| 29 | } | ||
| 30 | |||
| 31 | // Verify extension | ||
| 32 | const std::string extension = physical_name.substr(physical_name.find_last_of(".") + 1); | ||
| 33 | if (Common::ToLower(extension) != "romfs") { | ||
| 34 | return true; | ||
| 35 | } | ||
| 36 | |||
| 37 | // Found it - we are done | ||
| 38 | filepath_romfs = std::move(physical_name); | ||
| 39 | return false; | ||
| 40 | }; | ||
| 41 | |||
| 42 | // Search the specified directory recursively, looking for the first .romfs file, which will | ||
| 43 | // be used for the RomFS | ||
| 44 | FileUtil::ForeachDirectoryEntry(nullptr, directory, callback); | ||
| 45 | |||
| 46 | return filepath_romfs; | ||
| 47 | } | ||
| 48 | |||
| 49 | AppLoader_DeconstructedRomDirectory::AppLoader_DeconstructedRomDirectory(FileSys::VirtualFile file) | 20 | AppLoader_DeconstructedRomDirectory::AppLoader_DeconstructedRomDirectory(FileSys::VirtualFile file) |
| 50 | : AppLoader(std::move(file)) {} | 21 | : AppLoader(std::move(file)) {} |
| 51 | 22 | ||
diff --git a/src/video_core/engines/maxwell_3d.cpp b/src/video_core/engines/maxwell_3d.cpp index d7328ff39..0e205ed72 100644 --- a/src/video_core/engines/maxwell_3d.cpp +++ b/src/video_core/engines/maxwell_3d.cpp | |||
| @@ -75,14 +75,6 @@ void Maxwell3D::WriteReg(u32 method, u32 value, u32 remaining_params) { | |||
| 75 | ProcessMacroUpload(value); | 75 | ProcessMacroUpload(value); |
| 76 | break; | 76 | break; |
| 77 | } | 77 | } |
| 78 | case MAXWELL3D_REG_INDEX(code_address.code_address_high): | ||
| 79 | case MAXWELL3D_REG_INDEX(code_address.code_address_low): { | ||
| 80 | // Note: For some reason games (like Puyo Puyo Tetris) seem to write 0 to the CODE_ADDRESS | ||
| 81 | // register, we do not currently know if that's intended or a bug, so we assert it lest | ||
| 82 | // stuff breaks in other places (like the shader address calculation). | ||
| 83 | ASSERT_MSG(regs.code_address.CodeAddress() == 0, "Unexpected CODE_ADDRESS register value."); | ||
| 84 | break; | ||
| 85 | } | ||
| 86 | case MAXWELL3D_REG_INDEX(const_buffer.cb_data[0]): | 78 | case MAXWELL3D_REG_INDEX(const_buffer.cb_data[0]): |
| 87 | case MAXWELL3D_REG_INDEX(const_buffer.cb_data[1]): | 79 | case MAXWELL3D_REG_INDEX(const_buffer.cb_data[1]): |
| 88 | case MAXWELL3D_REG_INDEX(const_buffer.cb_data[2]): | 80 | case MAXWELL3D_REG_INDEX(const_buffer.cb_data[2]): |
diff --git a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp index 1d3aff97b..0f5006383 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp | |||
| @@ -111,6 +111,8 @@ static constexpr std::array<FormatTuple, SurfaceParams::MaxPixelFormat> tex_form | |||
| 111 | {GL_RGBA32F, GL_RGBA, GL_FLOAT, ComponentType::Float, false}, // RGBA32F | 111 | {GL_RGBA32F, GL_RGBA, GL_FLOAT, ComponentType::Float, false}, // RGBA32F |
| 112 | {GL_RG32F, GL_RG, GL_FLOAT, ComponentType::Float, false}, // RG32F | 112 | {GL_RG32F, GL_RG, GL_FLOAT, ComponentType::Float, false}, // RG32F |
| 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 | ||
| 115 | {GL_R16, GL_RED, GL_UNSIGNED_SHORT, ComponentType::UNorm, false}, // R16UNORM | ||
| 114 | 116 | ||
| 115 | // DepthStencil formats | 117 | // DepthStencil formats |
| 116 | {GL_DEPTH24_STENCIL8, GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8, ComponentType::UNorm, | 118 | {GL_DEPTH24_STENCIL8, GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8, ComponentType::UNorm, |
| @@ -204,7 +206,8 @@ static constexpr std::array<void (*)(u32, u32, u32, u8*, Tegra::GPUVAddr), | |||
| 204 | MortonCopy<true, PixelFormat::BC7U>, MortonCopy<true, PixelFormat::ASTC_2D_4X4>, | 206 | MortonCopy<true, PixelFormat::BC7U>, MortonCopy<true, PixelFormat::ASTC_2D_4X4>, |
| 205 | MortonCopy<true, PixelFormat::G8R8>, MortonCopy<true, PixelFormat::BGRA8>, | 207 | MortonCopy<true, PixelFormat::G8R8>, MortonCopy<true, PixelFormat::BGRA8>, |
| 206 | MortonCopy<true, PixelFormat::RGBA32F>, MortonCopy<true, PixelFormat::RG32F>, | 208 | MortonCopy<true, PixelFormat::RGBA32F>, MortonCopy<true, PixelFormat::RG32F>, |
| 207 | MortonCopy<true, PixelFormat::R32F>, MortonCopy<true, PixelFormat::Z24S8>, | 209 | MortonCopy<true, PixelFormat::R32F>, MortonCopy<true, PixelFormat::R16F>, |
| 210 | MortonCopy<true, PixelFormat::R16UNORM>, MortonCopy<true, PixelFormat::Z24S8>, | ||
| 208 | MortonCopy<true, PixelFormat::S8Z24>, MortonCopy<true, PixelFormat::Z32F>, | 211 | MortonCopy<true, PixelFormat::S8Z24>, MortonCopy<true, PixelFormat::Z32F>, |
| 209 | MortonCopy<true, PixelFormat::Z16>, | 212 | MortonCopy<true, PixelFormat::Z16>, |
| 210 | }; | 213 | }; |
| @@ -232,6 +235,8 @@ static constexpr std::array<void (*)(u32, u32, u32, u8*, Tegra::GPUVAddr), | |||
| 232 | MortonCopy<false, PixelFormat::RGBA32F>, | 235 | MortonCopy<false, PixelFormat::RGBA32F>, |
| 233 | MortonCopy<false, PixelFormat::RG32F>, | 236 | MortonCopy<false, PixelFormat::RG32F>, |
| 234 | MortonCopy<false, PixelFormat::R32F>, | 237 | MortonCopy<false, PixelFormat::R32F>, |
| 238 | MortonCopy<false, PixelFormat::R16F>, | ||
| 239 | MortonCopy<false, PixelFormat::R16UNORM>, | ||
| 235 | MortonCopy<false, PixelFormat::Z24S8>, | 240 | MortonCopy<false, PixelFormat::Z24S8>, |
| 236 | MortonCopy<false, PixelFormat::S8Z24>, | 241 | MortonCopy<false, PixelFormat::S8Z24>, |
| 237 | MortonCopy<false, PixelFormat::Z32F>, | 242 | 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 800d239d9..e1d3670d9 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer_cache.h +++ b/src/video_core/renderer_opengl/gl_rasterizer_cache.h | |||
| @@ -41,14 +41,16 @@ struct SurfaceParams { | |||
| 41 | RGBA32F = 16, | 41 | RGBA32F = 16, |
| 42 | RG32F = 17, | 42 | RG32F = 17, |
| 43 | R32F = 18, | 43 | R32F = 18, |
| 44 | R16F = 19, | ||
| 45 | R16UNORM = 20, | ||
| 44 | 46 | ||
| 45 | MaxColorFormat, | 47 | MaxColorFormat, |
| 46 | 48 | ||
| 47 | // DepthStencil formats | 49 | // DepthStencil formats |
| 48 | Z24S8 = 19, | 50 | Z24S8 = 21, |
| 49 | S8Z24 = 20, | 51 | S8Z24 = 22, |
| 50 | Z32F = 21, | 52 | Z32F = 23, |
| 51 | Z16 = 22, | 53 | Z16 = 24, |
| 52 | 54 | ||
| 53 | MaxDepthStencilFormat, | 55 | MaxDepthStencilFormat, |
| 54 | 56 | ||
| @@ -105,6 +107,8 @@ struct SurfaceParams { | |||
| 105 | 1, // RGBA32F | 107 | 1, // RGBA32F |
| 106 | 1, // RG32F | 108 | 1, // RG32F |
| 107 | 1, // R32F | 109 | 1, // R32F |
| 110 | 1, // R16F | ||
| 111 | 1, // R16UNORM | ||
| 108 | 1, // Z24S8 | 112 | 1, // Z24S8 |
| 109 | 1, // S8Z24 | 113 | 1, // S8Z24 |
| 110 | 1, // Z32F | 114 | 1, // Z32F |
| @@ -139,6 +143,8 @@ struct SurfaceParams { | |||
| 139 | 128, // RGBA32F | 143 | 128, // RGBA32F |
| 140 | 64, // RG32F | 144 | 64, // RG32F |
| 141 | 32, // R32F | 145 | 32, // R32F |
| 146 | 16, // R16F | ||
| 147 | 16, // R16UNORM | ||
| 142 | 32, // Z24S8 | 148 | 32, // Z24S8 |
| 143 | 32, // S8Z24 | 149 | 32, // S8Z24 |
| 144 | 32, // Z32F | 150 | 32, // Z32F |
| @@ -226,6 +232,16 @@ struct SurfaceParams { | |||
| 226 | UNREACHABLE(); | 232 | UNREACHABLE(); |
| 227 | case Tegra::Texture::TextureFormat::R32_G32: | 233 | case Tegra::Texture::TextureFormat::R32_G32: |
| 228 | return PixelFormat::RG32F; | 234 | return PixelFormat::RG32F; |
| 235 | case Tegra::Texture::TextureFormat::R16: | ||
| 236 | switch (component_type) { | ||
| 237 | case Tegra::Texture::ComponentType::FLOAT: | ||
| 238 | return PixelFormat::R16F; | ||
| 239 | case Tegra::Texture::ComponentType::UNORM: | ||
| 240 | return PixelFormat::R16UNORM; | ||
| 241 | } | ||
| 242 | LOG_CRITICAL(HW_GPU, "Unimplemented component_type={}", | ||
| 243 | static_cast<u32>(component_type)); | ||
| 244 | UNREACHABLE(); | ||
| 229 | case Tegra::Texture::TextureFormat::R32: | 245 | case Tegra::Texture::TextureFormat::R32: |
| 230 | return PixelFormat::R32F; | 246 | return PixelFormat::R32F; |
| 231 | case Tegra::Texture::TextureFormat::DXT1: | 247 | case Tegra::Texture::TextureFormat::DXT1: |
| @@ -290,6 +306,9 @@ struct SurfaceParams { | |||
| 290 | return Tegra::Texture::TextureFormat::R32_G32; | 306 | return Tegra::Texture::TextureFormat::R32_G32; |
| 291 | case PixelFormat::R32F: | 307 | case PixelFormat::R32F: |
| 292 | return Tegra::Texture::TextureFormat::R32; | 308 | return Tegra::Texture::TextureFormat::R32; |
| 309 | case PixelFormat::R16F: | ||
| 310 | case PixelFormat::R16UNORM: | ||
| 311 | return Tegra::Texture::TextureFormat::R16; | ||
| 293 | default: | 312 | default: |
| 294 | LOG_CRITICAL(HW_GPU, "Unimplemented format={}", static_cast<u32>(format)); | 313 | LOG_CRITICAL(HW_GPU, "Unimplemented format={}", static_cast<u32>(format)); |
| 295 | UNREACHABLE(); | 314 | UNREACHABLE(); |
diff --git a/src/video_core/textures/decoders.cpp b/src/video_core/textures/decoders.cpp index cda2646ad..970c06e71 100644 --- a/src/video_core/textures/decoders.cpp +++ b/src/video_core/textures/decoders.cpp | |||
| @@ -66,6 +66,7 @@ u32 BytesPerPixel(TextureFormat format) { | |||
| 66 | case TextureFormat::A1B5G5R5: | 66 | case TextureFormat::A1B5G5R5: |
| 67 | case TextureFormat::B5G6R5: | 67 | case TextureFormat::B5G6R5: |
| 68 | case TextureFormat::G8R8: | 68 | case TextureFormat::G8R8: |
| 69 | case TextureFormat::R16: | ||
| 69 | return 2; | 70 | return 2; |
| 70 | case TextureFormat::R8: | 71 | case TextureFormat::R8: |
| 71 | return 1; | 72 | return 1; |
| @@ -123,6 +124,7 @@ std::vector<u8> UnswizzleTexture(VAddr address, TextureFormat format, u32 width, | |||
| 123 | case TextureFormat::R32_G32_B32_A32: | 124 | case TextureFormat::R32_G32_B32_A32: |
| 124 | case TextureFormat::R32_G32: | 125 | case TextureFormat::R32_G32: |
| 125 | case TextureFormat::R32: | 126 | case TextureFormat::R32: |
| 127 | case TextureFormat::R16: | ||
| 126 | case TextureFormat::BF10GF11RF11: | 128 | case TextureFormat::BF10GF11RF11: |
| 127 | case TextureFormat::ASTC_2D_4X4: | 129 | case TextureFormat::ASTC_2D_4X4: |
| 128 | CopySwizzledData(width, height, bytes_per_pixel, bytes_per_pixel, data, | 130 | CopySwizzledData(width, height, bytes_per_pixel, bytes_per_pixel, data, |
| @@ -181,6 +183,7 @@ std::vector<u8> DecodeTexture(const std::vector<u8>& texture_data, TextureFormat | |||
| 181 | case TextureFormat::R32_G32_B32_A32: | 183 | case TextureFormat::R32_G32_B32_A32: |
| 182 | case TextureFormat::R32_G32: | 184 | case TextureFormat::R32_G32: |
| 183 | case TextureFormat::R32: | 185 | case TextureFormat::R32: |
| 186 | case TextureFormat::R16: | ||
| 184 | // TODO(Subv): For the time being just forward the same data without any decoding. | 187 | // TODO(Subv): For the time being just forward the same data without any decoding. |
| 185 | rgba_data = texture_data; | 188 | rgba_data = texture_data; |
| 186 | break; | 189 | break; |