0
0
Fork 0
mirror of https://github.com/GreemDev/Ryujinx.git synced 2024-12-22 23:55:47 +00:00
This commit is contained in:
Gabriel A 2024-07-27 21:04:56 -03:00 committed by Isaac Marovitz
parent 29cca80d9f
commit 1b9377023a
5 changed files with 9 additions and 10 deletions

View file

@ -428,15 +428,14 @@ namespace Ryujinx.Graphics.Gpu.Shader
TranslatorContext lastInVertexPipeline = geometryToCompute ? translatorContexts[4] ?? currentStage : currentStage;
program = lastInVertexPipeline.GenerateVertexPassthroughForCompute();
(program, ShaderProgramInfo vacInfo) = lastInVertexPipeline.GenerateVertexPassthroughForCompute();
infoBuilder.AddStageInfoVac(vacInfo);
}
else
{
geometryAsCompute = CreateHostVertexAsComputeProgram(program, currentStage, tfEnabled);
program = null;
}
infoBuilder.AddStageInfoVac(currentStage.GetVertexAsComputeInfo());
}
if (program != null)

View file

@ -444,8 +444,8 @@ namespace Ryujinx.Graphics.Gpu.Shader
{
ShaderInfoBuilder builder = new(context, tfEnabled, vertexAsCompute: true, computeLocalSize: ComputeSize.VtgAsCompute);
builder.AddStageInfo(info, vertexAsCompute: true);
builder.AddStageInfoVac(info2);
builder.AddStageInfo(info, vertexAsCompute: true);
return builder.Build(null, fromCache);
}

View file

@ -573,7 +573,7 @@ namespace Ryujinx.Graphics.Shader.Translation
return descriptors.ToArray();
}
public ShaderProgramInfo GetVertexAsComputeInfo()
public ShaderProgramInfo GetVertexAsComputeInfo(bool isVertex = false)
{
var cbDescriptors = new BufferDescriptor[_vacConstantBuffers.Count];
int cbDescriptorIndex = 0;
@ -630,7 +630,7 @@ namespace Ryujinx.Graphics.Shader.Translation
sbDescriptors,
tDescriptors,
iDescriptors,
ShaderStage.Compute,
isVertex ? ShaderStage.Vertex : ShaderStage.Compute,
0,
0,
0,

View file

@ -491,7 +491,7 @@ namespace Ryujinx.Graphics.Shader.Translation
_vertexOutput = vertexContext._program.GetIoUsage();
}
public ShaderProgram GenerateVertexPassthroughForCompute()
public (ShaderProgram, ShaderProgramInfo) GenerateVertexPassthroughForCompute()
{
var attributeUsage = new AttributeUsage(GpuAccessor);
var resourceManager = new ResourceManager(ShaderStage.Vertex, GpuAccessor);
@ -571,14 +571,14 @@ namespace Ryujinx.Graphics.Shader.Translation
LastInVertexPipeline = true
};
return Generate(
return (Generate(
new[] { function },
attributeUsage,
definitions,
definitions,
resourceManager,
FeatureFlags.None,
0);
0), resourceManager.GetVertexAsComputeInfo(isVertex: true));
}
public ShaderProgram GenerateGeometryPassthrough()

View file

@ -116,7 +116,7 @@ namespace Ryujinx.ShaderTools
if (options.VertexPassthrough)
{
program = translatorContext.GenerateVertexPassthroughForCompute();
(program, _) = translatorContext.GenerateVertexPassthroughForCompute();
}
else
{