diff options
| author | 2021-06-11 11:47:23 +0200 | |
|---|---|---|
| committer | 2021-06-11 17:27:17 +0200 | |
| commit | 7f85abb28120fbb57bb813b828ee42f2a2031990 (patch) | |
| tree | 0e4ce28226164e465b8739b22604b1741d2b1c11 /src/common/host_memory.h | |
| parent | common/host_shader: Load Windows 10 functions dynamically (diff) | |
| download | yuzu-7f85abb28120fbb57bb813b828ee42f2a2031990.tar.gz yuzu-7f85abb28120fbb57bb813b828ee42f2a2031990.tar.xz yuzu-7f85abb28120fbb57bb813b828ee42f2a2031990.zip | |
common/host_memory: Implement a fallback if fastmem fails.
This falls back to the old approach of using a virtual buffer.
Windows is untested, but this build should fix support for Windows < 10 v1803. However without fastmem support at all.
Diffstat (limited to 'src/common/host_memory.h')
| -rw-r--r-- | src/common/host_memory.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/common/host_memory.h b/src/common/host_memory.h index eaa7d18ab..9b8326d0f 100644 --- a/src/common/host_memory.h +++ b/src/common/host_memory.h | |||
| @@ -6,6 +6,7 @@ | |||
| 6 | 6 | ||
| 7 | #include <memory> | 7 | #include <memory> |
| 8 | #include "common/common_types.h" | 8 | #include "common/common_types.h" |
| 9 | #include "common/virtual_buffer.h" | ||
| 9 | 10 | ||
| 10 | namespace Common { | 11 | namespace Common { |
| 11 | 12 | ||
| @@ -61,6 +62,9 @@ private: | |||
| 61 | u8* backing_base{}; | 62 | u8* backing_base{}; |
| 62 | u8* virtual_base{}; | 63 | u8* virtual_base{}; |
| 63 | size_t virtual_base_offset{}; | 64 | size_t virtual_base_offset{}; |
| 65 | |||
| 66 | // Fallback if fastmem is not supported on this platform | ||
| 67 | std::unique_ptr<Common::VirtualBuffer<u8>> fallback_buffer; | ||
| 64 | }; | 68 | }; |
| 65 | 69 | ||
| 66 | } // namespace Common | 70 | } // namespace Common |