VideoCommon: add function to check whether TextureFormat is a valid value

This commit is contained in:
iwubcode
2022-06-26 00:45:13 -05:00
parent e18053d307
commit a1892a9c68
+5
View File
@@ -50,6 +50,11 @@ static inline bool IsColorIndexed(TextureFormat format)
format == TextureFormat::C14X2;
}
static inline bool IsValidTextureFormat(TextureFormat format)
{
return format <= TextureFormat::RGBA8 || IsColorIndexed(format) || format == TextureFormat::CMPR;
}
// The EFB Copy pipeline looks like:
//
// 1. Read EFB -> 2. Select color/depth -> 3. Downscale (optional)