summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorLiam <byteslice@airmail.cc>2022-08-20 03:58:25 +0200
committerFernando Sahmkow <fsahmkow27@gmail.com>2022-10-06 21:00:54 +0200
commitc80ed6d81fef5858508ac4b841defe8ee3a8663d (patch)
tree3f2a193176de0b7e6dff6cefc47172aaf3d6c34e /src/core
parentnvdisp: End system frame after requesting to swap buffers (diff)
downloadyuzu-c80ed6d81fef5858508ac4b841defe8ee3a8663d.tar
yuzu-c80ed6d81fef5858508ac4b841defe8ee3a8663d.tar.gz
yuzu-c80ed6d81fef5858508ac4b841defe8ee3a8663d.tar.bz2
yuzu-c80ed6d81fef5858508ac4b841defe8ee3a8663d.tar.lz
yuzu-c80ed6d81fef5858508ac4b841defe8ee3a8663d.tar.xz
yuzu-c80ed6d81fef5858508ac4b841defe8ee3a8663d.tar.zst
yuzu-c80ed6d81fef5858508ac4b841defe8ee3a8663d.zip
Diffstat (limited to 'src/core')
-rw-r--r--src/core/hle/service/nvdrv/core/syncpoint_manager.cpp14
-rw-r--r--src/core/hle/service/nvdrv/devices/nvhost_as_gpu.cpp10
2 files changed, 12 insertions, 12 deletions
diff --git a/src/core/hle/service/nvdrv/core/syncpoint_manager.cpp b/src/core/hle/service/nvdrv/core/syncpoint_manager.cpp
index 0bb2aec97..072b3a22f 100644
--- a/src/core/hle/service/nvdrv/core/syncpoint_manager.cpp
+++ b/src/core/hle/service/nvdrv/core/syncpoint_manager.cpp
@@ -29,7 +29,7 @@ SyncpointManager::~SyncpointManager() = default;
u32 SyncpointManager::ReserveSyncpoint(u32 id, bool clientManaged) {
if (syncpoints.at(id).reserved) {
- UNREACHABLE_MSG("Requested syncpoint is in use");
+ ASSERT_MSG(false, "Requested syncpoint is in use");
return 0;
}
@@ -45,7 +45,7 @@ u32 SyncpointManager::FindFreeSyncpoint() {
return i;
}
}
- UNREACHABLE_MSG("Failed to find a free syncpoint!");
+ ASSERT_MSG(false, "Failed to find a free syncpoint!");
return 0;
}
@@ -68,7 +68,7 @@ bool SyncpointManager::HasSyncpointExpired(u32 id, u32 threshold) {
const SyncpointInfo& syncpoint{syncpoints.at(id)};
if (!syncpoint.reserved) {
- UNREACHABLE();
+ ASSERT(false);
return 0;
}
@@ -83,7 +83,7 @@ bool SyncpointManager::HasSyncpointExpired(u32 id, u32 threshold) {
u32 SyncpointManager::IncrementSyncpointMaxExt(u32 id, u32 amount) {
if (!syncpoints.at(id).reserved) {
- UNREACHABLE();
+ ASSERT(false);
return 0;
}
@@ -92,7 +92,7 @@ u32 SyncpointManager::IncrementSyncpointMaxExt(u32 id, u32 amount) {
u32 SyncpointManager::ReadSyncpointMinValue(u32 id) {
if (!syncpoints.at(id).reserved) {
- UNREACHABLE();
+ ASSERT(false);
return 0;
}
@@ -101,7 +101,7 @@ u32 SyncpointManager::ReadSyncpointMinValue(u32 id) {
u32 SyncpointManager::UpdateMin(u32 id) {
if (!syncpoints.at(id).reserved) {
- UNREACHABLE();
+ ASSERT(false);
return 0;
}
@@ -111,7 +111,7 @@ u32 SyncpointManager::UpdateMin(u32 id) {
NvFence SyncpointManager::GetSyncpointFence(u32 id) {
if (!syncpoints.at(id).reserved) {
- UNREACHABLE();
+ ASSERT(false);
return NvFence{};
}
diff --git a/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.cpp b/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.cpp
index 7a95f5305..192503ffc 100644
--- a/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.cpp
+++ b/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.cpp
@@ -96,7 +96,7 @@ NvResult nvhost_as_gpu::AllocAsEx(const std::vector<u8>& input, std::vector<u8>&
std::scoped_lock lock(mutex);
if (vm.initialised) {
- UNREACHABLE_MSG("Cannot initialise an address space twice!");
+ ASSERT_MSG(false, "Cannot initialise an address space twice!");
return NvResult::InvalidState;
}
@@ -174,7 +174,7 @@ NvResult nvhost_as_gpu::AllocateSpace(const std::vector<u8>& input, std::vector<
} else {
params.offset = static_cast<u64>(allocator.Allocate(params.pages)) << page_size_bits;
if (!params.offset) {
- UNREACHABLE_MSG("Failed to allocate free space in the GPU AS!");
+ ASSERT_MSG(false, "Failed to allocate free space in the GPU AS!");
return NvResult::InsufficientMemory;
}
}
@@ -372,7 +372,7 @@ NvResult nvhost_as_gpu::MapBufferEx(const std::vector<u8>& input, std::vector<u8
else if (Common::IsAligned(handle->align, VM::YUZU_PAGESIZE))
return false;
else {
- UNREACHABLE();
+ ASSERT(false);
return false;
}
}()};
@@ -382,7 +382,7 @@ NvResult nvhost_as_gpu::MapBufferEx(const std::vector<u8>& input, std::vector<u8
if (alloc-- == allocation_map.begin() ||
(params.offset - alloc->first) + size > alloc->second.size) {
- UNREACHABLE_MSG("Cannot perform a fixed mapping into an unallocated region!");
+ ASSERT_MSG(false, "Cannot perform a fixed mapping into an unallocated region!");
return NvResult::BadValue;
}
@@ -403,7 +403,7 @@ NvResult nvhost_as_gpu::MapBufferEx(const std::vector<u8>& input, std::vector<u8
static_cast<u32>(Common::AlignUp(size, page_size) >> page_size_bits)))
<< page_size_bits;
if (!params.offset) {
- UNREACHABLE_MSG("Failed to allocate free space in the GPU AS!");
+ ASSERT_MSG(false, "Failed to allocate free space in the GPU AS!");
return NvResult::InsufficientMemory;
}