|
|
|
@ -829,7 +829,7 @@ void TextureCache<P>::CommitAsyncFlushes() { |
|
|
|
for (const PendingDownload& download_info : download_ids) { |
|
|
|
if (download_info.is_swizzle) { |
|
|
|
Image& image = slot_images[download_info.object_id]; |
|
|
|
const auto copies = FullDownloadCopies(image.info); |
|
|
|
const auto copies = FixSmallVectorADL(FullDownloadCopies(image.info)); |
|
|
|
image.DownloadMemory(download_map, copies); |
|
|
|
download_map.offset += Common::AlignUp(image.unswizzled_size_bytes, 64); |
|
|
|
} |
|
|
|
@ -862,11 +862,11 @@ void TextureCache<P>::PopAsyncFlushes() { |
|
|
|
auto& download_buffer = download_map[download_info.async_buffer_id]; |
|
|
|
if (download_info.is_swizzle) { |
|
|
|
const ImageBase& image = slot_images[download_info.object_id]; |
|
|
|
const auto copies = FullDownloadCopies(image.info); |
|
|
|
const auto copies = FixSmallVectorADL(FullDownloadCopies(image.info)); |
|
|
|
download_buffer.offset -= Common::AlignUp(image.unswizzled_size_bytes, 64); |
|
|
|
std::span<u8> download_span = |
|
|
|
download_buffer.mapped_span.subspan(download_buffer.offset); |
|
|
|
SwizzleImage(*gpu_memory, image.gpu_addr, image.info, FixSmallVectorADL(copies), download_span, swizzle_data_buffer); |
|
|
|
SwizzleImage(*gpu_memory, image.gpu_addr, image.info, copies, download_span, swizzle_data_buffer); |
|
|
|
} else { |
|
|
|
const BufferDownload& buffer_info = slot_buffer_downloads[download_info.object_id]; |
|
|
|
std::span<u8> download_span = |
|
|
|
@ -900,7 +900,7 @@ void TextureCache<P>::PopAsyncFlushes() { |
|
|
|
continue; |
|
|
|
} |
|
|
|
Image& image = slot_images[download_info.object_id]; |
|
|
|
const auto copies = FullDownloadCopies(image.info); |
|
|
|
const auto copies = FixSmallVectorADL(FullDownloadCopies(image.info)); |
|
|
|
image.DownloadMemory(download_map, copies); |
|
|
|
download_map.offset += image.unswizzled_size_bytes; |
|
|
|
} |
|
|
|
@ -913,8 +913,8 @@ void TextureCache<P>::PopAsyncFlushes() { |
|
|
|
continue; |
|
|
|
} |
|
|
|
const ImageBase& image = slot_images[download_info.object_id]; |
|
|
|
const auto copies = FullDownloadCopies(image.info); |
|
|
|
SwizzleImage(*gpu_memory, image.gpu_addr, image.info, FixSmallVectorADL(copies), download_span, swizzle_data_buffer); |
|
|
|
const auto copies = FixSmallVectorADL(FullDownloadCopies(image.info)); |
|
|
|
SwizzleImage(*gpu_memory, image.gpu_addr, image.info, copies, download_span, swizzle_data_buffer); |
|
|
|
download_map.offset += image.unswizzled_size_bytes; |
|
|
|
download_span = download_span.subspan(image.unswizzled_size_bytes); |
|
|
|
} |
|
|
|
@ -1324,7 +1324,7 @@ void TextureCache<P>::TickAsyncDecode() { |
|
|
|
auto staging = runtime.UploadStagingBuffer(MapSizeBytes(image)); |
|
|
|
std::memcpy(staging.mapped_span.data(), async_decode->decoded_data.data(), |
|
|
|
async_decode->decoded_data.size()); |
|
|
|
image.UploadMemory(staging, async_decode->copies); |
|
|
|
image.UploadMemory(staging, FixSmallVectorADL(async_decode->copies)); |
|
|
|
image.flags &= ~ImageFlagBits::IsDecoding; |
|
|
|
has_uploads = true; |
|
|
|
i = async_decodes.erase(i); |
|
|
|
|