$$.address_subreg_nr = $1.address_subreg_nr;
$$.indirect_offset = $1.indirect_offset;
$$.horiz_stride = $2;
- $$.writemask_set = $3.writemask_set;
$$.writemask = $3.writemask;
$$.reg_type = $4.type;
}
*/
writemask: /* empty */
{
- $$.writemask_set = 0;
$$.writemask = BRW_WRITEMASK_XYZW;
}
| DOT writemask_x writemask_y writemask_z writemask_w
{
- $$.writemask_set = 1;
$$.writemask = $2 | $3 | $4 | $5;
}
;
instr->bits1.da1.dest_reg_nr = dest->reg_nr;
instr->bits1.da1.dest_horiz_stride = dest->horiz_stride;
instr->bits1.da1.dest_address_mode = dest->address_mode;
- if (dest->writemask_set) {
+ if (dest->writemask != 0 &&
+ dest->writemask != BRW_WRITEMASK_XYZW) {
fprintf(stderr, "error: write mask set in align1 "
"instruction\n");
return 1;
instr->bits1.ia1.dest_horiz_stride = dest->horiz_stride;
instr->bits1.ia1.dest_indirect_offset = dest->indirect_offset;
instr->bits1.ia1.dest_address_mode = dest->address_mode;
- if (dest->writemask_set) {
+ if (dest->writemask != 0 &&
+ dest->writemask != BRW_WRITEMASK_XYZW) {
fprintf(stderr, "error: write mask set in align1 "
"instruction\n");
return 1;
dst->subreg_nr = reg->subreg_nr;
dst->reg_type = type;
dst->horiz_stride = 1;
- dst->writemask_set = 0;
dst->writemask = BRW_WRITEMASK_XYZW;
}