freedreno/ir3: take reg->num out of union in ir3_register
authorHyunjun Ko <zzoon@igalia.com>
Thu, 25 Oct 2018 08:26:19 +0000 (17:26 +0900)
committerRob Clark <robdclark@gmail.com>
Thu, 25 Oct 2018 22:45:45 +0000 (18:45 -0400)
To avoid wrong result when identifying the type of register.
Ie. If the reg is an array, it might be identified as address or
predicate register.

Fixes: dEQP-GLES31.functional.ssbo.layout.random.arrays_of_arrays.6
Signed-off-by: Rob Clark <robdclark@gmail.com>
src/gallium/drivers/freedreno/ir3/ir3.h

index 3055c10f1ddb96fdda1b0494cce5d9981020ca5e..1f47cef7e01e7f47fb0f4a669813710111811095 100644 (file)
@@ -95,12 +95,13 @@ struct ir3_register {
                IR3_REG_ARRAY  = 0x8000,
 
        } flags;
+
+       /* normal registers:
+        * the component is in the low two bits of the reg #, so
+        * rN.x becomes: (N << 2) | x
+        */
+       int   num;
        union {
-               /* normal registers:
-                * the component is in the low two bits of the reg #, so
-                * rN.x becomes: (N << 2) | x
-                */
-               int   num;
                /* immediate: */
                int32_t  iim_val;
                uint32_t uim_val;