Skip to content

Commit

Permalink
shader_recompiler: Make sure RuntimeInfo is zero initialized.
Browse files Browse the repository at this point in the history
  • Loading branch information
squidbus committed Oct 10, 2024
1 parent 09cbccb commit d5cd539
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/shader_recompiler/runtime_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,10 @@ struct RuntimeInfo {
ComputeRuntimeInfo cs_info;
};

RuntimeInfo(Stage stage_) : stage{stage_} {}
RuntimeInfo(Stage stage_) {
memset(this, 0, sizeof(*this));
stage = stage_;
}

bool operator==(const RuntimeInfo& other) const noexcept {
switch (stage) {
Expand Down

0 comments on commit d5cd539

Please sign in to comment.