diff options
| author | 2021-09-18 20:50:00 -0400 | |
|---|---|---|
| committer | 2021-11-16 22:11:30 +0100 | |
| commit | 16017ac4503603bcf8189583120ad8888242b0e1 (patch) | |
| tree | 6ce351a11c53df3134efde1ca821aa2145bd9342 /src/video_core/surface.cpp | |
| parent | gl_texture_cache: Fix depth and integer format scaling blits (diff) | |
| download | yuzu-16017ac4503603bcf8189583120ad8888242b0e1.tar.gz yuzu-16017ac4503603bcf8189583120ad8888242b0e1.tar.xz yuzu-16017ac4503603bcf8189583120ad8888242b0e1.zip | |
vk_texture_cache: Use nearest neighbor scaling when available
Diffstat (limited to 'src/video_core/surface.cpp')
| -rw-r--r-- | src/video_core/surface.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/video_core/surface.cpp b/src/video_core/surface.cpp index eb1746265..64941a486 100644 --- a/src/video_core/surface.cpp +++ b/src/video_core/surface.cpp | |||
| @@ -279,6 +279,33 @@ bool IsPixelFormatSRGB(PixelFormat format) { | |||
| 279 | } | 279 | } |
| 280 | } | 280 | } |
| 281 | 281 | ||
| 282 | bool IsPixelFormatInteger(PixelFormat format) { | ||
| 283 | switch (format) { | ||
| 284 | case PixelFormat::A8B8G8R8_SINT: | ||
| 285 | case PixelFormat::A8B8G8R8_UINT: | ||
| 286 | case PixelFormat::A2B10G10R10_UINT: | ||
| 287 | case PixelFormat::R8_SINT: | ||
| 288 | case PixelFormat::R8_UINT: | ||
| 289 | case PixelFormat::R16G16B16A16_SINT: | ||
| 290 | case PixelFormat::R16G16B16A16_UINT: | ||
| 291 | case PixelFormat::R32G32B32A32_UINT: | ||
| 292 | case PixelFormat::R32G32B32A32_SINT: | ||
| 293 | case PixelFormat::R32G32_SINT: | ||
| 294 | case PixelFormat::R16_UINT: | ||
| 295 | case PixelFormat::R16_SINT: | ||
| 296 | case PixelFormat::R16G16_UINT: | ||
| 297 | case PixelFormat::R16G16_SINT: | ||
| 298 | case PixelFormat::R8G8_SINT: | ||
| 299 | case PixelFormat::R8G8_UINT: | ||
| 300 | case PixelFormat::R32G32_UINT: | ||
| 301 | case PixelFormat::R32_UINT: | ||
| 302 | case PixelFormat::R32_SINT: | ||
| 303 | return true; | ||
| 304 | default: | ||
| 305 | return false; | ||
| 306 | } | ||
| 307 | } | ||
| 308 | |||
| 282 | std::pair<u32, u32> GetASTCBlockSize(PixelFormat format) { | 309 | std::pair<u32, u32> GetASTCBlockSize(PixelFormat format) { |
| 283 | return {DefaultBlockWidth(format), DefaultBlockHeight(format)}; | 310 | return {DefaultBlockWidth(format), DefaultBlockHeight(format)}; |
| 284 | } | 311 | } |