mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 05:08:08 +02:00
vc4: initialize register
While this is likely not necessary, it fixes an issue detected by static analyzer: the left operand of '<=' is a garbage value. Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com> Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com> Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34050>
This commit is contained in:
parent
6d6a3ab679
commit
54db7c46fa
2 changed files with 4 additions and 3 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue