VR系列——Oculus Rift 开发者指南:三、Oculus Rift的渲染(八)

来源:互联网 发布:三菱fx2n编程手册 编辑:程序博客网 时间:2024/05/16 01:02

排队

为了提高CPU和GPU的并行性和增加GPU的处理帧的时间,SDK提供了默认的2.8毫秒的时间提前排队。

当提前队列被禁用,中央处理器在上一帧显示后立即开始处理下一帧。CPU处理完后,GPU处理帧,排序将失真,并且把帧显示给用户。下图显示了在没有提前排队时,GPU和CPU的利用率:


这里写图片描述
图6:CPU和GPU使用提前排队时的利用率:

如果GPU无法及时处理以显示帧,将显示前一帧。这将导致画面抖动。

提前排队可用时,CPU可以更早地启动;这为GPU提供了更多的时间来处理帧。下面的图形显示了CPU和GPU的利用队列提前启用:


这里写图片描述
图7:CPU和GPU提前排队时的利用率

如果你需要禁用提前,请求:

ovr_SetBool(Hmd, “QueueAheadEnabled”, ovrFalse);

原文如下


Queue Ahead

To improve CPU and GPU parallelism and increase the amount of time that the GPU has to process a frame, the SDK now provides 2.8 milliseconds of queue ahead time by default.

When queue ahead is disabled, the CPU begins processing the next frame immediately after the previous frame displays. After the CPU finishes, the GPU processes the frame, the compositor applies distortion, and the frame is displayed to the user. The following graphic shows CPU and GPU utilization without queue ahead:


这里写图片描述
Figure 6: CPU and GPU Utilization without Queue Ahead

If the GPU cannot process the frame in time for display, the previous frame displays. This results in judder.

When queue ahead is enabled, the CPU can start earlier; this provides the GPU more time to process the frame. The following graphic shows CPU and GPU utilization with queue ahead enabled:


这里写图片描述
Figure 7: CPU and GPU Utilization with Queue Ahead

If you need to disable queue ahead, call:

ovr_SetBool(Hmd, “QueueAheadEnabled”, ovrFalse);
阅读全文
0 0
原创粉丝点击