mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-12-11 06:08:34 +00:00
review comments applied
This commit is contained in:
@@ -90,8 +90,7 @@ void Liverpool::ProcessCmdList(u32* cmdbuf, u32 size_in_bytes) {
|
||||
ASSERT(write_data->dst_sel.Value() == 2 || write_data->dst_sel.Value() == 5);
|
||||
const u32 data_size = (header->type3.count.Value() - 2) * 4;
|
||||
if (!write_data->wr_one_addr.Value()) {
|
||||
std::memcpy(reinterpret_cast<void*>(write_data->Address()), write_data->data,
|
||||
data_size);
|
||||
std::memcpy(write_data->Address<void*>(), write_data->data, data_size);
|
||||
} else {
|
||||
UNREACHABLE();
|
||||
}
|
||||
|
||||
@@ -428,12 +428,23 @@ struct PM4CmdWriteData {
|
||||
BitField<30, 1, u32> engine_sel;
|
||||
u32 raw;
|
||||
};
|
||||
u32 dst_addr_lo;
|
||||
u32 dst_addr_hi;
|
||||
union {
|
||||
struct {
|
||||
u32 dst_addr_lo;
|
||||
u32 dst_addr_hi;
|
||||
};
|
||||
u64 addr64;
|
||||
};
|
||||
u32 data[0];
|
||||
|
||||
uintptr_t Address() const {
|
||||
return (uintptr_t(dst_addr_hi) << 32) | dst_addr_lo;
|
||||
template <typename T>
|
||||
void Address(T addr) {
|
||||
addr64 = reinterpret_cast<u64>(addr);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
T* Address() const {
|
||||
return reinterpret_cast<T*>(addr64);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user