diff options
| author | 2023-05-28 12:06:32 +0300 | |
|---|---|---|
| committer | 2023-07-01 16:03:29 +0300 | |
| commit | 95cefaf993e46414476e9d3319f6a08e0e213eac (patch) | |
| tree | b015c76b2ddd5f940070d4428b0498521f30e9ee /src/video_core/texture_cache | |
| parent | Update translations (2023-07-01) (#10972) (diff) | |
| download | yuzu-95cefaf993e46414476e9d3319f6a08e0e213eac.tar.gz yuzu-95cefaf993e46414476e9d3319f6a08e0e213eac.tar.xz yuzu-95cefaf993e46414476e9d3319f6a08e0e213eac.zip | |
renderer_vulkan: Add support for VK_KHR_image_format_list
Diffstat (limited to 'src/video_core/texture_cache')
| -rw-r--r-- | src/video_core/texture_cache/types.h | 1 | ||||
| -rw-r--r-- | src/video_core/texture_cache/util.cpp | 9 |
2 files changed, 2 insertions, 8 deletions
diff --git a/src/video_core/texture_cache/types.h b/src/video_core/texture_cache/types.h index a0e10643f..0453456b4 100644 --- a/src/video_core/texture_cache/types.h +++ b/src/video_core/texture_cache/types.h | |||
| @@ -54,7 +54,6 @@ enum class RelaxedOptions : u32 { | |||
| 54 | Format = 1 << 1, | 54 | Format = 1 << 1, |
| 55 | Samples = 1 << 2, | 55 | Samples = 1 << 2, |
| 56 | ForceBrokenViews = 1 << 3, | 56 | ForceBrokenViews = 1 << 3, |
| 57 | FormatBpp = 1 << 4, | ||
| 58 | }; | 57 | }; |
| 59 | DECLARE_ENUM_FLAG_OPERATORS(RelaxedOptions) | 58 | DECLARE_ENUM_FLAG_OPERATORS(RelaxedOptions) |
| 60 | 59 | ||
diff --git a/src/video_core/texture_cache/util.cpp b/src/video_core/texture_cache/util.cpp index 9a618a57a..0de6ed09d 100644 --- a/src/video_core/texture_cache/util.cpp +++ b/src/video_core/texture_cache/util.cpp | |||
| @@ -1201,8 +1201,7 @@ std::optional<SubresourceBase> FindSubresource(const ImageInfo& candidate, const | |||
| 1201 | // Format checking is relaxed, but we still have to check for matching bytes per block. | 1201 | // Format checking is relaxed, but we still have to check for matching bytes per block. |
| 1202 | // This avoids creating a view for blits on UE4 titles where formats with different bytes | 1202 | // This avoids creating a view for blits on UE4 titles where formats with different bytes |
| 1203 | // per block are aliased. | 1203 | // per block are aliased. |
| 1204 | if (BytesPerBlock(existing.format) != BytesPerBlock(candidate.format) && | 1204 | if (BytesPerBlock(existing.format) != BytesPerBlock(candidate.format)) { |
| 1205 | False(options & RelaxedOptions::FormatBpp)) { | ||
| 1206 | return std::nullopt; | 1205 | return std::nullopt; |
| 1207 | } | 1206 | } |
| 1208 | } else { | 1207 | } else { |
| @@ -1233,11 +1232,7 @@ std::optional<SubresourceBase> FindSubresource(const ImageInfo& candidate, const | |||
| 1233 | } | 1232 | } |
| 1234 | const bool strict_size = False(options & RelaxedOptions::Size); | 1233 | const bool strict_size = False(options & RelaxedOptions::Size); |
| 1235 | if (!IsBlockLinearSizeCompatible(existing, candidate, base->level, 0, strict_size)) { | 1234 | if (!IsBlockLinearSizeCompatible(existing, candidate, base->level, 0, strict_size)) { |
| 1236 | if (False(options & RelaxedOptions::FormatBpp)) { | 1235 | return std::nullopt; |
| 1237 | return std::nullopt; | ||
| 1238 | } else if (!IsBlockLinearSizeCompatibleBPPRelaxed(existing, candidate, base->level, 0)) { | ||
| 1239 | return std::nullopt; | ||
| 1240 | } | ||
| 1241 | } | 1236 | } |
| 1242 | // TODO: compare block sizes | 1237 | // TODO: compare block sizes |
| 1243 | return base; | 1238 | return base; |