mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-07-12 04:35:56 +00:00
buffer_cache: Handle inline data to flexible memory
This commit is contained in:
parent
2d1a2982df
commit
565bde7c4f
1 changed files with 4 additions and 1 deletions
|
@ -312,7 +312,10 @@ 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) {
|
if (!is_gds) {
|
||||||
ASSERT(memory->TryWriteBacking(std::bit_cast<void*>(address), value, num_bytes));
|
if (!memory->TryWriteBacking(std::bit_cast<void*>(address), value, num_bytes)) {
|
||||||
|
std::memcpy(std::bit_cast<void*>(address), value, num_bytes);
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (!IsRegionRegistered(address, num_bytes)) {
|
if (!IsRegionRegistered(address, num_bytes)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue