mirror of
https://gitee.com/openharmony/third_party_mesa3d
synced 2024-11-23 23:41:13 +00:00
panfrost: Zero initialize blend_shaders
Fixes an invalid read caught by valgrind when there is a hole in the
valid render target mask:
==6749== Conditional jump or move depends on uninitialised value(s)
==6749== at 0x5E88EC0: panfrost_prepare_fs_state (pan_cmdstream.c:417)
==6749== by 0x5E88EC0: panfrost_emit_frag_shader (pan_cmdstream.c:501)
==6749== by 0x5E88EC0: panfrost_emit_frag_shader_meta (pan_cmdstream.c:573)
==6749== by 0x5E88EC0: panfrost_update_state_fs (pan_cmdstream.c:2593)
==6749== by 0x5E8B0BF: panfrost_direct_draw (pan_cmdstream.c:2839)
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Fixes: a124c47b9f
("panfrost: Fix NULL derefs in pan_cmdstream.c")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11383>
This commit is contained in:
parent
5c4b54ce96
commit
3113dbd837
@ -571,7 +571,7 @@ panfrost_emit_frag_shader_meta(struct panfrost_batch *batch)
|
||||
PAN_DESC_ARRAY(rt_count, BLEND));
|
||||
#endif
|
||||
|
||||
mali_ptr blend_shaders[PIPE_MAX_COLOR_BUFS];
|
||||
mali_ptr blend_shaders[PIPE_MAX_COLOR_BUFS] = { 0 };
|
||||
unsigned shader_offset = 0;
|
||||
struct panfrost_bo *shader_bo = NULL;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user