diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2021-04-21 02:43:44 -0300 |
---|---|---|
committer | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-07-22 21:51:28 -0400 |
commit | f66851e37682ce538172b0945908227ada8d21ac (patch) | |
tree | 2e102ea36e034d7be86abae1165010a1b9612ce7 /src/shader_recompiler/frontend/ir/microinstruction.cpp | |
parent | c84bbd9e44e34bba0e602c1a6736535aa531445c (diff) |
shader: Use memset to reset instruction arguments
Diffstat (limited to 'src/shader_recompiler/frontend/ir/microinstruction.cpp')
-rw-r--r-- | src/shader_recompiler/frontend/ir/microinstruction.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/shader_recompiler/frontend/ir/microinstruction.cpp b/src/shader_recompiler/frontend/ir/microinstruction.cpp index 701746a0cc..e3350931b8 100644 --- a/src/shader_recompiler/frontend/ir/microinstruction.cpp +++ b/src/shader_recompiler/frontend/ir/microinstruction.cpp @@ -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)); } } |