mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-12-26 08:40:08 +00:00
Buffer Cache: disable reactive flushing in it.
This commit is contained in:
parent
016c6feb49
commit
2df19ef0fd
@ -203,11 +203,8 @@ bool BufferCache<P>::DMACopy(GPUVAddr src_address, GPUVAddr dest_address, u64 am
|
|||||||
const VAddr new_base_address = *cpu_dest_address + diff;
|
const VAddr new_base_address = *cpu_dest_address + diff;
|
||||||
const IntervalType add_interval{new_base_address, new_base_address + size};
|
const IntervalType add_interval{new_base_address, new_base_address + size};
|
||||||
tmp_intervals.push_back(add_interval);
|
tmp_intervals.push_back(add_interval);
|
||||||
if (!Settings::values.use_reactive_flushing.GetValue() ||
|
|
||||||
memory_tracker.IsRegionPreflushable(new_base_address, new_base_address + size)) {
|
|
||||||
uncommitted_ranges.add(add_interval);
|
uncommitted_ranges.add(add_interval);
|
||||||
pending_ranges.add(add_interval);
|
pending_ranges.add(add_interval);
|
||||||
}
|
|
||||||
};
|
};
|
||||||
ForEachInRangeSet(common_ranges, *cpu_src_address, amount, mirror);
|
ForEachInRangeSet(common_ranges, *cpu_src_address, amount, mirror);
|
||||||
// This subtraction in this order is important for overlapping copies.
|
// This subtraction in this order is important for overlapping copies.
|
||||||
@ -1234,10 +1231,6 @@ void BufferCache<P>::MarkWrittenBuffer(BufferId buffer_id, VAddr cpu_addr, u32 s
|
|||||||
|
|
||||||
const IntervalType base_interval{cpu_addr, cpu_addr + size};
|
const IntervalType base_interval{cpu_addr, cpu_addr + size};
|
||||||
common_ranges.add(base_interval);
|
common_ranges.add(base_interval);
|
||||||
if (Settings::values.use_reactive_flushing.GetValue() &&
|
|
||||||
!memory_tracker.IsRegionPreflushable(cpu_addr, cpu_addr + size)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
uncommitted_ranges.add(base_interval);
|
uncommitted_ranges.add(base_interval);
|
||||||
pending_ranges.add(base_interval);
|
pending_ranges.add(base_interval);
|
||||||
}
|
}
|
||||||
|
@ -510,13 +510,6 @@ VideoCore::RasterizerDownloadArea RasterizerVulkan::GetFlushArea(VAddr addr, u64
|
|||||||
return *area;
|
return *area;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
{
|
|
||||||
std::scoped_lock lock{buffer_cache.mutex};
|
|
||||||
auto area = buffer_cache.GetFlushArea(addr, size);
|
|
||||||
if (area) {
|
|
||||||
return *area;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
VideoCore::RasterizerDownloadArea new_area{
|
VideoCore::RasterizerDownloadArea new_area{
|
||||||
.start_address = Common::AlignDown(addr, Core::Memory::YUZU_PAGESIZE),
|
.start_address = Common::AlignDown(addr, Core::Memory::YUZU_PAGESIZE),
|
||||||
.end_address = Common::AlignUp(addr + size, Core::Memory::YUZU_PAGESIZE),
|
.end_address = Common::AlignUp(addr + size, Core::Memory::YUZU_PAGESIZE),
|
||||||
|
@ -1323,7 +1323,6 @@ ImageId TextureCache<P>::JoinImages(const ImageInfo& info, GPUVAddr gpu_addr, VA
|
|||||||
all_siblings.push_back(overlap_id);
|
all_siblings.push_back(overlap_id);
|
||||||
} else {
|
} else {
|
||||||
bad_overlap_ids.push_back(overlap_id);
|
bad_overlap_ids.push_back(overlap_id);
|
||||||
overlap.flags |= ImageFlagBits::BadOverlap;
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
ForEachImageInRegion(cpu_addr, size_bytes, region_check);
|
ForEachImageInRegion(cpu_addr, size_bytes, region_check);
|
||||||
@ -1434,8 +1433,13 @@ ImageId TextureCache<P>::JoinImages(const ImageInfo& info, GPUVAddr gpu_addr, VA
|
|||||||
ImageBase& aliased = slot_images[aliased_id];
|
ImageBase& aliased = slot_images[aliased_id];
|
||||||
aliased.overlapping_images.push_back(new_image_id);
|
aliased.overlapping_images.push_back(new_image_id);
|
||||||
new_image.overlapping_images.push_back(aliased_id);
|
new_image.overlapping_images.push_back(aliased_id);
|
||||||
|
if (aliased.info.resources.levels == 1 && aliased.overlapping_images.size() > 1) {
|
||||||
|
aliased.flags |= ImageFlagBits::BadOverlap;
|
||||||
|
}
|
||||||
|
if (new_image.info.resources.levels == 1 && new_image.overlapping_images.size() > 1) {
|
||||||
new_image.flags |= ImageFlagBits::BadOverlap;
|
new_image.flags |= ImageFlagBits::BadOverlap;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
RegisterImage(new_image_id);
|
RegisterImage(new_image_id);
|
||||||
return new_image_id;
|
return new_image_id;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user