static public int constructor(IntPtr l)
 {
     try {
                     #if DEBUG
         var    method     = System.Reflection.MethodBase.GetCurrentMethod();
         string methodName = GetMethodName(method);
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.BeginSample(methodName);
                     #else
         Profiler.BeginSample(methodName);
                     #endif
                     #endif
         UnityEngine.Rendering.GPUFence o;
         o = new UnityEngine.Rendering.GPUFence();
         pushValue(l, true);
         pushValue(l, o);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
             #if DEBUG
     finally {
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.EndSample();
                     #else
         Profiler.EndSample();
                     #endif
     }
             #endif
 }
        public GPUFence CreateGPUFence(SynchronisationStage stage)
        {
            GPUFence newFence = new GPUFence();

            newFence.m_Ptr = CreateGPUFence_Internal(stage);
            newFence.InitPostAllocation();
            newFence.Validate();
            return(newFence);
        }
        public void WaitOnGPUFence(GPUFence fence, SynchronisationStage stage)
        {
            fence.Validate();

            //Don't wait on a fence that's already known to have passed
            if (fence.IsFencePending())
            {
                WaitOnGPUFence_Internal(fence.m_Ptr, stage);
            }
        }
Exemple #4
0
 static public int constructor(IntPtr l)
 {
     try {
         UnityEngine.Rendering.GPUFence o;
         o = new UnityEngine.Rendering.GPUFence();
         pushValue(l, true);
         pushValue(l, o);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Exemple #5
0
 internal void InitPostAllocation()
 {
     if (this.m_Ptr == IntPtr.Zero)
     {
         if (SystemInfo.supportsGPUFence)
         {
             throw new NullReferenceException("The internal fence ptr is null, this should not be possible for fences that have been correctly constructed using Graphics.CreateGPUFence() or CommandBuffer.CreateGPUFence()");
         }
         this.m_Version = this.GetPlatformNotSupportedVersion();
     }
     else
     {
         this.m_Version = GPUFence.GetVersionNumber(this.m_Ptr);
     }
 }
Exemple #6
0
 public void WaitOnGPUFence(GPUFence fence)
 {
 }
Exemple #7
0
 public void WaitOnGPUFence(GPUFence fence, SynchronisationStage stage)
 {
 }
 public void WaitOnGPUFence(GPUFence fence)
 {
     WaitOnGPUFence(fence, SynchronisationStage.VertexProcessing);
 }
Exemple #9
0
 internal bool IsFencePending()
 {
     return(!(this.m_Ptr == IntPtr.Zero) && this.m_Version == GPUFence.GetVersionNumber(this.m_Ptr));
 }