offset storage buffer bindings by 15
This commit is contained in:
parent
f56117a5c7
commit
262452f586
2 changed files with 4 additions and 2 deletions
|
@ -129,7 +129,8 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Msl
|
|||
foreach (var storageBuffers in context.Properties.StorageBuffers.Values)
|
||||
{
|
||||
var varType = storageBuffers.Type.Fields[0].Type & ~AggregateType.Array;
|
||||
args = args.Append($"device {Declarations.GetVarTypeName(context, varType)} *{storageBuffers.Name} [[buffer({storageBuffers.Binding})]]").ToArray();
|
||||
// Offset the binding by 15 to avoid clashing with the constant buffers
|
||||
args = args.Append($"device {Declarations.GetVarTypeName(context, varType)} *{storageBuffers.Name} [[buffer({15 + storageBuffers.Binding})]]").ToArray();
|
||||
}
|
||||
|
||||
foreach (var texture in context.Properties.Textures.Values)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue