2
1
Fork 0
mirror of https://github.com/yuzu-emu/yuzu.git synced 2024-07-04 23:31:19 +01:00

Videocore: Address Feedback & CLANG Format.

This commit is contained in:
Fernando Sahmkow 2021-07-04 18:28:20 +02:00
parent 0e4d4b4beb
commit 35327dbde3
2 changed files with 74 additions and 77 deletions

View file

@ -14,8 +14,8 @@
#include <unordered_map>
#include <vector>
#include <boost/icl/interval_set.hpp>
#include <boost/container/small_vector.hpp>
#include <boost/icl/interval_set.hpp>
#include "common/common_types.h"
#include "common/div_ceil.h"
@ -333,10 +333,7 @@ private:
std::vector<BufferId> cached_write_buffer_ids;
// TODO: This data structure is not optimal and it should be reworked
IntervalSet uncommitted_ranges;
std::deque<IntervalSet> committed_ranges;
std::deque<boost::container::small_vector<BufferCopy, 4>> pending_downloads;
size_t immediate_buffer_capacity = 0;
std::unique_ptr<u8[]> immediate_buffer_alloc;
@ -579,7 +576,8 @@ void BufferCache<P>::CommitAsyncFlushesHigh() {
const VAddr cpu_addr_end = interval.upper();
ForEachBufferInRange(cpu_addr, size, [&](BufferId buffer_id, Buffer& buffer) {
boost::container::small_vector<BufferCopy, 1> copies;
buffer.ForEachDownloadRange(cpu_addr, size, false, [&](u64 range_offset, u64 range_size) {
buffer.ForEachDownloadRange(
cpu_addr, size, false, [&](u64 range_offset, u64 range_size) {
VAddr cpu_addr_base = buffer.CpuAddr() + range_offset;
VAddr cpu_addr_end2 = cpu_addr_base + range_size;
const s64 difference = s64(cpu_addr_end2 - cpu_addr_end);
@ -644,9 +642,7 @@ void BufferCache<P>::CommitAsyncFlushes() {
}
template <class P>
void BufferCache<P>::PopAsyncFlushes() {
}
void BufferCache<P>::PopAsyncFlushes() {}
template <class P>
bool BufferCache<P>::IsRegionGpuModified(VAddr addr, size_t size) {
@ -1055,7 +1051,8 @@ void BufferCache<P>::MarkWrittenBuffer(BufferId buffer_id, VAddr cpu_addr, u32 s
Buffer& buffer = slot_buffers[buffer_id];
buffer.MarkRegionAsGpuModified(cpu_addr, size);
const bool is_accuracy_high = Settings::values.gpu_accuracy.GetValue() == Settings::GPUAccuracy::High;
const bool is_accuracy_high =
Settings::values.gpu_accuracy.GetValue() == Settings::GPUAccuracy::High;
const bool is_async = Settings::values.use_asynchronous_gpu_emulation.GetValue();
if (!is_async && !is_accuracy_high) {
return;