radv/meta: fix uninitialised stack memory usage.
==10199== Conditional jump or move depends on uninitialised value(s) ==10199== at 0xA107B13: radv_resume_queries (radv_meta.c:93) ==10199== by 0xA108097: radv_meta_restore (radv_meta.c:225) ==10199== Uninitialised value was created by a stack allocation ==10199== at 0xA1145B2: fill_buffer_shader (radv_meta_buffer.c:171) saved_state is never memset, so the value should be inited. Cc: mesa-stable Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23327>
This commit is contained in:
@@ -127,6 +127,7 @@ radv_meta_save(struct radv_meta_saved_state *state, struct radv_cmd_buffer *cmd_
|
||||
assert(flags & (RADV_META_SAVE_GRAPHICS_PIPELINE | RADV_META_SAVE_COMPUTE_PIPELINE));
|
||||
|
||||
state->flags = flags;
|
||||
state->active_occlusion_queries = 0;
|
||||
state->active_prims_gen_gds_queries = 0;
|
||||
state->active_prims_xfb_gds_queries = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user