mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-07-01 12:46:25 +02:00
Implement scaled vertex format emulation (#5564)
* Implement scaled vertex format emulation * Auto-format (whitespace) * Delete ToVec4Type
This commit is contained in:
parent
492a046335
commit
effd546331
12 changed files with 164 additions and 8 deletions
|
@ -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];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue