From e115c499da276e7cf397a40ae6b71adffae049c8 Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Wed, 15 Jul 2020 16:13:27 -0700 Subject: [PATCH] intel/tools: Make swizzle an integer Reviewed-by: Sagar Ghuge Part-of: --- src/intel/tools/i965_gram.y | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/intel/tools/i965_gram.y b/src/intel/tools/i965_gram.y index a98451f..89b3601 100644 --- a/src/intel/tools/i965_gram.y +++ b/src/intel/tools/i965_gram.y @@ -481,7 +481,8 @@ i965_asm_set_dst_nr(struct brw_codegen *p, %type srcarcoperandex srcaccimm srcarcoperandex_typed srcimm %type indirectgenreg indirectregion %type immreg src reg32 payload directgenreg_list addrparam region -%type region_wh swizzle directgenreg directmsgreg indirectmsgreg +%type region_wh directgenreg directmsgreg indirectmsgreg +%type swizzle /* registers */ %type 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); } ; -- 2.7.4