Selective nvidia #pragma optionNV(unroll all)

雨燕双飞 提交于 2019-12-05 23:14:35

According to this post on the NVidia forums, having no keyword afterwards will set it to default behavior:

#pragma unroll 1 will prevent the compiler from ever unrolling a loop.

If no number is specified after #pragma unroll, the loop is completely unrolled if its trip count is constant, otherwise it is not unrolled at all.

I'm not sure if it works on GLSL, but you can maybe try:

#pragma optionNV(unroll)

If anyone tries this, let us know if it works!

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!