Fix some tessellation related issues (still doesn't work?)

This commit is contained in:
gdk 2021-10-23 00:52:23 -03:00 committed by riperiperi
parent b7bf95c754
commit fa24c41d32
2 changed files with 17 additions and 2 deletions

View file

@ -567,9 +567,16 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Glsl
private static void DeclareInputAttributePerPatch(CodeGenContext context, int attr)
{
string layout = string.Empty;
if (context.Config.Options.TargetApi == TargetApi.Vulkan)
{
layout = $"layout (location = {32 + attr}) ";
}
string name = $"{DefaultNames.PerPatchAttributePrefix}{attr}";
context.AppendLine($"patch in vec4 {name};");
context.AppendLine($"{layout}patch in vec4 {name};");
}
private static void DeclareOutputAttributes(CodeGenContext context, StructuredProgramInfo info)
@ -630,9 +637,16 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Glsl
private static void DeclareOutputAttributePerPatch(CodeGenContext context, int attr)
{
string layout = string.Empty;
if (context.Config.Options.TargetApi == TargetApi.Vulkan)
{
layout = $"layout (location = {32 + attr}) ";
}
string name = $"{DefaultNames.PerPatchAttributePrefix}{attr}";
context.AppendLine($"patch out vec4 {name};");
context.AppendLine($"{layout}patch out vec4 {name};");
}
private static void DeclareSupportUniformBlock(CodeGenContext context, ShaderStage stage, int scaleElements)

View file

@ -341,6 +341,7 @@ namespace Ryujinx.Graphics.Vulkan
ShaderImageGatherExtended = true,
// ShaderStorageImageReadWithoutFormat = true,
// ShaderStorageImageWriteWithoutFormat = true,
TessellationShader = true,
VertexPipelineStoresAndAtomics = true
};