mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-07-23 10:35:03 +00:00
Fix windows and macos build
This commit is contained in:
parent
886899aa66
commit
ea207c85aa
@ -831,7 +831,8 @@ Liverpool::Task Liverpool::ProcessCompute(std::span<const u32> acb, u32 vqid) {
|
||||
if (queue.tmp_dwords > 0) [[unlikely]] {
|
||||
header = reinterpret_cast<const PM4Header*>(queue.tmp_packet.data());
|
||||
next_dw_off = header->type3.NumWords() + 1 - queue.tmp_dwords;
|
||||
std::memcpy(queue.tmp_packet.data() + queue.tmp_dwords, acb.data(), next_dw_off * sizeof(u32));
|
||||
std::memcpy(queue.tmp_packet.data() + queue.tmp_dwords, acb.data(),
|
||||
next_dw_off * sizeof(u32));
|
||||
queue.tmp_dwords = 0;
|
||||
}
|
||||
|
||||
@ -872,8 +873,8 @@ Liverpool::Task Liverpool::ProcessCompute(std::span<const u32> acb, u32 vqid) {
|
||||
}
|
||||
case PM4ItOpcode::IndirectBuffer: {
|
||||
const auto* indirect_buffer = reinterpret_cast<const PM4CmdIndirectBuffer*>(header);
|
||||
auto task = ProcessCompute<true>({indirect_buffer->Address<const u32>(),
|
||||
indirect_buffer->ib_size}, vqid);
|
||||
auto task = ProcessCompute<true>(
|
||||
{indirect_buffer->Address<const u32>(), indirect_buffer->ib_size}, vqid);
|
||||
RESUME_ASC(task, vqid);
|
||||
|
||||
while (!task.handle.done()) {
|
||||
|
@ -3,6 +3,7 @@
|
||||
|
||||
#include <algorithm>
|
||||
#include <new>
|
||||
#include <semaphore>
|
||||
#include "common/alignment.h"
|
||||
#include "common/debug.h"
|
||||
#include "common/div_ceil.h"
|
||||
@ -145,11 +146,12 @@ void BufferCache::ReadMemory(VAddr device_addr, u64 size) {
|
||||
}
|
||||
std::binary_semaphore sem{0};
|
||||
liverpool->SendCommand([this, &sem, device_addr, size] {
|
||||
ForEachBufferInRange(device_addr, size, [this, device_addr, size](BufferId buffer_id, Buffer& buffer) {
|
||||
ForEachBufferInRange(
|
||||
device_addr, size, [this, device_addr, size](BufferId buffer_id, Buffer& buffer) {
|
||||
const VAddr buffer_start = buffer.CpuAddr();
|
||||
const VAddr buffer_end = buffer_start + buffer.SizeBytes();
|
||||
const VAddr download_start = std::max(buffer_start, device_addr);
|
||||
const VAddr download_end = std::min(buffer_end, device_addr + size);
|
||||
const VAddr download_end = std::min<VAddr>(buffer_end, device_addr + size);
|
||||
const u64 download_size = download_end - download_start;
|
||||
DownloadBufferMemory(buffer, download_start, download_size);
|
||||
});
|
||||
@ -266,7 +268,8 @@ bool BufferCache::CommitPendingDownloads(bool wait_done) {
|
||||
const u64 dst_offset = copy.dstOffset - offset;
|
||||
if (!memory->TryWriteBacking(std::bit_cast<u8*>(copy_device_addr),
|
||||
download + dst_offset, copy.size)) {
|
||||
std::memcpy(std::bit_cast<u8*>(copy_device_addr), download + dst_offset, copy.size);
|
||||
std::memcpy(std::bit_cast<u8*>(copy_device_addr), download + dst_offset,
|
||||
copy.size);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3,8 +3,8 @@
|
||||
|
||||
#include "common/config.h"
|
||||
#include "common/debug.h"
|
||||
#include "core/memory.h"
|
||||
#include "common/scope_exit.h"
|
||||
#include "core/memory.h"
|
||||
#include "shader_recompiler/runtime_info.h"
|
||||
#include "video_core/amdgpu/liverpool.h"
|
||||
#include "video_core/renderer_vulkan/vk_instance.h"
|
||||
|
Loading…
Reference in New Issue
Block a user