Fix Non-Float Textures + Image Read + FSI Buffers

Fixes Mario Party Superstars
This commit is contained in:
Isaac Marovitz
2024-08-01 14:23:56 +01:00
committed by Evan Husted
parent 341e4e5fb1
commit 5d59c552e7
3 changed files with 13 additions and 7 deletions

View File

@@ -156,7 +156,7 @@ namespace Ryujinx.Graphics.Shader
return typeName;
}
public static string ToMslTextureType(this SamplerType type, bool image = false)
public static string ToMslTextureType(this SamplerType type, AggregateType aggregateType, bool image = false)
{
string typeName;
@@ -192,7 +192,14 @@ namespace Ryujinx.Graphics.Shader
typeName += "_array";
}
return $"{typeName}<float{(image ? ", access::read_write" : "")}>";
var format = aggregateType switch
{
AggregateType.S32 => "int",
AggregateType.U32 => "uint",
_ => "float"
};
return $"{typeName}<{format}{(image ? ", access::read_write" : "")}>";
}
}
}