Skip to content
Discussion options

You must be logged in to vote

实际上我们绝大部分GPU资源都是提前统一创建的,
你可以关注一下ResourceTask的子类,整个这类task都是在RenderTask之前执行,特别是那些含有提交数据的资源一定是提前集中创建,不然会引起渲染过程中的同步卡顿。小部分纹理(主要是纯RT)是用的时候创建,是因为方便进入回收池在一帧内最大化复用,加上单纯的创建操作不涉及提交数据的话并不会造成卡顿问题,所以RT都是延迟的。还有一类是program资源,理论上应该是提前创建的,但是program基本上很少会频繁创建,创建一次就持续缓存使用,所以暂时没有专门去优化提前它。

Replies: 3 comments 6 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by domchen
Comment options

You must be logged in to vote
2 replies
@domchen
Comment options

@0x1306a94
Comment options

Comment options

You must be logged in to vote
4 replies
@0x1306a94
Comment options

@yuerolling
Comment options

@0x1306a94
Comment options

@domchen
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants