vc4: Initialize pack field of qreg to 0 in qir_get_temp
authorBoyan Ding <boyan.j.ding@gmail.com>
Wed, 26 Aug 2015 11:52:50 +0000 (19:52 +0800)
committerEric Anholt <eric@anholt.net>
Fri, 4 Sep 2015 19:16:07 +0000 (12:16 -0700)
This avoids generation of undefined packing in qir and qpu instructions,
fixing a lot of rendering errors.

Fixes 8b36d107fdd (vc4: Pack the unorm-packing bits into a src MUL
instruction when possible.)

Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Boyan Ding <boyan.j.ding@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
src/gallium/drivers/vc4/vc4_qir.c

index 9d930715f9bff0fe5b20ca08151e052918bb4ba5..073ba5ffc23837a542113cfccc220588c2ee6e3d 100644 (file)
@@ -314,6 +314,7 @@ qir_get_temp(struct vc4_compile *c)
 
         reg.file = QFILE_TEMP;
         reg.index = c->num_temps++;
+        reg.pack = 0;
 
         if (c->num_temps > c->defs_array_size) {
                 uint32_t old_size = c->defs_array_size;