intel/tools: Make swizzle an integer
authorMatt Turner <mattst88@gmail.com>
Wed, 15 Jul 2020 23:13:27 +0000 (16:13 -0700)
committerMatt Turner <mattst88@gmail.com>
Fri, 31 Jul 2020 19:59:24 +0000 (12:59 -0700)
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5956>

src/intel/tools/i965_gram.y

index a98451f15491340356cfc64dc43d2860c39a2e61..89b3601135352dde31103bba6132e6f4b2ea5f8b 100644 (file)
@@ -481,7 +481,8 @@ i965_asm_set_dst_nr(struct brw_codegen *p,
 %type <reg> srcarcoperandex srcaccimm srcarcoperandex_typed srcimm
 %type <reg> indirectgenreg indirectregion
 %type <reg> immreg src reg32 payload directgenreg_list addrparam region
-%type <reg> region_wh swizzle directgenreg directmsgreg indirectmsgreg
+%type <reg> region_wh directgenreg directmsgreg indirectmsgreg
+%type <integer> swizzle
 
 /* registers */
 %type <reg> accreg addrreg channelenablereg controlreg flagreg ipreg
@@ -1658,7 +1659,7 @@ indirectsrcoperand:
                             $4.vstride,
                             $4.width,
                             $4.hstride,
-                            $5.swizzle,
+                            $5,
                             WRITEMASK_X);
 
                $$.address_mode = BRW_ADDRESS_REGISTER_INDIRECT_REGISTER;
@@ -1687,7 +1688,7 @@ directsrcoperand:
                             $4.vstride,
                             $4.width,
                             $4.hstride,
-                            $5.swizzle,
+                            $5,
                             WRITEMASK_X);
        }
        | srcarcoperandex
@@ -2072,15 +2073,15 @@ writemask_w:
 swizzle:
        %empty
        {
-               $$.swizzle = BRW_SWIZZLE_NOOP;
+               $$ = BRW_SWIZZLE_NOOP;
        }
        | DOT chansel
        {
-               $$.swizzle = BRW_SWIZZLE4($2, $2, $2, $2);
+               $$ = BRW_SWIZZLE4($2, $2, $2, $2);
        }
        | DOT chansel chansel chansel chansel
        {
-               $$.swizzle = BRW_SWIZZLE4($2, $3, $4, $5);
+               $$ = BRW_SWIZZLE4($2, $3, $4, $5);
        }
        ;