Ejemplo n.º 1
0
        public override void CollectData(ProfilerFrameData frameData)
        {
            FrameGpuTime frameGpuTime = new FrameGpuTime();

            frameGpuTime.frameIdx = frameData.frameIndex;

            foreach (var threadData in frameData.m_ThreadData)
            {
                AddGpuSampleByThread(threadData, frameGpuTime);
            }
            this.frameGpuTimes.Add(frameGpuTime);
        }
Ejemplo n.º 2
0
 private void AddGpuSampleByThread(ThreadData thread, FrameGpuTime frameGpuTime)
 {
     if (thread == null)
     {
         return;
     }
     if (thread.m_GPUTimeSamples == null)
     {
         return;
     }
     foreach (var gpuSample in thread.m_GPUTimeSamples)
     {
         frameGpuTime.AddGpuSample(gpuSample, GetGpuCategoryByCpuSample(thread, gpuSample));
     }
 }