mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2024-12-27 18:16:23 +00:00
Fix HLE buffer copy not executed when there's only 1 copy. (#1754)
This commit is contained in:
parent
ec8e5d5ef1
commit
1e3d034f96
|
@ -60,7 +60,7 @@ bool ExecuteCopyShaderHLE(const Shader::Info& info, const AmdGpu::Liverpool::Reg
|
|||
|
||||
static constexpr vk::DeviceSize MaxDistanceForMerge = 64_MB;
|
||||
u32 batch_start = 0;
|
||||
u32 batch_end = 1;
|
||||
u32 batch_end = copies.size() > 1 ? 1 : 0;
|
||||
|
||||
while (batch_end < copies.size()) {
|
||||
// Place first copy into the current batch
|
||||
|
@ -72,7 +72,7 @@ bool ExecuteCopyShaderHLE(const Shader::Info& info, const AmdGpu::Liverpool::Reg
|
|||
|
||||
for (int i = batch_start + 1; i < copies.size(); i++) {
|
||||
// Compute new src and dst bounds if we were to batch this copy
|
||||
const auto [src_offset, dst_offset, size] = copies[i];
|
||||
const auto& [src_offset, dst_offset, size] = copies[i];
|
||||
auto new_src_offset_min = std::min(src_offset_min, src_offset);
|
||||
auto new_src_offset_max = std::max(src_offset_max, src_offset + size);
|
||||
if (new_src_offset_max - new_src_offset_min > MaxDistanceForMerge) {
|
||||
|
|
Loading…
Reference in a new issue