Is it legal to copy contents of one hlsl array to another using assignment on these arrays?

陌路散爱 提交于 2019-12-13 15:18:45

问题


In HLSL I have two arrays:

int arr1[2]; 
int arr2[2];

I need to copy contents of arr1 to arr2.

Should I iterate through every element?

arr2[0] = arr1[0]; 
arr2[1] = arr1[1];

Is there any specific HLSL tool (like memcpy() in C/C++)?

Or could I just write arr2 = arr1; and that will work for me?

来源:https://stackoverflow.com/questions/54041733/is-it-legal-to-copy-contents-of-one-hlsl-array-to-another-using-assignment-on-th

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