浏览代码

Add support for profiling LWRP cameras

BeginSample and EndSample are per LWRP camera.  Implementation feels clunky, but so be it.
/main
Robert Srinivasiah 7 年前
当前提交
c6431961
共有 1 个文件被更改,包括 8 次插入0 次删除
  1. 8
      ScriptableRenderPipeline/LightweightPipeline/LWRP/LightweightPipeline.cs

8
ScriptableRenderPipeline/LightweightPipeline/LWRP/LightweightPipeline.cs


m_CurrCamera = camera;
m_IsOffscreenCamera = m_CurrCamera.targetTexture != null && m_CurrCamera.cameraType != CameraType.SceneView;
var profilingCmd = CommandBufferPool.Get("");
profilingCmd.BeginSample("LightweightPipeline.Render");
context.ExecuteCommandBuffer(profilingCmd);
CommandBufferPool.Release(profilingCmd);
ScriptableCullingParameters cullingParameters;
if (!CullResults.GetCullingParameters(m_CurrCamera, stereoEnabled, out cullingParameters))
continue;

cmd.ReleaseTemporaryRT(CameraRenderTargetID.depth);
cmd.ReleaseTemporaryRT(CameraRenderTargetID.color);
cmd.ReleaseTemporaryRT(CameraRenderTargetID.copyColor);
cmd.EndSample("LightweightPipeline.Render");
context.ExecuteCommandBuffer(cmd);
CommandBufferPool.Release(cmd);

正在加载...
取消
保存