clang format

This commit is contained in:
IndecisiveTurtle 2024-12-24 23:09:08 +02:00
parent 33b481fdf5
commit ed1154df37
2 changed files with 6 additions and 3 deletions

View file

@ -547,7 +547,8 @@ void TextureCache::RefreshImage(Image& image, Vulkan::Scheduler* custom_schedule
const auto [vk_buffer, buf_offset] =
buffer_cache.ObtainViewBuffer(image_addr, image_size, is_gpu_dirty);
// The obtained buffer may be written by a shader so we need to emit a barrier to prevent RAW hazard
// The obtained buffer may be written by a shader so we need to emit a barrier to prevent RAW
// hazard
if (auto barrier = vk_buffer->GetBarrier(vk::AccessFlagBits2::eTransferRead,
vk::PipelineStageFlagBits2::eTransfer)) {
cmdbuf.pipelineBarrier2(vk::DependencyInfo{
@ -557,7 +558,8 @@ void TextureCache::RefreshImage(Image& image, Vulkan::Scheduler* custom_schedule
});
}
const auto [buffer, offset] = tile_manager.TryDetile(vk_buffer->Handle(), buf_offset, image.info);
const auto [buffer, offset] =
tile_manager.TryDetile(vk_buffer->Handle(), buf_offset, image.info);
for (auto& copy : image_copy) {
copy.bufferOffset += offset;
}

View file

@ -36,7 +36,8 @@ public:
TileManager(const Vulkan::Instance& instance, Vulkan::Scheduler& scheduler);
~TileManager();
std::pair<vk::Buffer, u32> TryDetile(vk::Buffer in_buffer, u32 in_offset, const ImageInfo& info);
std::pair<vk::Buffer, u32> TryDetile(vk::Buffer in_buffer, u32 in_offset,
const ImageInfo& info);
ScratchBuffer AllocBuffer(u32 size, bool is_storage = false);
void Upload(ScratchBuffer buffer, const void* data, size_t size);