pan/bi: Zero initialize shader_info
authorAlyssa Rosenzweig <alyssa@collabora.com>
Mon, 19 Jul 2021 17:41:32 +0000 (13:41 -0400)
committerMarge Bot <eric+marge@anholt.net>
Wed, 28 Jul 2021 00:26:06 +0000 (00:26 +0000)
Fixes the following assert with the standalone compiler

bifrost_compiler: ../src/panfrost/bifrost/bi_opt_push_ubo.c:134: bi_opt_push_ubo: Assertion `ctx->info->push.count == 0' failed.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12026>

src/panfrost/bifrost/cmdline.c

index 527ec57..ec7b488 100644 (file)
@@ -107,7 +107,7 @@ compile_shader(int stages, char **files)
                 struct panfrost_compile_inputs inputs = {
                         .gpu_id = 0x7212, /* Mali G52 */
                 };
-                struct pan_shader_info info;
+                struct pan_shader_info info = { 0 };
 
                 util_dynarray_clear(&binary);
                 bifrost_compile_shader_nir(nir[i], &inputs, &binary, &info);