Fixes
This commit is contained in:
parent
29cca80d9f
commit
1b9377023a
5 changed files with 9 additions and 10 deletions
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -116,7 +116,7 @@ namespace Ryujinx.ShaderTools
|
|||
|
||||
if (options.VertexPassthrough)
|
||||
{
|
||||
program = translatorContext.GenerateVertexPassthroughForCompute();
|
||||
(program, _) = translatorContext.GenerateVertexPassthroughForCompute();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue