diff options
Diffstat (limited to 'src/Ryujinx.Graphics.Gpu/Engine/Threed/SpecializationStateUpdater.cs')
-rw-r--r-- | src/Ryujinx.Graphics.Gpu/Engine/Threed/SpecializationStateUpdater.cs | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/src/Ryujinx.Graphics.Gpu/Engine/Threed/SpecializationStateUpdater.cs b/src/Ryujinx.Graphics.Gpu/Engine/Threed/SpecializationStateUpdater.cs index b2935a5b..e0607fbf 100644 --- a/src/Ryujinx.Graphics.Gpu/Engine/Threed/SpecializationStateUpdater.cs +++ b/src/Ryujinx.Graphics.Gpu/Engine/Threed/SpecializationStateUpdater.cs @@ -218,17 +218,34 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed { bool changed = false; ref Array32<AttributeType> attributeTypes = ref _graphics.AttributeTypes; + bool supportsScaledFormats = _context.Capabilities.SupportsScaledVertexFormats; for (int location = 0; location < state.Length; location++) { VertexAttribType type = state[location].UnpackType(); - AttributeType value = type switch + AttributeType value; + + if (supportsScaledFormats) + { + value = type switch + { + VertexAttribType.Sint => AttributeType.Sint, + VertexAttribType.Uint => AttributeType.Uint, + _ => AttributeType.Float, + }; + } + else { - VertexAttribType.Sint => AttributeType.Sint, - VertexAttribType.Uint => AttributeType.Uint, - _ => AttributeType.Float, - }; + value = type switch + { + VertexAttribType.Sint => AttributeType.Sint, + VertexAttribType.Uint => AttributeType.Uint, + VertexAttribType.Uscaled => AttributeType.Uscaled, + VertexAttribType.Sscaled => AttributeType.Sscaled, + _ => AttributeType.Float, + }; + } if (attributeTypes[location] != value) { |