1
0
Fork 0
mirror of https://github.com/Ryujinx/Ryujinx.git synced 2024-12-19 08:42:00 +00:00
This commit is contained in:
Isaac Marovitz 2024-05-23 14:47:05 -04:00 committed by Isaac Marovitz
parent 997393bc65
commit f4190bd95a

View file

@ -79,11 +79,7 @@ namespace Ryujinx.Graphics.Metal
public BufferHandle CreateBuffer(int size, BufferAccess access) public BufferHandle CreateBuffer(int size, BufferAccess access)
{ {
var buffer = _device.NewBuffer((ulong)size, MTLResourceOptions.ResourceStorageModeShared); var buffer = _device.NewBuffer((ulong)size, MTLResourceOptions.ResourceStorageModeShared);
if (access == BufferAccess.FlushPersistent)
{
buffer.SetPurgeableState(MTLPurgeableState.NonVolatile); buffer.SetPurgeableState(MTLPurgeableState.NonVolatile);
}
var bufferPtr = buffer.NativePtr; var bufferPtr = buffer.NativePtr;
return Unsafe.As<IntPtr, BufferHandle>(ref bufferPtr); return Unsafe.As<IntPtr, BufferHandle>(ref bufferPtr);
@ -140,6 +136,7 @@ namespace Ryujinx.Graphics.Metal
return new Capabilities( return new Capabilities(
api: TargetApi.Metal, api: TargetApi.Metal,
vendorName: HardwareInfoTools.GetVendor(), vendorName: HardwareInfoTools.GetVendor(),
SystemMemoryType.UnifiedMemory,
hasFrontFacingBug: false, hasFrontFacingBug: false,
hasVectorIndexingBug: true, hasVectorIndexingBug: true,
needsFragmentOutputSpecialization: true, needsFragmentOutputSpecialization: true,