Implement BGRA texture support (#1418)
* Implement BGRA texture support * Missing AppendLine * Remove empty lines * Address PR feedback
This commit is contained in:
parent
2678bf0010
commit
8dbcae1ff8
14 changed files with 232 additions and 61 deletions
|
@ -230,6 +230,25 @@ namespace Ryujinx.Graphics.GAL
|
|||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Checks if the texture format is a BGRA format with 8-bit components.
|
||||
/// </summary>
|
||||
/// <param name="format">Texture format</param>
|
||||
/// <returns>True if the texture format is a BGRA format with 8-bit components, false otherwise</returns>
|
||||
public static bool IsBgra8(this Format format)
|
||||
{
|
||||
switch (format)
|
||||
{
|
||||
case Format.B8G8R8X8Unorm:
|
||||
case Format.B8G8R8A8Unorm:
|
||||
case Format.B8G8R8X8Srgb:
|
||||
case Format.B8G8R8A8Srgb:
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Checks if the texture format is a depth, stencil or depth-stencil format.
|
||||
/// </summary>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue