什么是着色器 (Shader)占用率(Occupancy)? 为什么我们应该关心它?
I had a good question through Twitter DMs about what occupancy is and why is it important for shader performance, I am expanding my answer into a quick blog post.
我通过 Twitter DMs 看到了一个很好的问题,关于占用率是什么以及为什么它对着色器性能很重要,我将把我的答案扩展到一篇快速的博客文章中。
First some context, GPUs, while running a shader program, batch together 64 or 32 pixels or vertices (called wavefronts on AMD or warps on NVidia) and execute a single instruction on all of them in one go.
首先是一些上下文环境,GPU,当其运行着色程序时,将 64 或 32 个像素或顶点(在 AMD 上称为 wavefronts
,在 NVidia 上称为 warps
)一起批处理,并一次性对所有的程序执行一条指令 。
Typically, instructions that fetch data from memory have a lot of latency (i.e. the time between issuing the instruction and getting the result back is long), due to having to reach out to caches and maybe RAM to fetch data.
</
文章来源: panda1234lee.blog.csdn.net,作者:panda1234lee,版权归原作者所有,如需转载,请联系作者。
原文链接:panda1234lee.blog.csdn.net/article/details/125197647
- 点赞
- 收藏
- 关注作者
评论(0)