summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/Software/TextureSampler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/VideoBackends/Software/TextureSampler.cpp')
-rw-r--r--Source/Core/VideoBackends/Software/TextureSampler.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/Core/VideoBackends/Software/TextureSampler.cpp b/Source/Core/VideoBackends/Software/TextureSampler.cpp
index d5222384f0..f9182441bb 100644
--- a/Source/Core/VideoBackends/Software/TextureSampler.cpp
+++ b/Source/Core/VideoBackends/Software/TextureSampler.cpp
@@ -5,6 +5,7 @@
#include <algorithm>
#include <cmath>
+#include <span>
#include "Common/CommonTypes.h"
#include "Common/MsgHandler.h"
@@ -137,7 +138,9 @@ void SampleMip(s32 s, s32 t, s32 mip, bool linear, u8 texmap, u8* sample)
auto& memory = system.GetMemory();
const u32 imageBase = texUnit.texImage3.image_base << 5;
- imageSrc = memory.GetPointer(imageBase);
+ // TODO: For memory safety, we need to check the size of this span
+ std::span<const u8> span = memory.GetSpanForAddress(imageBase);
+ imageSrc = span.data();
}
int image_width_minus_1 = ti0.width;