mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2025-06-28 23:40:47 -07:00
Use dispatch params shared memory size when available
This commit is contained in:
@ -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();
|
||||
|
@ -6,6 +6,8 @@ namespace Ryujinx.Graphics.Shader
|
||||
|
||||
public const string OutQualifierPrefixName = "S_OUT_QUALIFIER";
|
||||
|
||||
public const string SharedMemorySize = "S_SHARED_MEMORY_SIZE";
|
||||
|
||||
public const string LocalSizeX = "S_LOCAL_SIZE_X";
|
||||
public const string LocalSizeY = "S_LOCAL_SIZE_Y";
|
||||
public const string LocalSizeZ = "S_LOCAL_SIZE_Z";
|
||||
|
Reference in New Issue
Block a user