mirror of
https://github.com/GreemDev/Ryujinx.git
synced 2025-01-24 05:54:56 +03:00
declare local memory
This commit is contained in:
parent
913f25b2a0
commit
d5b98d6187
@ -28,6 +28,8 @@ namespace Ryujinx.Graphics.Metal
|
|||||||
{
|
{
|
||||||
Logger.Warning?.Print(LogClass.Gpu, $"Shader linking failed: \n{StringHelper.String(libraryError.LocalizedDescription)}");
|
Logger.Warning?.Print(LogClass.Gpu, $"Shader linking failed: \n{StringHelper.String(libraryError.LocalizedDescription)}");
|
||||||
_status = ProgramLinkStatus.Failure;
|
_status = ProgramLinkStatus.Failure;
|
||||||
|
Console.WriteLine(shader.Code);
|
||||||
|
throw new NotImplementedException();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -63,6 +63,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Msl
|
|||||||
|
|
||||||
public static void DeclareLocals(CodeGenContext context, StructuredFunction function, ShaderStage stage)
|
public static void DeclareLocals(CodeGenContext context, StructuredFunction function, ShaderStage stage)
|
||||||
{
|
{
|
||||||
|
DeclareMemories(context, context.Properties.LocalMemories.Values, isShared: false);
|
||||||
switch (stage)
|
switch (stage)
|
||||||
{
|
{
|
||||||
case ShaderStage.Vertex:
|
case ShaderStage.Vertex:
|
||||||
@ -106,6 +107,15 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Msl
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static void DeclareMemories(CodeGenContext context, IEnumerable<MemoryDefinition> memories, bool isShared)
|
||||||
|
{
|
||||||
|
foreach (var memory in memories)
|
||||||
|
{
|
||||||
|
var typeName = GetVarTypeName(context, memory.Type & ~AggregateType.Array);
|
||||||
|
context.AppendLine($"{typeName} {memory.Name}[{memory.ArrayLength}];");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private static void DeclareInputAttributes(CodeGenContext context, IEnumerable<IoDefinition> inputs)
|
private static void DeclareInputAttributes(CodeGenContext context, IEnumerable<IoDefinition> inputs)
|
||||||
{
|
{
|
||||||
if (context.Definitions.IaIndexing)
|
if (context.Definitions.IaIndexing)
|
||||||
|
Loading…
Reference in New Issue
Block a user