Check if region is registered after value is written to a buffer

This commit is contained in:
Dzmitry Dubrova 2025-06-03 21:59:50 +03:00
parent c09e463b8e
commit 8c3708f8d2

View File

@ -293,8 +293,11 @@ void BufferCache::BindIndexBuffer(u32 index_offset) {
void BufferCache::InlineData(VAddr address, const void* value, u32 num_bytes, bool is_gds) { void BufferCache::InlineData(VAddr address, const void* value, u32 num_bytes, bool is_gds) {
ASSERT_MSG(address % 4 == 0, "GDS offset must be dword aligned"); ASSERT_MSG(address % 4 == 0, "GDS offset must be dword aligned");
if (!is_gds && !IsRegionRegistered(address, num_bytes)) { if (!is_gds) {
memcpy(std::bit_cast<void*>(address), value, num_bytes); memcpy(std::bit_cast<void*>(address), value, num_bytes);
if (!IsRegionRegistered(address, num_bytes)) {
return;
}
return; return;
} }
Buffer* buffer = [&] { Buffer* buffer = [&] {