作者:小甜蜜陈诗蓉_614 | 来源:互联网 | 2023-07-04 11:36
unabletounrollloop,loopdoesnotappeartoterminateinatimelymanner(1024iterations)原本代码for(inti
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 报错