mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-11-04 23:35:12 +01:00
Fix bugs introduced by refactoring
GPU VMM was mistakenly checking the alignment of the PA rather than the VA and NvMap::Free was not accounting for the handle index starting from one.
This commit is contained in:
parent
c65c91e1bc
commit
39f0345ac7
@ -118,7 +118,7 @@ namespace skyline::gpu::vmm {
|
||||
}
|
||||
|
||||
u64 MemoryManager::MapFixed(u64 address, u8 *pointer, u64 size) {
|
||||
if (!util::IsAligned(pointer, constant::GpuPageSize))
|
||||
if (!util::IsAligned(address, constant::GpuPageSize))
|
||||
return false;
|
||||
|
||||
size = util::AlignUp(size, constant::GpuPageSize);
|
||||
|
@ -80,7 +80,7 @@ namespace skyline::service::nvdrv::device {
|
||||
|
||||
std::unique_lock lock(mapMutex);
|
||||
try {
|
||||
auto &object{maps.at(data.handle)};
|
||||
auto &object{maps.at(data.handle - 1)};
|
||||
if (object.use_count() > 1) {
|
||||
data.pointer = object->pointer;
|
||||
data.flags = 0x0;
|
||||
|
Loading…
Reference in New Issue
Block a user