码迷,mamicode.com
首页 > 其他好文 > 详细

unable to unroll loop 报错

时间:2017-11-25 18:26:11      阅读:138      评论:0      收藏:0      [点我收藏+]

标签:++   min   ati   最大值   loop   代码   compiler   编译   directx   

unable to unroll loop, loop does not appear to terminate in a timely manner (1024 iterations)
原本代码
for (int i = 0; i < _Loops; i++)
这里的_Loops是运行时,有程序传入的参数,在编译时报错

改写为字面值的最大值
for (int i = 0; i < 50; i++)
{
    ... ...
    if (i >= _Loops)
        break;
}

这个报错是 DirectX shader compiler 报的错

unable to unroll loop 报错

标签:++   min   ati   最大值   loop   代码   compiler   编译   directx   

原文地址:http://www.cnblogs.com/Hichy/p/7895840.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!