Fix thread_index_in_simdgroup outside of compute
This commit is contained in:
parent
ad43ad7d81
commit
15e4d4e891
1 changed files with 8 additions and 0 deletions
|
@ -80,6 +80,14 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Msl
|
||||||
context.AppendLine("FragmentOut out;");
|
context.AppendLine("FragmentOut out;");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: Only add if necessary
|
||||||
|
if (stage != ShaderStage.Compute)
|
||||||
|
{
|
||||||
|
// MSL does not give us access to [[thread_index_in_simdgroup]]
|
||||||
|
// outside compute. But we may still need to provide this value in frag/vert.
|
||||||
|
context.AppendLine("uint thread_index_in_simdgroup = simd_prefix_exclusive_sum(1);");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (AstOperand decl in function.Locals)
|
foreach (AstOperand decl in function.Locals)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue