diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/CMakeLists.txt | 4 | ||||
| -rw-r--r-- | src/core/hle/service/pctl/module.cpp (renamed from src/core/hle/service/pctl/pctl_a.cpp) | 37 | ||||
| -rw-r--r-- | src/core/hle/service/pctl/module.h | 28 | ||||
| -rw-r--r-- | src/core/hle/service/pctl/pctl.cpp | 11 | ||||
| -rw-r--r-- | src/core/hle/service/pctl/pctl.h | 8 | ||||
| -rw-r--r-- | src/core/hle/service/pctl/pctl_a.h | 20 | ||||
| -rw-r--r-- | src/core/hle/service/service.cpp | 2 | ||||
| -rw-r--r-- | src/core/memory.cpp | 50 | ||||
| -rw-r--r-- | src/video_core/command_processor.cpp | 12 | ||||
| -rw-r--r-- | src/video_core/engines/maxwell_3d.cpp | 4 | ||||
| -rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer.cpp | 6 | ||||
| -rw-r--r-- | src/video_core/renderer_opengl/renderer_opengl.cpp | 10 | ||||
| -rw-r--r-- | src/video_core/video_core.cpp | 6 |
13 files changed, 117 insertions, 81 deletions
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index b3807c204..f4be926e4 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt | |||
| @@ -181,10 +181,10 @@ add_library(core STATIC | |||
| 181 | hle/service/nvflinger/buffer_queue.h | 181 | hle/service/nvflinger/buffer_queue.h |
| 182 | hle/service/nvflinger/nvflinger.cpp | 182 | hle/service/nvflinger/nvflinger.cpp |
| 183 | hle/service/nvflinger/nvflinger.h | 183 | hle/service/nvflinger/nvflinger.h |
| 184 | hle/service/pctl/module.cpp | ||
| 185 | hle/service/pctl/module.h | ||
| 184 | hle/service/pctl/pctl.cpp | 186 | hle/service/pctl/pctl.cpp |
| 185 | hle/service/pctl/pctl.h | 187 | hle/service/pctl/pctl.h |
| 186 | hle/service/pctl/pctl_a.cpp | ||
| 187 | hle/service/pctl/pctl_a.h | ||
| 188 | hle/service/service.cpp | 188 | hle/service/service.cpp |
| 189 | hle/service/service.h | 189 | hle/service/service.h |
| 190 | hle/service/set/set.cpp | 190 | hle/service/set/set.cpp |
diff --git a/src/core/hle/service/pctl/pctl_a.cpp b/src/core/hle/service/pctl/module.cpp index 24a6cf310..dd20d5ae7 100644 --- a/src/core/hle/service/pctl/pctl_a.cpp +++ b/src/core/hle/service/pctl/module.cpp | |||
| @@ -4,7 +4,8 @@ | |||
| 4 | 4 | ||
| 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/pctl/pctl_a.h" | 7 | #include "core/hle/service/pctl/module.h" |
| 8 | #include "core/hle/service/pctl/pctl.h" | ||
| 8 | 9 | ||
| 9 | namespace Service::PCTL { | 10 | namespace Service::PCTL { |
| 10 | 11 | ||
| @@ -12,7 +13,7 @@ class IParentalControlService final : public ServiceFramework<IParentalControlSe | |||
| 12 | public: | 13 | public: |
| 13 | IParentalControlService() : ServiceFramework("IParentalControlService") { | 14 | IParentalControlService() : ServiceFramework("IParentalControlService") { |
| 14 | static const FunctionInfo functions[] = { | 15 | static const FunctionInfo functions[] = { |
| 15 | {1, nullptr, "Initialize"}, | 16 | {1, &IParentalControlService::Initialize, "Initialize"}, |
| 16 | {1001, nullptr, "CheckFreeCommunicationPermission"}, | 17 | {1001, nullptr, "CheckFreeCommunicationPermission"}, |
| 17 | {1002, nullptr, "ConfirmLaunchApplicationPermission"}, | 18 | {1002, nullptr, "ConfirmLaunchApplicationPermission"}, |
| 18 | {1003, nullptr, "ConfirmResumeApplicationPermission"}, | 19 | {1003, nullptr, "ConfirmResumeApplicationPermission"}, |
| @@ -108,20 +109,38 @@ public: | |||
| 108 | }; | 109 | }; |
| 109 | RegisterHandlers(functions); | 110 | RegisterHandlers(functions); |
| 110 | } | 111 | } |
| 112 | |||
| 113 | private: | ||
| 114 | void Initialize(Kernel::HLERequestContext& ctx) { | ||
| 115 | NGLOG_WARNING(Service_PCTL, "(STUBBED) called"); | ||
| 116 | IPC::ResponseBuilder rb{ctx, 2, 0, 0}; | ||
| 117 | rb.Push(RESULT_SUCCESS); | ||
| 118 | } | ||
| 111 | }; | 119 | }; |
| 112 | void PCTL_A::CreateService(Kernel::HLERequestContext& ctx) { | 120 | |
| 121 | void Module::Interface::CreateService(Kernel::HLERequestContext& ctx) { | ||
| 122 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | ||
| 123 | rb.Push(RESULT_SUCCESS); | ||
| 124 | rb.PushIpcInterface<IParentalControlService>(); | ||
| 125 | NGLOG_DEBUG(Service_PCTL, "called"); | ||
| 126 | } | ||
| 127 | |||
| 128 | void Module::Interface::CreateServiceWithoutInitialize(Kernel::HLERequestContext& ctx) { | ||
| 113 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 129 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 114 | rb.Push(RESULT_SUCCESS); | 130 | rb.Push(RESULT_SUCCESS); |
| 115 | rb.PushIpcInterface<IParentalControlService>(); | 131 | rb.PushIpcInterface<IParentalControlService>(); |
| 116 | NGLOG_DEBUG(Service_PCTL, "called"); | 132 | NGLOG_DEBUG(Service_PCTL, "called"); |
| 117 | } | 133 | } |
| 118 | 134 | ||
| 119 | PCTL_A::PCTL_A() : ServiceFramework("pctl:a") { | 135 | Module::Interface::Interface(std::shared_ptr<Module> module, const char* name) |
| 120 | static const FunctionInfo functions[] = { | 136 | : ServiceFramework(name), module(std::move(module)) {} |
| 121 | {0, &PCTL_A::CreateService, "CreateService"}, | 137 | |
| 122 | {1, nullptr, "CreateServiceWithoutInitialize"}, | 138 | void InstallInterfaces(SM::ServiceManager& service_manager) { |
| 123 | }; | 139 | auto module = std::make_shared<Module>(); |
| 124 | RegisterHandlers(functions); | 140 | std::make_shared<PCTL>(module, "pctl")->InstallAsService(service_manager); |
| 141 | std::make_shared<PCTL>(module, "pctl:a")->InstallAsService(service_manager); | ||
| 142 | std::make_shared<PCTL>(module, "pctl:r")->InstallAsService(service_manager); | ||
| 143 | std::make_shared<PCTL>(module, "pctl:s")->InstallAsService(service_manager); | ||
| 125 | } | 144 | } |
| 126 | 145 | ||
| 127 | } // namespace Service::PCTL | 146 | } // namespace Service::PCTL |
diff --git a/src/core/hle/service/pctl/module.h b/src/core/hle/service/pctl/module.h new file mode 100644 index 000000000..68da628a8 --- /dev/null +++ b/src/core/hle/service/pctl/module.h | |||
| @@ -0,0 +1,28 @@ | |||
| 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/service.h" | ||
| 8 | |||
| 9 | namespace Service::PCTL { | ||
| 10 | |||
| 11 | class Module final { | ||
| 12 | public: | ||
| 13 | class Interface : public ServiceFramework<Interface> { | ||
| 14 | public: | ||
| 15 | Interface(std::shared_ptr<Module> module, const char* name); | ||
| 16 | |||
| 17 | void CreateService(Kernel::HLERequestContext& ctx); | ||
| 18 | void CreateServiceWithoutInitialize(Kernel::HLERequestContext& ctx); | ||
| 19 | |||
| 20 | protected: | ||
| 21 | std::shared_ptr<Module> module; | ||
| 22 | }; | ||
| 23 | }; | ||
| 24 | |||
| 25 | /// Registers all PCTL services with the specified service manager. | ||
| 26 | void InstallInterfaces(SM::ServiceManager& service_manager); | ||
| 27 | |||
| 28 | } // namespace Service::PCTL | ||
diff --git a/src/core/hle/service/pctl/pctl.cpp b/src/core/hle/service/pctl/pctl.cpp index 6ee81866d..de2741d66 100644 --- a/src/core/hle/service/pctl/pctl.cpp +++ b/src/core/hle/service/pctl/pctl.cpp | |||
| @@ -3,12 +3,15 @@ | |||
| 3 | // Refer to the license.txt file included. | 3 | // Refer to the license.txt file included. |
| 4 | 4 | ||
| 5 | #include "core/hle/service/pctl/pctl.h" | 5 | #include "core/hle/service/pctl/pctl.h" |
| 6 | #include "core/hle/service/pctl/pctl_a.h" | ||
| 7 | 6 | ||
| 8 | namespace Service::PCTL { | 7 | namespace Service::PCTL { |
| 9 | 8 | ||
| 10 | void InstallInterfaces(SM::ServiceManager& service_manager) { | 9 | PCTL::PCTL(std::shared_ptr<Module> module, const char* name) |
| 11 | std::make_shared<PCTL_A>()->InstallAsService(service_manager); | 10 | : Module::Interface(std::move(module), name) { |
| 11 | static const FunctionInfo functions[] = { | ||
| 12 | {0, &PCTL::CreateService, "CreateService"}, | ||
| 13 | {1, &PCTL::CreateServiceWithoutInitialize, "CreateServiceWithoutInitialize"}, | ||
| 14 | }; | ||
| 15 | RegisterHandlers(functions); | ||
| 12 | } | 16 | } |
| 13 | |||
| 14 | } // namespace Service::PCTL | 17 | } // namespace Service::PCTL |
diff --git a/src/core/hle/service/pctl/pctl.h b/src/core/hle/service/pctl/pctl.h index f0a84b115..8ddf69128 100644 --- a/src/core/hle/service/pctl/pctl.h +++ b/src/core/hle/service/pctl/pctl.h | |||
| @@ -4,11 +4,13 @@ | |||
| 4 | 4 | ||
| 5 | #pragma once | 5 | #pragma once |
| 6 | 6 | ||
| 7 | #include "core/hle/service/service.h" | 7 | #include "core/hle/service/pctl/module.h" |
| 8 | 8 | ||
| 9 | namespace Service::PCTL { | 9 | namespace Service::PCTL { |
| 10 | 10 | ||
| 11 | /// Registers all PCTL services with the specified service manager. | 11 | class PCTL final : public Module::Interface { |
| 12 | void InstallInterfaces(SM::ServiceManager& service_manager); | 12 | public: |
| 13 | explicit PCTL(std::shared_ptr<Module> module, const char* name); | ||
| 14 | }; | ||
| 13 | 15 | ||
| 14 | } // namespace Service::PCTL | 16 | } // namespace Service::PCTL |
diff --git a/src/core/hle/service/pctl/pctl_a.h b/src/core/hle/service/pctl/pctl_a.h deleted file mode 100644 index 09ed82e1b..000000000 --- a/src/core/hle/service/pctl/pctl_a.h +++ /dev/null | |||
| @@ -1,20 +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/service.h" | ||
| 8 | |||
| 9 | namespace Service::PCTL { | ||
| 10 | |||
| 11 | class PCTL_A final : public ServiceFramework<PCTL_A> { | ||
| 12 | public: | ||
| 13 | PCTL_A(); | ||
| 14 | ~PCTL_A() = default; | ||
| 15 | |||
| 16 | private: | ||
| 17 | void CreateService(Kernel::HLERequestContext& ctx); | ||
| 18 | }; | ||
| 19 | |||
| 20 | } // namespace Service::PCTL | ||
diff --git a/src/core/hle/service/service.cpp b/src/core/hle/service/service.cpp index 5817819fe..a85c406be 100644 --- a/src/core/hle/service/service.cpp +++ b/src/core/hle/service/service.cpp | |||
| @@ -29,7 +29,7 @@ | |||
| 29 | #include "core/hle/service/nifm/nifm.h" | 29 | #include "core/hle/service/nifm/nifm.h" |
| 30 | #include "core/hle/service/ns/ns.h" | 30 | #include "core/hle/service/ns/ns.h" |
| 31 | #include "core/hle/service/nvdrv/nvdrv.h" | 31 | #include "core/hle/service/nvdrv/nvdrv.h" |
| 32 | #include "core/hle/service/pctl/pctl.h" | 32 | #include "core/hle/service/pctl/module.h" |
| 33 | #include "core/hle/service/service.h" | 33 | #include "core/hle/service/service.h" |
| 34 | #include "core/hle/service/set/settings.h" | 34 | #include "core/hle/service/set/settings.h" |
| 35 | #include "core/hle/service/sm/controller.h" | 35 | #include "core/hle/service/sm/controller.h" |
diff --git a/src/core/memory.cpp b/src/core/memory.cpp index ff0420c56..d7c0080fa 100644 --- a/src/core/memory.cpp +++ b/src/core/memory.cpp | |||
| @@ -39,8 +39,8 @@ PageTable* GetCurrentPageTable() { | |||
| 39 | } | 39 | } |
| 40 | 40 | ||
| 41 | static void MapPages(PageTable& page_table, VAddr base, u64 size, u8* memory, PageType type) { | 41 | static void MapPages(PageTable& page_table, VAddr base, u64 size, u8* memory, PageType type) { |
| 42 | LOG_DEBUG(HW_Memory, "Mapping %p onto %016" PRIX64 "-%016" PRIX64, memory, base * PAGE_SIZE, | 42 | NGLOG_DEBUG(HW_Memory, "Mapping {} onto {:016X}-{:016X}", fmt::ptr(memory), base * PAGE_SIZE, |
| 43 | (base + size) * PAGE_SIZE); | 43 | (base + size) * PAGE_SIZE); |
| 44 | 44 | ||
| 45 | RasterizerFlushVirtualRegion(base << PAGE_BITS, size * PAGE_SIZE, | 45 | RasterizerFlushVirtualRegion(base << PAGE_BITS, size * PAGE_SIZE, |
| 46 | FlushMode::FlushAndInvalidate); | 46 | FlushMode::FlushAndInvalidate); |
| @@ -169,10 +169,10 @@ T Read(const VAddr vaddr) { | |||
| 169 | PageType type = current_page_table->attributes[vaddr >> PAGE_BITS]; | 169 | PageType type = current_page_table->attributes[vaddr >> PAGE_BITS]; |
| 170 | switch (type) { | 170 | switch (type) { |
| 171 | case PageType::Unmapped: | 171 | case PageType::Unmapped: |
| 172 | LOG_ERROR(HW_Memory, "unmapped Read%lu @ 0x%08X", sizeof(T) * 8, vaddr); | 172 | NGLOG_ERROR(HW_Memory, "Unmapped Read{} @ {:#010X}", sizeof(T) * 8, vaddr); |
| 173 | return 0; | 173 | return 0; |
| 174 | case PageType::Memory: | 174 | case PageType::Memory: |
| 175 | ASSERT_MSG(false, "Mapped memory page without a pointer @ %08X", vaddr); | 175 | ASSERT_MSG(false, "Mapped memory page without a pointer @ %016" PRIX64, vaddr); |
| 176 | break; | 176 | break; |
| 177 | case PageType::RasterizerCachedMemory: { | 177 | case PageType::RasterizerCachedMemory: { |
| 178 | RasterizerFlushVirtualRegion(vaddr, sizeof(T), FlushMode::Flush); | 178 | RasterizerFlushVirtualRegion(vaddr, sizeof(T), FlushMode::Flush); |
| @@ -201,11 +201,11 @@ void Write(const VAddr vaddr, const T data) { | |||
| 201 | PageType type = current_page_table->attributes[vaddr >> PAGE_BITS]; | 201 | PageType type = current_page_table->attributes[vaddr >> PAGE_BITS]; |
| 202 | switch (type) { | 202 | switch (type) { |
| 203 | case PageType::Unmapped: | 203 | case PageType::Unmapped: |
| 204 | LOG_ERROR(HW_Memory, "unmapped Write%lu 0x%08X @ 0x%08X", sizeof(data) * 8, (u32)data, | 204 | NGLOG_ERROR(HW_Memory, "Unmapped Write{} {:#010X} @ {:#018X}", sizeof(data) * 8, (u32)data, |
| 205 | vaddr); | 205 | vaddr); |
| 206 | return; | 206 | return; |
| 207 | case PageType::Memory: | 207 | case PageType::Memory: |
| 208 | ASSERT_MSG(false, "Mapped memory page without a pointer @ %08X", vaddr); | 208 | ASSERT_MSG(false, "Mapped memory page without a pointer @ %016" PRIX64, vaddr); |
| 209 | break; | 209 | break; |
| 210 | case PageType::RasterizerCachedMemory: { | 210 | case PageType::RasterizerCachedMemory: { |
| 211 | RasterizerFlushVirtualRegion(vaddr, sizeof(T), FlushMode::Invalidate); | 211 | RasterizerFlushVirtualRegion(vaddr, sizeof(T), FlushMode::Invalidate); |
| @@ -251,7 +251,7 @@ u8* GetPointer(const VAddr vaddr) { | |||
| 251 | return GetPointerFromVMA(vaddr); | 251 | return GetPointerFromVMA(vaddr); |
| 252 | } | 252 | } |
| 253 | 253 | ||
| 254 | LOG_ERROR(HW_Memory, "unknown GetPointer @ 0x%08x", vaddr); | 254 | NGLOG_ERROR(HW_Memory, "Unknown GetPointer @ {:#018X}", vaddr); |
| 255 | return nullptr; | 255 | return nullptr; |
| 256 | } | 256 | } |
| 257 | 257 | ||
| @@ -288,13 +288,12 @@ u8* GetPhysicalPointer(PAddr address) { | |||
| 288 | }); | 288 | }); |
| 289 | 289 | ||
| 290 | if (area == std::end(memory_areas)) { | 290 | if (area == std::end(memory_areas)) { |
| 291 | LOG_ERROR(HW_Memory, "unknown GetPhysicalPointer @ 0x%016" PRIX64, address); | 291 | NGLOG_ERROR(HW_Memory, "Unknown GetPhysicalPointer @ {:#018X}", address); |
| 292 | return nullptr; | 292 | return nullptr; |
| 293 | } | 293 | } |
| 294 | 294 | ||
| 295 | if (area->paddr_base == IO_AREA_PADDR) { | 295 | if (area->paddr_base == IO_AREA_PADDR) { |
| 296 | LOG_ERROR(HW_Memory, "MMIO mappings are not supported yet. phys_addr=0x%016" PRIX64, | 296 | NGLOG_ERROR(HW_Memory, "MMIO mappings are not supported yet. phys_addr={:018X}", address); |
| 297 | address); | ||
| 298 | return nullptr; | 297 | return nullptr; |
| 299 | } | 298 | } |
| 300 | 299 | ||
| @@ -341,9 +340,9 @@ void RasterizerMarkRegionCached(Tegra::GPUVAddr gpu_addr, u64 size, bool cached) | |||
| 341 | Core::System::GetInstance().GPU().memory_manager->GpuToCpuAddress(gpu_addr); | 340 | Core::System::GetInstance().GPU().memory_manager->GpuToCpuAddress(gpu_addr); |
| 342 | // The GPU <-> CPU virtual memory mapping is not 1:1 | 341 | // The GPU <-> CPU virtual memory mapping is not 1:1 |
| 343 | if (!maybe_vaddr) { | 342 | if (!maybe_vaddr) { |
| 344 | LOG_ERROR(HW_Memory, | 343 | NGLOG_ERROR(HW_Memory, |
| 345 | "Trying to flush a cached region to an invalid physical address %08X", | 344 | "Trying to flush a cached region to an invalid physical address {:016X}", |
| 346 | gpu_addr); | 345 | gpu_addr); |
| 347 | continue; | 346 | continue; |
| 348 | } | 347 | } |
| 349 | VAddr vaddr = *maybe_vaddr; | 348 | VAddr vaddr = *maybe_vaddr; |
| @@ -477,8 +476,9 @@ void ReadBlock(const Kernel::Process& process, const VAddr src_addr, void* dest_ | |||
| 477 | 476 | ||
| 478 | switch (page_table.attributes[page_index]) { | 477 | switch (page_table.attributes[page_index]) { |
| 479 | case PageType::Unmapped: { | 478 | case PageType::Unmapped: { |
| 480 | LOG_ERROR(HW_Memory, "unmapped ReadBlock @ 0x%08X (start address = 0x%08X, size = %zu)", | 479 | NGLOG_ERROR(HW_Memory, |
| 481 | current_vaddr, src_addr, size); | 480 | "Unmapped ReadBlock @ {:#018X} (start address = {:#018X}, size = {})", |
| 481 | current_vaddr, src_addr, size); | ||
| 482 | std::memset(dest_buffer, 0, copy_amount); | 482 | std::memset(dest_buffer, 0, copy_amount); |
| 483 | break; | 483 | break; |
| 484 | } | 484 | } |
| @@ -540,9 +540,9 @@ void WriteBlock(const Kernel::Process& process, const VAddr dest_addr, const voi | |||
| 540 | 540 | ||
| 541 | switch (page_table.attributes[page_index]) { | 541 | switch (page_table.attributes[page_index]) { |
| 542 | case PageType::Unmapped: { | 542 | case PageType::Unmapped: { |
| 543 | LOG_ERROR(HW_Memory, | 543 | NGLOG_ERROR(HW_Memory, |
| 544 | "unmapped WriteBlock @ 0x%08X (start address = 0x%08X, size = %zu)", | 544 | "Unmapped WriteBlock @ {:#018X} (start address = {:#018X}, size = {})", |
| 545 | current_vaddr, dest_addr, size); | 545 | current_vaddr, dest_addr, size); |
| 546 | break; | 546 | break; |
| 547 | } | 547 | } |
| 548 | case PageType::Memory: { | 548 | case PageType::Memory: { |
| @@ -588,8 +588,9 @@ void ZeroBlock(const Kernel::Process& process, const VAddr dest_addr, const size | |||
| 588 | 588 | ||
| 589 | switch (page_table.attributes[page_index]) { | 589 | switch (page_table.attributes[page_index]) { |
| 590 | case PageType::Unmapped: { | 590 | case PageType::Unmapped: { |
| 591 | LOG_ERROR(HW_Memory, "unmapped ZeroBlock @ 0x%08X (start address = 0x%08X, size = %zu)", | 591 | NGLOG_ERROR(HW_Memory, |
| 592 | current_vaddr, dest_addr, size); | 592 | "Unmapped ZeroBlock @ {:#018X} (start address = {#:018X}, size = {})", |
| 593 | current_vaddr, dest_addr, size); | ||
| 593 | break; | 594 | break; |
| 594 | } | 595 | } |
| 595 | case PageType::Memory: { | 596 | case PageType::Memory: { |
| @@ -628,8 +629,9 @@ void CopyBlock(const Kernel::Process& process, VAddr dest_addr, VAddr src_addr, | |||
| 628 | 629 | ||
| 629 | switch (page_table.attributes[page_index]) { | 630 | switch (page_table.attributes[page_index]) { |
| 630 | case PageType::Unmapped: { | 631 | case PageType::Unmapped: { |
| 631 | LOG_ERROR(HW_Memory, "unmapped CopyBlock @ 0x%08X (start address = 0x%08X, size = %zu)", | 632 | NGLOG_ERROR(HW_Memory, |
| 632 | current_vaddr, src_addr, size); | 633 | "Unmapped CopyBlock @ {:#018X} (start address = {:#018X}, size = {})", |
| 634 | current_vaddr, src_addr, size); | ||
| 633 | ZeroBlock(process, dest_addr, copy_amount); | 635 | ZeroBlock(process, dest_addr, copy_amount); |
| 634 | break; | 636 | break; |
| 635 | } | 637 | } |
| @@ -678,7 +680,7 @@ boost::optional<PAddr> TryVirtualToPhysicalAddress(const VAddr addr) { | |||
| 678 | PAddr VirtualToPhysicalAddress(const VAddr addr) { | 680 | PAddr VirtualToPhysicalAddress(const VAddr addr) { |
| 679 | auto paddr = TryVirtualToPhysicalAddress(addr); | 681 | auto paddr = TryVirtualToPhysicalAddress(addr); |
| 680 | if (!paddr) { | 682 | if (!paddr) { |
| 681 | LOG_ERROR(HW_Memory, "Unknown virtual address @ 0x%016" PRIX64, addr); | 683 | NGLOG_ERROR(HW_Memory, "Unknown virtual address @ {:#018X}", addr); |
| 682 | // To help with debugging, set bit on address so that it's obviously invalid. | 684 | // To help with debugging, set bit on address so that it's obviously invalid. |
| 683 | return addr | 0x80000000; | 685 | return addr | 0x80000000; |
| 684 | } | 686 | } |
diff --git a/src/video_core/command_processor.cpp b/src/video_core/command_processor.cpp index 2c04daba3..f6a88f031 100644 --- a/src/video_core/command_processor.cpp +++ b/src/video_core/command_processor.cpp | |||
| @@ -31,12 +31,14 @@ enum class BufferMethods { | |||
| 31 | }; | 31 | }; |
| 32 | 32 | ||
| 33 | void GPU::WriteReg(u32 method, u32 subchannel, u32 value, u32 remaining_params) { | 33 | void GPU::WriteReg(u32 method, u32 subchannel, u32 value, u32 remaining_params) { |
| 34 | LOG_WARNING(HW_GPU, "Processing method %08X on subchannel %u value %08X remaining params %u", | 34 | NGLOG_WARNING(HW_GPU, |
| 35 | method, subchannel, value, remaining_params); | 35 | "Processing method {:08X} on subchannel {} value " |
| 36 | "{:08X} remaining params {}", | ||
| 37 | method, subchannel, value, remaining_params); | ||
| 36 | 38 | ||
| 37 | if (method == static_cast<u32>(BufferMethods::SetGraphMacroEntry)) { | 39 | if (method == static_cast<u32>(BufferMethods::SetGraphMacroEntry)) { |
| 38 | // Prepare to upload a new macro, reset the upload counter. | 40 | // Prepare to upload a new macro, reset the upload counter. |
| 39 | LOG_DEBUG(HW_GPU, "Uploading GPU macro %08X", value); | 41 | NGLOG_DEBUG(HW_GPU, "Uploading GPU macro {:08X}", value); |
| 40 | current_macro_entry = value; | 42 | current_macro_entry = value; |
| 41 | current_macro_code.clear(); | 43 | current_macro_code.clear(); |
| 42 | return; | 44 | return; |
| @@ -58,7 +60,7 @@ void GPU::WriteReg(u32 method, u32 subchannel, u32 value, u32 remaining_params) | |||
| 58 | 60 | ||
| 59 | if (method == static_cast<u32>(BufferMethods::BindObject)) { | 61 | if (method == static_cast<u32>(BufferMethods::BindObject)) { |
| 60 | // Bind the current subchannel to the desired engine id. | 62 | // Bind the current subchannel to the desired engine id. |
| 61 | LOG_DEBUG(HW_GPU, "Binding subchannel %u to engine %u", subchannel, value); | 63 | NGLOG_DEBUG(HW_GPU, "Binding subchannel {} to engine {}", subchannel, value); |
| 62 | ASSERT(bound_engines.find(subchannel) == bound_engines.end()); | 64 | ASSERT(bound_engines.find(subchannel) == bound_engines.end()); |
| 63 | bound_engines[subchannel] = static_cast<EngineID>(value); | 65 | bound_engines[subchannel] = static_cast<EngineID>(value); |
| 64 | return; | 66 | return; |
| @@ -66,7 +68,7 @@ void GPU::WriteReg(u32 method, u32 subchannel, u32 value, u32 remaining_params) | |||
| 66 | 68 | ||
| 67 | if (method < static_cast<u32>(BufferMethods::CountBufferMethods)) { | 69 | if (method < static_cast<u32>(BufferMethods::CountBufferMethods)) { |
| 68 | // TODO(Subv): Research and implement these methods. | 70 | // TODO(Subv): Research and implement these methods. |
| 69 | LOG_ERROR(HW_GPU, "Special buffer methods other than Bind are not implemented"); | 71 | NGLOG_ERROR(HW_GPU, "Special buffer methods other than Bind are not implemented"); |
| 70 | return; | 72 | return; |
| 71 | } | 73 | } |
| 72 | 74 | ||
diff --git a/src/video_core/engines/maxwell_3d.cpp b/src/video_core/engines/maxwell_3d.cpp index 4e9aed380..2acbb9cd6 100644 --- a/src/video_core/engines/maxwell_3d.cpp +++ b/src/video_core/engines/maxwell_3d.cpp | |||
| @@ -186,8 +186,8 @@ void Maxwell3D::ProcessQueryGet() { | |||
| 186 | } | 186 | } |
| 187 | 187 | ||
| 188 | void Maxwell3D::DrawArrays() { | 188 | void Maxwell3D::DrawArrays() { |
| 189 | LOG_DEBUG(HW_GPU, "called, topology=%d, count=%d", regs.draw.topology.Value(), | 189 | NGLOG_DEBUG(HW_GPU, "called, topology={}, count={}", |
| 190 | regs.vertex_buffer.count); | 190 | static_cast<u32>(regs.draw.topology.Value()), regs.vertex_buffer.count); |
| 191 | ASSERT_MSG(!(regs.index_array.count && regs.vertex_buffer.count), "Both indexed and direct?"); | 191 | ASSERT_MSG(!(regs.index_array.count && regs.vertex_buffer.count), "Both indexed and direct?"); |
| 192 | 192 | ||
| 193 | auto debug_context = Core::System::GetInstance().GetGPUDebugContext(); | 193 | auto debug_context = Core::System::GetInstance().GetGPUDebugContext(); |
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp index b457b1fbe..9b3542e10 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp | |||
| @@ -116,7 +116,7 @@ RasterizerOpenGL::RasterizerOpenGL() { | |||
| 116 | 116 | ||
| 117 | glEnable(GL_BLEND); | 117 | glEnable(GL_BLEND); |
| 118 | 118 | ||
| 119 | LOG_CRITICAL(Render_OpenGL, "Sync fixed function OpenGL state here!"); | 119 | NGLOG_CRITICAL(Render_OpenGL, "Sync fixed function OpenGL state here!"); |
| 120 | } | 120 | } |
| 121 | 121 | ||
| 122 | RasterizerOpenGL::~RasterizerOpenGL() { | 122 | RasterizerOpenGL::~RasterizerOpenGL() { |
| @@ -252,8 +252,8 @@ void RasterizerOpenGL::SetupShaders(u8* buffer_ptr, GLintptr buffer_offset) { | |||
| 252 | break; | 252 | break; |
| 253 | } | 253 | } |
| 254 | default: | 254 | default: |
| 255 | LOG_CRITICAL(HW_GPU, "Unimplemented shader index=%d, enable=%d, offset=0x%08X", index, | 255 | NGLOG_CRITICAL(HW_GPU, "Unimplemented shader index={}, enable={}, offset={:#010X}", |
| 256 | shader_config.enable.Value(), shader_config.offset); | 256 | index, shader_config.enable.Value(), shader_config.offset); |
| 257 | UNREACHABLE(); | 257 | UNREACHABLE(); |
| 258 | } | 258 | } |
| 259 | 259 | ||
diff --git a/src/video_core/renderer_opengl/renderer_opengl.cpp b/src/video_core/renderer_opengl/renderer_opengl.cpp index 5ca9821b7..77d1692f4 100644 --- a/src/video_core/renderer_opengl/renderer_opengl.cpp +++ b/src/video_core/renderer_opengl/renderer_opengl.cpp | |||
| @@ -302,8 +302,8 @@ void RendererOpenGL::DrawScreenTriangles(const ScreenInfo& screen_info, float x, | |||
| 302 | right = texcoords.left; | 302 | right = texcoords.left; |
| 303 | } else { | 303 | } else { |
| 304 | // Other transformations are unsupported | 304 | // Other transformations are unsupported |
| 305 | LOG_CRITICAL(Render_OpenGL, "Unsupported framebuffer_transform_flags=%d", | 305 | NGLOG_CRITICAL(Render_OpenGL, "Unsupported framebuffer_transform_flags={}", |
| 306 | framebuffer_transform_flags); | 306 | static_cast<u32>(framebuffer_transform_flags)); |
| 307 | UNIMPLEMENTED(); | 307 | UNIMPLEMENTED(); |
| 308 | } | 308 | } |
| 309 | } | 309 | } |
| @@ -428,9 +428,9 @@ bool RendererOpenGL::Init() { | |||
| 428 | const char* gpu_vendor{reinterpret_cast<char const*>(glGetString(GL_VENDOR))}; | 428 | const char* gpu_vendor{reinterpret_cast<char const*>(glGetString(GL_VENDOR))}; |
| 429 | const char* gpu_model{reinterpret_cast<char const*>(glGetString(GL_RENDERER))}; | 429 | const char* gpu_model{reinterpret_cast<char const*>(glGetString(GL_RENDERER))}; |
| 430 | 430 | ||
| 431 | LOG_INFO(Render_OpenGL, "GL_VERSION: %s", gl_version); | 431 | NGLOG_INFO(Render_OpenGL, "GL_VERSION: {}", gl_version); |
| 432 | LOG_INFO(Render_OpenGL, "GL_VENDOR: %s", gpu_vendor); | 432 | NGLOG_INFO(Render_OpenGL, "GL_VENDOR: {}", gpu_vendor); |
| 433 | LOG_INFO(Render_OpenGL, "GL_RENDERER: %s", gpu_model); | 433 | NGLOG_INFO(Render_OpenGL, "GL_RENDERER: {}", gpu_model); |
| 434 | 434 | ||
| 435 | Core::Telemetry().AddField(Telemetry::FieldType::UserSystem, "GPU_Vendor", gpu_vendor); | 435 | Core::Telemetry().AddField(Telemetry::FieldType::UserSystem, "GPU_Vendor", gpu_vendor); |
| 436 | Core::Telemetry().AddField(Telemetry::FieldType::UserSystem, "GPU_Model", gpu_model); | 436 | Core::Telemetry().AddField(Telemetry::FieldType::UserSystem, "GPU_Model", gpu_model); |
diff --git a/src/video_core/video_core.cpp b/src/video_core/video_core.cpp index 289140f31..89dc8ed1e 100644 --- a/src/video_core/video_core.cpp +++ b/src/video_core/video_core.cpp | |||
| @@ -24,9 +24,9 @@ bool Init(EmuWindow* emu_window) { | |||
| 24 | g_renderer = std::make_unique<RendererOpenGL>(); | 24 | g_renderer = std::make_unique<RendererOpenGL>(); |
| 25 | g_renderer->SetWindow(g_emu_window); | 25 | g_renderer->SetWindow(g_emu_window); |
| 26 | if (g_renderer->Init()) { | 26 | if (g_renderer->Init()) { |
| 27 | LOG_DEBUG(Render, "initialized OK"); | 27 | NGLOG_DEBUG(Render, "initialized OK"); |
| 28 | } else { | 28 | } else { |
| 29 | LOG_CRITICAL(Render, "initialization failed !"); | 29 | NGLOG_CRITICAL(Render, "initialization failed !"); |
| 30 | return false; | 30 | return false; |
| 31 | } | 31 | } |
| 32 | return true; | 32 | return true; |
| @@ -36,7 +36,7 @@ bool Init(EmuWindow* emu_window) { | |||
| 36 | void Shutdown() { | 36 | void Shutdown() { |
| 37 | g_renderer.reset(); | 37 | g_renderer.reset(); |
| 38 | 38 | ||
| 39 | LOG_DEBUG(Render, "shutdown OK"); | 39 | NGLOG_DEBUG(Render, "shutdown OK"); |
| 40 | } | 40 | } |
| 41 | 41 | ||
| 42 | } // namespace VideoCore | 42 | } // namespace VideoCore |