From 6534008e7000ff4185ae0cc33a68098098326e76 Mon Sep 17 00:00:00 2001 From: IndecisiveTurtle <47210458+raphaelthegreat@users.noreply.github.com> Date: Mon, 23 Jun 2025 00:18:48 +0300 Subject: [PATCH] clang format --- src/video_core/amdgpu/liverpool.cpp | 12 +++++------- src/video_core/buffer_cache/buffer_cache.cpp | 10 ++++++---- src/video_core/buffer_cache/buffer_cache.h | 3 ++- src/video_core/page_manager.cpp | 2 +- 4 files changed, 14 insertions(+), 13 deletions(-) diff --git a/src/video_core/amdgpu/liverpool.cpp b/src/video_core/amdgpu/liverpool.cpp index 5394ff5ff..fd38e3fbf 100644 --- a/src/video_core/amdgpu/liverpool.cpp +++ b/src/video_core/amdgpu/liverpool.cpp @@ -882,8 +882,7 @@ Liverpool::Task Liverpool::ProcessCompute(const u32* acb, u32 acb_dwords, u32 vq break; } if (dma_data->src_sel == DmaDataSrc::Data && dma_data->dst_sel == DmaDataDst::Gds) { - rasterizer->InlineData(dma_data->dst_addr_lo, &dma_data->data, sizeof(u32), - true); + rasterizer->InlineData(dma_data->dst_addr_lo, &dma_data->data, sizeof(u32), true); } else if ((dma_data->src_sel == DmaDataSrc::Memory || dma_data->src_sel == DmaDataSrc::MemoryUsingL2) && dma_data->dst_sel == DmaDataDst::Gds) { @@ -892,8 +891,8 @@ Liverpool::Task Liverpool::ProcessCompute(const u32* acb, u32 acb_dwords, u32 vq } else if (dma_data->src_sel == DmaDataSrc::Data && (dma_data->dst_sel == DmaDataDst::Memory || dma_data->dst_sel == DmaDataDst::MemoryUsingL2)) { - rasterizer->InlineData(dma_data->DstAddress(), &dma_data->data, - sizeof(u32), false); + rasterizer->InlineData(dma_data->DstAddress(), &dma_data->data, sizeof(u32), + false); } else if (dma_data->src_sel == DmaDataSrc::Gds && (dma_data->dst_sel == DmaDataDst::Memory || dma_data->dst_sel == DmaDataDst::MemoryUsingL2)) { @@ -903,9 +902,8 @@ Liverpool::Task Liverpool::ProcessCompute(const u32* acb, u32 acb_dwords, u32 vq dma_data->src_sel == DmaDataSrc::MemoryUsingL2) && (dma_data->dst_sel == DmaDataDst::Memory || dma_data->dst_sel == DmaDataDst::MemoryUsingL2)) { - rasterizer->CopyBuffer(dma_data->DstAddress(), - dma_data->SrcAddress(), dma_data->NumBytes(), - false, false); + rasterizer->CopyBuffer(dma_data->DstAddress(), dma_data->SrcAddress(), + dma_data->NumBytes(), false, false); } else { UNREACHABLE_MSG("WriteData src_sel = {}, dst_sel = {}", u32(dma_data->src_sel.Value()), u32(dma_data->dst_sel.Value())); diff --git a/src/video_core/buffer_cache/buffer_cache.cpp b/src/video_core/buffer_cache/buffer_cache.cpp index a4638f481..e08345d17 100644 --- a/src/video_core/buffer_cache/buffer_cache.cpp +++ b/src/video_core/buffer_cache/buffer_cache.cpp @@ -30,7 +30,8 @@ static constexpr size_t MaxPageFaults = 1024; static constexpr size_t DownloadSizeThreshold = 2_MB; BufferCache::BufferCache(const Vulkan::Instance& instance_, Vulkan::Scheduler& scheduler_, - AmdGpu::Liverpool* liverpool_, TextureCache& texture_cache_, PageManager& tracker_) + AmdGpu::Liverpool* liverpool_, TextureCache& texture_cache_, + PageManager& tracker_) : instance{instance_}, scheduler{scheduler_}, liverpool{liverpool_}, memory{Core::Memory::Instance()}, texture_cache{texture_cache_}, tracker{tracker_}, staging_buffer{instance, scheduler, MemoryUsage::Upload, StagingBufferSize}, @@ -182,8 +183,8 @@ void BufferCache::DownloadBufferMemory(const Buffer& buffer, VAddr device_addr, for (const auto& copy : copies) { const VAddr copy_device_addr = buffer.CpuAddr() + copy.srcOffset; const u64 dst_offset = copy.dstOffset - offset; - ASSERT(memory->TryWriteBacking(std::bit_cast(copy_device_addr), - download + dst_offset, copy.size)); + ASSERT(memory->TryWriteBacking(std::bit_cast(copy_device_addr), download + dst_offset, + copy.size)); } } @@ -400,7 +401,8 @@ void BufferCache::CopyBuffer(VAddr dst, VAddr src, u32 num_bytes, bool dst_gds, return; } else if (!dst_gds) { // Write to backing memory to bypass memory protection. - ASSERT(memory->TryWriteBacking(std::bit_cast(dst), std::bit_cast(src), num_bytes)); + ASSERT(memory->TryWriteBacking(std::bit_cast(dst), std::bit_cast(src), + num_bytes)); } // Without a readback there's nothing we can do with this // Fallback to creating dst buffer on GPU to at least have this data there diff --git a/src/video_core/buffer_cache/buffer_cache.h b/src/video_core/buffer_cache/buffer_cache.h index ebfe6ccf6..8e6253633 100644 --- a/src/video_core/buffer_cache/buffer_cache.h +++ b/src/video_core/buffer_cache/buffer_cache.h @@ -71,7 +71,8 @@ public: public: explicit BufferCache(const Vulkan::Instance& instance, Vulkan::Scheduler& scheduler, - AmdGpu::Liverpool* liverpool, TextureCache& texture_cache, PageManager& tracker); + AmdGpu::Liverpool* liverpool, TextureCache& texture_cache, + PageManager& tracker); ~BufferCache(); /// Returns a pointer to GDS device local buffer. diff --git a/src/video_core/page_manager.cpp b/src/video_core/page_manager.cpp index 47034bade..811e45fa0 100644 --- a/src/video_core/page_manager.cpp +++ b/src/video_core/page_manager.cpp @@ -3,8 +3,8 @@ #include #include "common/assert.h" -#include "common/div_ceil.h" #include "common/debug.h" +#include "common/div_ceil.h" #include "common/signal_context.h" #include "core/memory.h" #include "core/signals.h"