什么是着色器 (Shader)占用率(Occupancy)? 为什么我们应该关心它?

举报
ShaderJoy 发表于 2022/06/09 22:41:15 2022/06/09
【摘要】 I had a good question through Twitter DMs about what occupancy is and why is it important for shade...

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

【版权声明】本文为华为云社区用户转载文章,如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱: cloudbbs@huaweicloud.com
  • 点赞
  • 收藏
  • 关注作者

评论(0

0/1000
抱歉,系统识别当前为高风险访问,暂不支持该操作

全部回复

上滑加载中

设置昵称

在此一键设置昵称,即可参与社区互动!

*长度不超过10个汉字或20个英文字符,设置后3个月内不可修改。

*长度不超过10个汉字或20个英文字符,设置后3个月内不可修改。