mirror of
https://github.com/RPCS3/rpcs3.git
synced 2026-01-20 23:50:26 +01: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 a new issue