Skip to content

Commit

Permalink
VideoCommon: add function to check whether TextureFormat is a valid v…
Browse files Browse the repository at this point in the history
…alue
  • Loading branch information
iwubcode committed Jun 26, 2022
1 parent e18053d commit a1892a9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Source/Core/VideoCommon/TextureDecoder.h
Expand Up @@ -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)
Expand Down

0 comments on commit a1892a9

Please sign in to comment.