mirror of
https://github.com/GreemDev/Ryujinx
synced 2024-12-04 15:32:17 +01:00
support multiple render targets & fix: incorrect texture name
This commit is contained in:
parent
21029e895a
commit
f08d3a7517
3 changed files with 6 additions and 4 deletions
|
@ -197,7 +197,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Msl
|
||||||
{
|
{
|
||||||
IoVariable.Position => "position",
|
IoVariable.Position => "position",
|
||||||
IoVariable.PointSize => "point_size",
|
IoVariable.PointSize => "point_size",
|
||||||
IoVariable.FragmentOutputColor => "color",
|
IoVariable.FragmentOutputColor => $"color{ioDefinition.Location}",
|
||||||
_ => $"{DefaultNames.OAttributePrefix}{ioDefinition.Location}"
|
_ => $"{DefaultNames.OAttributePrefix}{ioDefinition.Location}"
|
||||||
};
|
};
|
||||||
string suffix = ioDefinition.IoVariable switch
|
string suffix = ioDefinition.IoVariable switch
|
||||||
|
|
|
@ -267,7 +267,8 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Msl.Instructions
|
||||||
return NumberFormatter.FormatInt(0);
|
return NumberFormatter.FormatInt(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
string textureName = "texture";
|
string samplerName = GetSamplerName(context.Properties, texOp);
|
||||||
|
string textureName = $"tex_{samplerName}";
|
||||||
string texCall = textureName + ".";
|
string texCall = textureName + ".";
|
||||||
texCall += $"get_num_samples()";
|
texCall += $"get_num_samples()";
|
||||||
|
|
||||||
|
@ -278,7 +279,8 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Msl.Instructions
|
||||||
{
|
{
|
||||||
AstTextureOperation texOp = (AstTextureOperation)operation;
|
AstTextureOperation texOp = (AstTextureOperation)operation;
|
||||||
|
|
||||||
string textureName = "texture";
|
string samplerName = GetSamplerName(context.Properties, texOp);
|
||||||
|
string textureName = $"tex_{samplerName}";
|
||||||
string texCall = textureName + ".";
|
string texCall = textureName + ".";
|
||||||
|
|
||||||
if (texOp.Index == 3)
|
if (texOp.Index == 3)
|
||||||
|
|
|
@ -19,7 +19,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Msl.Instructions
|
||||||
IoVariable.BaseInstance => ("base_instance", AggregateType.S32),
|
IoVariable.BaseInstance => ("base_instance", AggregateType.S32),
|
||||||
IoVariable.BaseVertex => ("base_vertex", AggregateType.S32),
|
IoVariable.BaseVertex => ("base_vertex", AggregateType.S32),
|
||||||
IoVariable.ClipDistance => ("clip_distance", AggregateType.Array | AggregateType.FP32),
|
IoVariable.ClipDistance => ("clip_distance", AggregateType.Array | AggregateType.FP32),
|
||||||
IoVariable.FragmentOutputColor => ("out.color", AggregateType.Vector4 | AggregateType.FP32),
|
IoVariable.FragmentOutputColor => ($"out.color{location}", AggregateType.Vector4 | AggregateType.FP32),
|
||||||
IoVariable.FragmentOutputDepth => ("depth", AggregateType.FP32),
|
IoVariable.FragmentOutputDepth => ("depth", AggregateType.FP32),
|
||||||
IoVariable.FrontFacing => ("front_facing", AggregateType.Bool),
|
IoVariable.FrontFacing => ("front_facing", AggregateType.Bool),
|
||||||
IoVariable.InstanceId => ("instance_id", AggregateType.S32),
|
IoVariable.InstanceId => ("instance_id", AggregateType.S32),
|
||||||
|
|
Loading…
Reference in a new issue