glClearColor() 将 iPhone 的渲染利用率推至 27%
搜索答案 这个问题,我遇到了一个相当不舒服的发现。
似乎仅以 60 fps 渲染 glClearColor()
会使 iPhone 的渲染利用率达到 27%。
这意味着,几乎不执行任何操作(仅刷新屏幕),iPhone 就会使用超过四分之一的渲染能力。
这是预期的结果吗?
根据文档,POWERVR 的速度至少应达到 270 兆像素/秒左右。 正如下面正确描述的那样,480×320 在 60 fps 下大约等于 9.2 兆像素/秒,使总性能约为 40 兆像素/秒,这是值得怀疑的。
As a result of the search for an answer of this question, I ran into a rather uncomfortable finding.
It seems that rendering only glClearColor()
at 60 fps pushes the iPhone at 27% render utilization.
That means that doing hardly anything at all - only refreshing the screen - makes the iPhone use more than a quarter of its render capacity.
Is this to be expected?
The POWERVR should hit around 270 megapixels/second at least, according to the documentation. As unwind correctly stated below, 480×320 at 60 fps equals about 9.2 megapixels/second, putting the total performance at around 40 megapixels/second, wich is suspicious.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这仅意味着您应该设计渲染以使用实际内容填充每帧的所有像素,因此您根本不需要清除帧缓冲区。 这至少是解决清算瓶颈的经典“解决方案”:不要这样做。
例如,在典型的第一人称引擎中,这是通过渲染始终覆盖整个视口的天空盒和地面“平面”来实现的。
我还没有阅读 iPhone 渲染子系统的详细信息,但它似乎确实表明填充率非常低。 480×320 在 60 fps 下大约等于 9.2 兆像素/秒,使总性能约为 40。听起来很可疑。
This just means that you should design your rendering to fill all pixels every frame with actual content, so you don't need to clear the framebuffer at all. That is, at least, the classic "solution" to the bottleneck of clearing: don't do it.
In typical first-person engines, for instance, this is achieved by rendering a skybox and a ground "plane", that always cover the entire viewport.
I haven't read up on the details of the iPhone's rendering subsystem, but it does seem to indicate a very low fill-rate. 480×320 at 60 fps equals about 9.2 megapixels/second, putting the total performance at around 40. Sounds suspicious.