shader: Use memset to reset instruction arguments

This commit is contained in:
ReinUsesLisp 2021-04-21 02:43:44 -03:00 committed by ameerj
parent 9edc2bd70f
commit 1a44a5cafa
2 changed files with 7 additions and 4 deletions

View file

@ -279,8 +279,10 @@ void Inst::ClearArgs() {
if (!value.IsImmediate()) {
UndoUse(value);
}
value = {};
}
// Reset arguments to null
// std::memset was measured to be faster on MSVC than std::ranges:fill
std::memset(&args, 0, sizeof(args));
}
}