diff options
| author | 2021-11-18 11:30:47 -0800 | |
|---|---|---|
| committer | 2021-11-18 11:30:47 -0800 | |
| commit | 0bc46fedd617f6a42c53716680ed99d8f42bf99a (patch) | |
| tree | aec333a588d638492cca77d7814cdc5379d2b6c0 /src/video_core/texture_cache | |
| parent | Merge pull request #7353 from v1993/no-more-epilepsy (diff) | |
| parent | gl_texture_cache: Round format conversion PBO to next power of 2 (diff) | |
| download | yuzu-0bc46fedd617f6a42c53716680ed99d8f42bf99a.tar.gz yuzu-0bc46fedd617f6a42c53716680ed99d8f42bf99a.tar.xz yuzu-0bc46fedd617f6a42c53716680ed99d8f42bf99a.zip | |
Merge pull request #7349 from ameerj/ogl-convert-image
gl_texture_cache: Implement pixel format conversions for copies
Diffstat (limited to 'src/video_core/texture_cache')
| -rw-r--r-- | src/video_core/texture_cache/texture_cache.h | 3 | ||||
| -rw-r--r-- | src/video_core/texture_cache/texture_cache_base.h | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h index 4d2874bf2..241f71a91 100644 --- a/src/video_core/texture_cache/texture_cache.h +++ b/src/video_core/texture_cache/texture_cache.h | |||
| @@ -1759,6 +1759,9 @@ void TextureCache<P>::CopyImage(ImageId dst_id, ImageId src_id, std::vector<Imag | |||
| 1759 | } | 1759 | } |
| 1760 | UNIMPLEMENTED_IF(dst.info.type != ImageType::e2D); | 1760 | UNIMPLEMENTED_IF(dst.info.type != ImageType::e2D); |
| 1761 | UNIMPLEMENTED_IF(src.info.type != ImageType::e2D); | 1761 | UNIMPLEMENTED_IF(src.info.type != ImageType::e2D); |
| 1762 | if constexpr (HAS_PIXEL_FORMAT_CONVERSIONS) { | ||
| 1763 | return runtime.ConvertImage(dst, src, copies); | ||
| 1764 | } | ||
| 1762 | for (const ImageCopy& copy : copies) { | 1765 | for (const ImageCopy& copy : copies) { |
| 1763 | UNIMPLEMENTED_IF(copy.dst_subresource.num_layers != 1); | 1766 | UNIMPLEMENTED_IF(copy.dst_subresource.num_layers != 1); |
| 1764 | UNIMPLEMENTED_IF(copy.src_subresource.num_layers != 1); | 1767 | UNIMPLEMENTED_IF(copy.src_subresource.num_layers != 1); |
diff --git a/src/video_core/texture_cache/texture_cache_base.h b/src/video_core/texture_cache/texture_cache_base.h index 643ad811c..a9504c0e8 100644 --- a/src/video_core/texture_cache/texture_cache_base.h +++ b/src/video_core/texture_cache/texture_cache_base.h | |||
| @@ -59,6 +59,8 @@ class TextureCache { | |||
| 59 | static constexpr bool HAS_EMULATED_COPIES = P::HAS_EMULATED_COPIES; | 59 | static constexpr bool HAS_EMULATED_COPIES = P::HAS_EMULATED_COPIES; |
| 60 | /// True when the API can provide info about the memory of the device. | 60 | /// True when the API can provide info about the memory of the device. |
| 61 | static constexpr bool HAS_DEVICE_MEMORY_INFO = P::HAS_DEVICE_MEMORY_INFO; | 61 | static constexpr bool HAS_DEVICE_MEMORY_INFO = P::HAS_DEVICE_MEMORY_INFO; |
| 62 | /// True when the API provides utilities for pixel format conversions. | ||
| 63 | static constexpr bool HAS_PIXEL_FORMAT_CONVERSIONS = P::HAS_PIXEL_FORMAT_CONVERSIONS; | ||
| 62 | 64 | ||
| 63 | static constexpr u64 DEFAULT_EXPECTED_MEMORY = 1_GiB; | 65 | static constexpr u64 DEFAULT_EXPECTED_MEMORY = 1_GiB; |
| 64 | static constexpr u64 DEFAULT_CRITICAL_MEMORY = 2_GiB; | 66 | static constexpr u64 DEFAULT_CRITICAL_MEMORY = 2_GiB; |