shader-slang / slang

Making it easier to work with shaders
MIT License
1.81k stars 161 forks source link

Use memcpy to replace strncpy_s #4270

Closed kaizhangNV closed 1 month ago

kaizhangNV commented 1 month ago

Use memcpy to replace strncpy_s in SlangProfiler::SlangProfiler to fix the error in Windows.

jkwak-work commented 1 month ago

I think a better question is whether we should copy the name of functions.`I think it will add a relatively high cost for performance, which will add more noise to the performance result. It will be better if the user can provide a literal string and we keep the pointer to them.