mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-07-26 03:55:37 +00:00
Check if region is registered after value is written to a buffer
This commit is contained in:
parent
c09e463b8e
commit
8c3708f8d2
@ -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 = [&] {
|
||||||
|
Loading…
Reference in New Issue
Block a user