f09bba82b9
* Implement vertex and geometry shader conversion to compute * Call InitializeReservedCounts for compute too * PR feedback * Set clip distance mask for geometry and tessellation shaders too * Transform feedback emulation only for vertex
28 lines
1.1 KiB
C#
28 lines
1.1 KiB
C#
namespace Ryujinx.Graphics.Shader.Translation
|
|
{
|
|
readonly struct IoUsage
|
|
{
|
|
private readonly FeatureFlags _usedFeatures;
|
|
|
|
public readonly bool UsesRtLayer => _usedFeatures.HasFlag(FeatureFlags.RtLayer);
|
|
public readonly bool UsesViewportIndex => _usedFeatures.HasFlag(FeatureFlags.ViewportIndex);
|
|
public readonly bool UsesViewportMask => _usedFeatures.HasFlag(FeatureFlags.ViewportMask);
|
|
public readonly byte ClipDistancesWritten { get; }
|
|
public readonly int UserDefinedMap { get; }
|
|
|
|
public IoUsage(FeatureFlags usedFeatures, byte clipDistancesWritten, int userDefinedMap)
|
|
{
|
|
_usedFeatures = usedFeatures;
|
|
ClipDistancesWritten = clipDistancesWritten;
|
|
UserDefinedMap = userDefinedMap;
|
|
}
|
|
|
|
public readonly IoUsage Combine(IoUsage other)
|
|
{
|
|
return new IoUsage(
|
|
_usedFeatures | other._usedFeatures,
|
|
(byte)(ClipDistancesWritten | other.ClipDistancesWritten),
|
|
UserDefinedMap | other.UserDefinedMap);
|
|
}
|
|
}
|
|
}
|