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
|
@ -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)
|
||||
{
|
||||
VertexAttribType.Sint => AttributeType.Sint,
|
||||
VertexAttribType.Uint => AttributeType.Uint,
|
||||
_ => AttributeType.Float,
|
||||
};
|
||||
value = type switch
|
||||
{
|
||||
VertexAttribType.Sint => AttributeType.Sint,
|
||||
VertexAttribType.Uint => AttributeType.Uint,
|
||||
_ => AttributeType.Float,
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
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)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue