diff --git a/src/gallium/drivers/vc4/vc4_program.c b/src/gallium/drivers/vc4/vc4_program.c index 14508c22e84..06c18d5c011 100644 --- a/src/gallium/drivers/vc4/vc4_program.c +++ b/src/gallium/drivers/vc4/vc4_program.c @@ -399,7 +399,8 @@ ntq_emit_txf(struct vc4_compile *c, nir_tex_instr *instr) static void ntq_emit_tex(struct vc4_compile *c, nir_tex_instr *instr) { - struct qreg s, t, r, lod, compare; + struct qreg lod, compare; + struct qreg r = { 0 }, s= { 0 }, t = { 0 }; bool is_txb = false, is_txl = false; unsigned unit = instr->texture_index; @@ -511,7 +512,7 @@ ntq_emit_tex(struct vc4_compile *c, nir_tex_instr *instr) if (util_format_is_depth_or_stencil(format)) { struct qreg normalized = ntq_scale_depth_texture(c, tex); - struct qreg depth_output; + struct qreg depth_output = { 0 }; struct qreg u0 = qir_uniform_f(c, 0.0f); struct qreg u1 = qir_uniform_f(c, 1.0f); diff --git a/src/gallium/drivers/vc4/vc4_qpu_emit.c b/src/gallium/drivers/vc4/vc4_qpu_emit.c index 3115b555b62..bddc503aaa5 100644 --- a/src/gallium/drivers/vc4/vc4_qpu_emit.c +++ b/src/gallium/drivers/vc4/vc4_qpu_emit.c @@ -295,7 +295,7 @@ vc4_generate_code_block(struct vc4_compile *c, }; uint64_t unpack = 0; - struct qpu_reg src[ARRAY_SIZE(qinst->src)]; + struct qpu_reg src[ARRAY_SIZE(qinst->src)] = { 0 }; for (int i = 0; i < qir_get_nsrc(qinst); i++) { int index = qinst->src[i].index; switch (qinst->src[i].file) {