mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-21 14:56:18 +00:00
assembler: Get rid of src operand's swizzle_set
swizzle_set can be derived from the value of swizzle itself, no need for that field. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
This commit is contained in:
parent
a82722b60f
commit
c13613ea2d
@ -96,7 +96,6 @@ struct src_operand {
|
|||||||
int address_mode; /* 0 if direct, 1 if register-indirect */
|
int address_mode; /* 0 if direct, 1 if register-indirect */
|
||||||
int indirect_offset; /* XXX */
|
int indirect_offset; /* XXX */
|
||||||
|
|
||||||
int swizzle_set;
|
|
||||||
unsigned swizzle: 8;
|
unsigned swizzle: 8;
|
||||||
|
|
||||||
uint32_t imm32; /* set if reg_file == BRW_IMMEDIATE_VALUE or it is expressing a branch offset */
|
uint32_t imm32; /* set if reg_file == BRW_IMMEDIATE_VALUE or it is expressing a branch offset */
|
||||||
|
@ -1891,7 +1891,6 @@ directsrcoperand: negate abs symbol_reg region regtype
|
|||||||
$$.default_region = $4.is_default;
|
$$.default_region = $4.is_default;
|
||||||
$$.negate = $1;
|
$$.negate = $1;
|
||||||
$$.abs = $2;
|
$$.abs = $2;
|
||||||
$$.swizzle_set = $6.swizzle_set;
|
|
||||||
$$.swizzle = $6.swizzle;
|
$$.swizzle = $6.swizzle;
|
||||||
}
|
}
|
||||||
| srcarchoperandex
|
| srcarchoperandex
|
||||||
@ -1911,7 +1910,6 @@ indirectsrcoperand:
|
|||||||
$$.horiz_stride = $4.horiz_stride;
|
$$.horiz_stride = $4.horiz_stride;
|
||||||
$$.negate = $1;
|
$$.negate = $1;
|
||||||
$$.abs = $2;
|
$$.abs = $2;
|
||||||
$$.swizzle_set = $6.swizzle_set;
|
|
||||||
$$.swizzle = $6.swizzle;
|
$$.swizzle = $6.swizzle;
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
@ -2389,17 +2387,14 @@ srcimmtype: /* empty */
|
|||||||
*/
|
*/
|
||||||
swizzle: /* empty */
|
swizzle: /* empty */
|
||||||
{
|
{
|
||||||
$$.swizzle_set = 0;
|
|
||||||
$$.swizzle = BRW_SWIZZLE_NOOP;
|
$$.swizzle = BRW_SWIZZLE_NOOP;
|
||||||
}
|
}
|
||||||
| DOT chansel
|
| DOT chansel
|
||||||
{
|
{
|
||||||
$$.swizzle_set = 1;
|
|
||||||
$$.swizzle = BRW_SWIZZLE4($2, $2, $2, $2);
|
$$.swizzle = BRW_SWIZZLE4($2, $2, $2, $2);
|
||||||
}
|
}
|
||||||
| DOT chansel chansel chansel chansel
|
| DOT chansel chansel chansel chansel
|
||||||
{
|
{
|
||||||
$$.swizzle_set = 1;
|
|
||||||
$$.swizzle = BRW_SWIZZLE4($2, $3, $4, $5);
|
$$.swizzle = BRW_SWIZZLE4($2, $3, $4, $5);
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
@ -2875,7 +2870,7 @@ int set_instruction_src0(struct brw_instruction *instr,
|
|||||||
instr->bits2.da1.src0_negate = src->negate;
|
instr->bits2.da1.src0_negate = src->negate;
|
||||||
instr->bits2.da1.src0_abs = src->abs;
|
instr->bits2.da1.src0_abs = src->abs;
|
||||||
instr->bits2.da1.src0_address_mode = src->address_mode;
|
instr->bits2.da1.src0_address_mode = src->address_mode;
|
||||||
if (src->swizzle_set) {
|
if (src->swizzle && src->swizzle != BRW_SWIZZLE_NOOP) {
|
||||||
fprintf(stderr, "error: swizzle bits set in align1 "
|
fprintf(stderr, "error: swizzle bits set in align1 "
|
||||||
"instruction\n");
|
"instruction\n");
|
||||||
return 1;
|
return 1;
|
||||||
@ -2902,7 +2897,7 @@ int set_instruction_src0(struct brw_instruction *instr,
|
|||||||
instr->bits2.ia1.src0_horiz_stride = src->horiz_stride;
|
instr->bits2.ia1.src0_horiz_stride = src->horiz_stride;
|
||||||
instr->bits2.ia1.src0_width = src->width;
|
instr->bits2.ia1.src0_width = src->width;
|
||||||
instr->bits2.ia1.src0_vert_stride = src->vert_stride;
|
instr->bits2.ia1.src0_vert_stride = src->vert_stride;
|
||||||
if (src->swizzle_set) {
|
if (src->swizzle && src->swizzle != BRW_SWIZZLE_NOOP) {
|
||||||
fprintf(stderr, "error: swizzle bits set in align1 "
|
fprintf(stderr, "error: swizzle bits set in align1 "
|
||||||
"instruction\n");
|
"instruction\n");
|
||||||
return 1;
|
return 1;
|
||||||
@ -2953,7 +2948,7 @@ int set_instruction_src1(struct brw_instruction *instr,
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
if (src->swizzle_set) {
|
if (src->swizzle && src->swizzle != BRW_SWIZZLE_NOOP) {
|
||||||
fprintf(stderr, "error: swizzle bits set in align1 "
|
fprintf(stderr, "error: swizzle bits set in align1 "
|
||||||
"instruction\n");
|
"instruction\n");
|
||||||
return 1;
|
return 1;
|
||||||
@ -2985,7 +2980,7 @@ int set_instruction_src1(struct brw_instruction *instr,
|
|||||||
instr->bits3.ia1.src1_horiz_stride = src->horiz_stride;
|
instr->bits3.ia1.src1_horiz_stride = src->horiz_stride;
|
||||||
instr->bits3.ia1.src1_width = src->width;
|
instr->bits3.ia1.src1_width = src->width;
|
||||||
instr->bits3.ia1.src1_vert_stride = src->vert_stride;
|
instr->bits3.ia1.src1_vert_stride = src->vert_stride;
|
||||||
if (src->swizzle_set) {
|
if (src->swizzle && src->swizzle != BRW_SWIZZLE_NOOP) {
|
||||||
fprintf(stderr, "error: swizzle bits set in align1 "
|
fprintf(stderr, "error: swizzle bits set in align1 "
|
||||||
"instruction\n");
|
"instruction\n");
|
||||||
return 1;
|
return 1;
|
||||||
@ -3121,6 +3116,5 @@ void set_direct_src_operand(struct src_operand *src, struct brw_reg *reg,
|
|||||||
src->horiz_stride = 0;
|
src->horiz_stride = 0;
|
||||||
src->negate = 0;
|
src->negate = 0;
|
||||||
src->abs = 0;
|
src->abs = 0;
|
||||||
src->swizzle_set = 0;
|
|
||||||
src->swizzle = BRW_SWIZZLE_NOOP;
|
src->swizzle = BRW_SWIZZLE_NOOP;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user