文档

Unity Engine

Unity Engine

supportsGraphicsFence

true if the platform supports GraphicsFences, otherwise false.
阅读时间1 分钟最后更新于 1 个月前

Definition

  • Type: Property
  • Namespace: UnityEngine
  • Assembly: UnityEngine.CoreModule
public static bool supportsGraphicsFence { get; }

Remarks

Graphics fences are supported on all platforms that support compute shaders.
A value of true doesn't mean that a GraphicsFence works on every platform. Graphics.CreateGraphicsFence and CommandBuffer.CreateGraphicsFence create an GraphicsFenceType.AsyncQueueSynchronisation fence. That type synchronizes with the async compute queue, so it also requires SystemInfo.supportsAsyncCompute. When this property is true and SystemInfo.supportsAsyncCompute is false, reading GraphicsFence.passed on that fence throws a
NotSupportedException
.