Support 3D BC4 and BC5 compressed textures (#1655)
* Support 3D BC4 and BC5 compressed textures * PR feedback * Fix some typos
This commit is contained in:
parent
6222f173f0
commit
11a7c99764
6 changed files with 357 additions and 32 deletions
|
@ -341,5 +341,25 @@ namespace Ryujinx.Graphics.GAL
|
|||
{
|
||||
return format.IsUint() || format.IsSint();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Checks if the texture format is a BC4 compressed format.
|
||||
/// </summary>
|
||||
/// <param name="format">Texture format</param>
|
||||
/// <returns>True if the texture format is a BC4 compressed format, false otherwise</returns>
|
||||
public static bool IsBc4(this Format format)
|
||||
{
|
||||
return format == Format.Bc4Unorm || format == Format.Bc4Snorm;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Checks if the texture format is a BC5 compressed format.
|
||||
/// </summary>
|
||||
/// <param name="format">Texture format</param>
|
||||
/// <returns>True if the texture format is a BC5 compressed format, false otherwise</returns>
|
||||
public static bool IsBc5(this Format format)
|
||||
{
|
||||
return format == Format.Bc5Unorm || format == Format.Bc5Snorm;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue