Use dispatch params shared memory size when available
This commit is contained in:
parent
0d9672f3ae
commit
66d91cbc6c
5 changed files with 19 additions and 5 deletions
|
@ -75,7 +75,16 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Glsl
|
|||
|
||||
if (context.Config.Stage == ShaderStage.Compute)
|
||||
{
|
||||
string size = NumberFormatter.FormatInt(context.Config.Capabilities.MaximumComputeSharedMemorySize / 4);
|
||||
string size;
|
||||
|
||||
if ((context.Config.Flags & TranslationFlags.Unspecialized) != 0)
|
||||
{
|
||||
size = DefineNames.SharedMemorySize;
|
||||
}
|
||||
else
|
||||
{
|
||||
size = NumberFormatter.FormatInt(context.Config.Capabilities.MaximumComputeSharedMemorySize / 4);
|
||||
}
|
||||
|
||||
context.AppendLine($"shared uint {DefaultNames.SharedMemoryName}[{size}];");
|
||||
context.AppendLine();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue