diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/vc4/vc4_program.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gallium/drivers/vc4/vc4_program.c b/src/gallium/drivers/vc4/vc4_program.c index 93f99566c52..ec66dae7861 100644 --- a/src/gallium/drivers/vc4/vc4_program.c +++ b/src/gallium/drivers/vc4/vc4_program.c @@ -957,10 +957,15 @@ emit_tgsi_declaration(struct vc4_compile *c, struct tgsi_full_declaration *decl) { switch (decl->Declaration.File) { - case TGSI_FILE_TEMPORARY: + case TGSI_FILE_TEMPORARY: { + uint32_t old_size = c->temps_array_size; resize_qreg_array(c, &c->temps, &c->temps_array_size, (decl->Range.Last + 1) * 4); + + for (int i = old_size; i < c->temps_array_size; i++) + c->temps[i] = qir_uniform_ui(c, 0); break; + } case TGSI_FILE_INPUT: resize_qreg_array(c, &c->inputs, &c->inputs_array_size, |