rsx: Enforce natural data alignment for IO buffers span cast

This commit is contained in:
kd-11 2025-11-21 02:32:51 +03:00 committed by Elad
parent ea7183b6bd
commit e1eb7421fb

View File

@ -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) };
}