aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Gpu/State
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2020-03-29 23:11:24 -0300
committerGitHub <noreply@github.com>2020-03-30 13:11:24 +1100
commit9948a7be53a9846b9de493653aa76819ff1b9bd3 (patch)
treee5a60c309ac22d3077e6d80c67e03bb4920c0b42 /Ryujinx.Graphics.Gpu/State
parent8f21db810d0e8dc5577780dee3001117084768d4 (diff)
Support constant attributes (with a value of zero) (#1066)
* Support constant attributes (with a value of zero) * Remove extra line
Diffstat (limited to 'Ryujinx.Graphics.Gpu/State')
-rw-r--r--Ryujinx.Graphics.Gpu/State/VertexAttribState.cs9
1 files changed, 9 insertions, 0 deletions
diff --git a/Ryujinx.Graphics.Gpu/State/VertexAttribState.cs b/Ryujinx.Graphics.Gpu/State/VertexAttribState.cs
index 897da797..c22b1ca9 100644
--- a/Ryujinx.Graphics.Gpu/State/VertexAttribState.cs
+++ b/Ryujinx.Graphics.Gpu/State/VertexAttribState.cs
@@ -17,6 +17,15 @@ namespace Ryujinx.Graphics.Gpu.State
}
/// <summary>
+ /// Unpacks the attribute constant flag.
+ /// </summary>
+ /// <returns>True if the attribute is constant, false otherwise</returns>
+ public bool UnpackIsConstant()
+ {
+ return (Attribute & 0x40) != 0;
+ }
+
+ /// <summary>
/// Unpacks the offset, in bytes, of the attribute on the vertex buffer.
/// </summary>
/// <returns>Attribute offset in bytes</returns>