mirror of
https://github.com/GreemDev/Ryujinx.git
synced 2024-11-24 18:20:12 +01:00
BufferAccess
This commit is contained in:
parent
8da7c42cf8
commit
4104af65a3
@ -54,6 +54,12 @@ namespace Ryujinx.Graphics.Metal
|
||||
public BufferHandle CreateBuffer(int size, BufferAccess access)
|
||||
{
|
||||
var buffer = _device.NewBuffer((ulong)size, MTLResourceOptions.ResourceStorageModeShared);
|
||||
|
||||
if (access == BufferAccess.FlushPersistent)
|
||||
{
|
||||
buffer.SetPurgeableState(MTLPurgeableState.NonVolatile);
|
||||
}
|
||||
|
||||
var bufferPtr = buffer.NativePtr;
|
||||
return Unsafe.As<IntPtr, BufferHandle>(ref bufferPtr);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user