Archived
1
0
Fork 0
forked from Mirror/Ryujinx
This repository has been archived on 2024-10-11. You can view files and clone it, but cannot push or open issues or pull requests.
jinx/Ryujinx.Graphics.Gpu/State/CopyBufferSwizzle.cs

37 lines
1.1 KiB
C#
Raw Normal View History

2019-10-13 06:02:07 +00:00
namespace Ryujinx.Graphics.Gpu.State
{
/// <summary>
/// Buffer to buffer copy vector swizzle parameters.
/// </summary>
2019-10-13 06:02:07 +00:00
struct CopyBufferSwizzle
{
public uint Swizzle;
/// <summary>
/// Unpacks the size of each vector component of the copy.
/// </summary>
/// <returns>Vector component size</returns>
2019-10-13 06:02:07 +00:00
public int UnpackComponentSize()
{
return (int)((Swizzle >> 16) & 3) + 1;
}
/// <summary>
/// Unpacks the number of components of the source vector of the copy.
/// </summary>
/// <returns>Number of vector components</returns>
2019-10-13 06:02:07 +00:00
public int UnpackSrcComponentsCount()
{
return (int)((Swizzle >> 20) & 7) + 1;
}
/// <summary>
/// Unpacks the number of components of the destination vector of the copy.
/// </summary>
/// <returns>Number of vector components</returns>
2019-10-13 06:02:07 +00:00
public int UnpackDstComponentsCount()
{
return (int)((Swizzle >> 24) & 7) + 1;
}
}
}