aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/texture_cache/render_targets.h
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2021-07-27 07:41:18 -0400
committerLioncash <mathew1800@gmail.com>2021-07-27 07:41:21 -0400
commit2fa5f631c3b6b06989cda2b4e1a8d3e7cd2693e6 (patch)
tree42d7fe871611242d415857ffffd5acae5f222b89 /src/video_core/texture_cache/render_targets.h
parent08350d17444b697f9401a67a9bc55c7e050875cf (diff)
render_target: Add missing initializer for size extent
Everything else has a default constructor that does the straightforward thing of initializing most members to a default value, except for the size. We explicitly initialize the size (and others, for consistency), to prevent potential uninitialized reads from occurring. Particularly given the largeish surface area that this struct is used in.
Diffstat (limited to 'src/video_core/texture_cache/render_targets.h')
-rw-r--r--src/video_core/texture_cache/render_targets.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/video_core/texture_cache/render_targets.h b/src/video_core/texture_cache/render_targets.h
index 9b9544b076..0cb227d697 100644
--- a/src/video_core/texture_cache/render_targets.h
+++ b/src/video_core/texture_cache/render_targets.h
@@ -24,10 +24,10 @@ struct RenderTargets {
return std::ranges::any_of(color_buffer_ids, contains) || contains(depth_buffer_id);
}
- std::array<ImageViewId, NUM_RT> color_buffer_ids;
- ImageViewId depth_buffer_id;
+ std::array<ImageViewId, NUM_RT> color_buffer_ids{};
+ ImageViewId depth_buffer_id{};
std::array<u8, NUM_RT> draw_buffers{};
- Extent2D size;
+ Extent2D size{};
};
} // namespace VideoCommon