diff options
| author | 2023-08-06 14:55:05 -0400 | |
|---|---|---|
| committer | 2023-08-06 14:55:05 -0400 | |
| commit | 9058486b9b9833d0554d3e3f11a582859657b21f (patch) | |
| tree | fe16d174b54119a593b43c01f89c8ff1d4e1f3cf /src/video_core/texture_cache | |
| parent | HACK: Avoid swizzling and reuploading ASTC image every frame (diff) | |
| download | yuzu-9058486b9b9833d0554d3e3f11a582859657b21f.tar.gz yuzu-9058486b9b9833d0554d3e3f11a582859657b21f.tar.xz yuzu-9058486b9b9833d0554d3e3f11a582859657b21f.zip | |
Revert "HACK: Avoid swizzling and reuploading ASTC image every frame"
This reverts commit b18c1fb1bbbcc235e9a1cbbb2704fed2e5895e61.
Diffstat (limited to 'src/video_core/texture_cache')
| -rw-r--r-- | src/video_core/texture_cache/texture_cache.h | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h index 6b87987de..4457b366f 100644 --- a/src/video_core/texture_cache/texture_cache.h +++ b/src/video_core/texture_cache/texture_cache.h | |||
| @@ -1021,18 +1021,8 @@ void TextureCache<P>::UploadImageContents(Image& image, StagingBuffer& staging) | |||
| 1021 | const GPUVAddr gpu_addr = image.gpu_addr; | 1021 | const GPUVAddr gpu_addr = image.gpu_addr; |
| 1022 | 1022 | ||
| 1023 | if (True(image.flags & ImageFlagBits::AcceleratedUpload)) { | 1023 | if (True(image.flags & ImageFlagBits::AcceleratedUpload)) { |
| 1024 | static u64 last_size = 0; | 1024 | gpu_memory->ReadBlock(gpu_addr, mapped_span.data(), mapped_span.size_bytes(), |
| 1025 | bool has_run = false; | 1025 | VideoCommon::CacheType::NoTextureCache); |
| 1026 | if (last_size == image.unswizzled_size_bytes) { | ||
| 1027 | has_run = true; | ||
| 1028 | } | ||
| 1029 | last_size = image.unswizzled_size_bytes; | ||
| 1030 | |||
| 1031 | if (!has_run) { | ||
| 1032 | LOG_ERROR(Debug, "Called"); | ||
| 1033 | gpu_memory->ReadBlock(gpu_addr, mapped_span.data(), mapped_span.size_bytes(), | ||
| 1034 | VideoCommon::CacheType::NoTextureCache); | ||
| 1035 | } | ||
| 1036 | const auto uploads = FullUploadSwizzles(image.info); | 1026 | const auto uploads = FullUploadSwizzles(image.info); |
| 1037 | runtime.AccelerateImageUpload(image, staging, uploads); | 1027 | runtime.AccelerateImageUpload(image, staging, uploads); |
| 1038 | return; | 1028 | return; |