summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2019-12-25 19:37:28 +0100
committerFernando Sahmkow <fsahmkow27@gmail.com>2019-12-25 19:37:28 +0100
commita5bb1ac6e31d2087e2c2ee325acadbbe9cb566a3 (patch)
tree33d5b5a68ca71677c995f5521d23335190966eb0 /src/core/hle/service
parentMerge pull request #3244 from ReinUsesLisp/vk-fps (diff)
downloadyuzu-a5bb1ac6e31d2087e2c2ee325acadbbe9cb566a3.tar
yuzu-a5bb1ac6e31d2087e2c2ee325acadbbe9cb566a3.tar.gz
yuzu-a5bb1ac6e31d2087e2c2ee325acadbbe9cb566a3.tar.bz2
yuzu-a5bb1ac6e31d2087e2c2ee325acadbbe9cb566a3.tar.lz
yuzu-a5bb1ac6e31d2087e2c2ee325acadbbe9cb566a3.tar.xz
yuzu-a5bb1ac6e31d2087e2c2ee325acadbbe9cb566a3.tar.zst
yuzu-a5bb1ac6e31d2087e2c2ee325acadbbe9cb566a3.zip
Diffstat (limited to 'src/core/hle/service')
-rw-r--r--src/core/hle/service/nvdrv/devices/nvhost_as_gpu.cpp6
-rw-r--r--src/core/hle/service/nvdrv/devices/nvhost_as_gpu.h2
2 files changed, 5 insertions, 3 deletions
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 07c88465e..195421cc0 100644
--- a/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.cpp
+++ b/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.cpp
@@ -104,10 +104,12 @@ u32 nvhost_as_gpu::Remap(const std::vector<u8>& input, std::vector<u8>& output)
ASSERT(object->status == nvmap::Object::Status::Allocated);
- u64 size = static_cast<u64>(entry.pages) << 0x10;
+ const u64 size = static_cast<u64>(entry.pages) << 0x10;
ASSERT(size <= object->size);
+ const u64 map_offset = static_cast<u64>(entry.map_offset) << 0x10;
- GPUVAddr returned = gpu.MemoryManager().MapBufferEx(object->addr, offset, size);
+ const GPUVAddr returned =
+ gpu.MemoryManager().MapBufferEx(object->addr + map_offset, offset, size);
ASSERT(returned == offset);
}
std::memcpy(output.data(), entries.data(), output.size());
diff --git a/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.h b/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.h
index 169fb8f0e..f79fcc065 100644
--- a/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.h
+++ b/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.h
@@ -62,7 +62,7 @@ private:
u16_le flags;
u16_le kind;
u32_le nvmap_handle;
- INSERT_PADDING_WORDS(1);
+ u32_le map_offset;
u32_le offset;
u32_le pages;
};