diff options
| author | gdkchan <gab.dark.100@gmail.com> | 2023-08-16 08:30:33 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-08-16 08:30:33 -0300 |
| commit | effd546331371928bc38bc8a48b0c26c7c59f3e9 (patch) | |
| tree | ec760ee09a3751abd3b5a261ad5be599942a3a35 /src/Ryujinx.Graphics.Shader/Translation | |
| parent | 492a0463358e7706e0fb34537d55810d833ae695 (diff) | |
Implement scaled vertex format emulation (#5564)
* Implement scaled vertex format emulation
* Auto-format (whitespace)
* Delete ToVec4Type
Diffstat (limited to 'src/Ryujinx.Graphics.Shader/Translation')
| -rw-r--r-- | src/Ryujinx.Graphics.Shader/Translation/ShaderDefinitions.cs | 11 | ||||
| -rw-r--r-- | src/Ryujinx.Graphics.Shader/Translation/Translator.cs | 1 |
2 files changed, 11 insertions, 1 deletions
diff --git a/src/Ryujinx.Graphics.Shader/Translation/ShaderDefinitions.cs b/src/Ryujinx.Graphics.Shader/Translation/ShaderDefinitions.cs index d278c42e..204f4278 100644 --- a/src/Ryujinx.Graphics.Shader/Translation/ShaderDefinitions.cs +++ b/src/Ryujinx.Graphics.Shader/Translation/ShaderDefinitions.cs @@ -53,6 +53,8 @@ namespace Ryujinx.Graphics.Shader.Translation public bool OmapSampleMask { get; } public bool OmapDepth { get; } + public bool SupportsScaledVertexFormats { get; } + public bool TransformFeedbackEnabled { get; } private readonly TransformFeedbackOutput[] _transformFeedbackOutputs; @@ -139,6 +141,7 @@ namespace Ryujinx.Graphics.Shader.Translation int omapTargets, bool omapSampleMask, bool omapDepth, + bool supportsScaledVertexFormats, bool transformFeedbackEnabled, ulong transformFeedbackVecMap, TransformFeedbackOutput[] transformFeedbackOutputs) @@ -154,6 +157,7 @@ namespace Ryujinx.Graphics.Shader.Translation OmapSampleMask = omapSampleMask; OmapDepth = omapDepth; LastInVertexPipeline = stage < ShaderStage.Fragment; + SupportsScaledVertexFormats = supportsScaledVertexFormats; TransformFeedbackEnabled = transformFeedbackEnabled; _transformFeedbackOutputs = transformFeedbackOutputs; _transformFeedbackDefinitions = new(); @@ -302,7 +306,7 @@ namespace Ryujinx.Graphics.Shader.Translation if (Stage == ShaderStage.Vertex && !isOutput) { - type |= _graphicsState.AttributeTypes[location].ToAggregateType(); + type |= _graphicsState.AttributeTypes[location].ToAggregateType(SupportsScaledVertexFormats); } else { @@ -311,5 +315,10 @@ namespace Ryujinx.Graphics.Shader.Translation return type; } + + public AttributeType GetAttributeType(int location) + { + return _graphicsState.AttributeTypes[location]; + } } } diff --git a/src/Ryujinx.Graphics.Shader/Translation/Translator.cs b/src/Ryujinx.Graphics.Shader/Translation/Translator.cs index b609ac07..93a70ace 100644 --- a/src/Ryujinx.Graphics.Shader/Translation/Translator.cs +++ b/src/Ryujinx.Graphics.Shader/Translation/Translator.cs @@ -116,6 +116,7 @@ namespace Ryujinx.Graphics.Shader.Translation header.OmapTargets, header.OmapSampleMask, header.OmapDepth, + gpuAccessor.QueryHostSupportsScaledVertexFormats(), transformFeedbackEnabled, transformFeedbackVecMap, transformFeedbackOutputs); |
