mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-12-16 04:09:07 +00:00
rsx: Enforce natural data alignment for IO buffers span cast
This commit is contained in:
parent
ea7183b6bd
commit
e1eb7421fb
@ -80,6 +80,7 @@ namespace rsx
|
||||
std::span<T> as_span() const
|
||||
{
|
||||
auto bytes = data();
|
||||
ensure((reinterpret_cast<uintptr_t>(bytes) & (sizeof(T) - 1)) == 0, "IO buffer span cast requires naturally aligned pointers.");
|
||||
return { utils::bless<T>(bytes), m_size / sizeof(T) };
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user