Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions core/shader/recompiler/MetalReplay/GuestLabelStore.cpp
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
#include <atomic>
#include <cstddef>
#include <cstdint>

namespace AgcDriver::GuestMemory {
void CheckRange(const void* pointer, std::size_t bytes, std::size_t alignment, bool writable);
}

// The replay executables run guest memory as plain host memory with no write watch, so VideoOut's
// buffer-label store is a checked release store.
// buffer-label store is a plain release store. It is not range-checked: the only caller passes a
// slot of VideoOut's own host-side label array, which is never part of the borrowed guest ranges a
// replay registers, so the borrowed-range check would reject every call ("not borrowed").
extern "C" void AgcDriverStoreGuestLabel_nid_postfix(std::uint64_t* pointer, std::uint64_t value) {
AgcDriver::GuestMemory::CheckRange(pointer, sizeof(*pointer), std::atomic_ref<std::uint64_t>::required_alignment, true);
std::atomic_ref(*pointer).store(value, std::memory_order_release);
}
Loading