diff options
author | Eric Anholt <eric@anholt.net> | 2006-08-28 22:11:18 -0700 |
---|---|---|
committer | Damien Lespiau <damien.lespiau@intel.com> | 2013-03-04 15:54:22 +0000 |
commit | 6a88ada7e8b1ea241c037137d7f88ab22a0e1812 (patch) | |
tree | 6a1cbb38e44d28e411a245be025153d856bc37fd /assembler/gen4asm.h | |
parent | 2a0f135784ebdf24917da1a8fd1f4a1c08a358eb (diff) |
Add support for swizzle control on source operands.
This required restructuring to store source operands in a new structure rather
than being stored in instructions, as swizzle is align16-only and shares
storage with other fields for align1 mode.
These changes were not tested on real programs using swizzle.
Diffstat (limited to 'assembler/gen4asm.h')
-rw-r--r-- | assembler/gen4asm.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/assembler/gen4asm.h b/assembler/gen4asm.h index 3f3db30b7..eb06e02f6 100644 --- a/assembler/gen4asm.h +++ b/assembler/gen4asm.h @@ -26,6 +26,8 @@ * */ +#include <sys/types.h> + typedef unsigned char GLubyte; typedef short GLshort; typedef unsigned int GLuint; @@ -37,6 +39,26 @@ typedef float GLfloat; void yyerror (char *msg); /** + * This structure is the internal representation of source operands in the + * parser. + */ +struct src_operand { + int reg_file, reg_nr, subreg_nr, reg_type; + + int abs, negate; + + int horiz_stride, width, vert_stride; + + int address_mode; /* 0 if direct, 1 if register-indirect */ + int indirect_offset; /* XXX */ + + int swizzle_set; + int swizzle_x, swizzle_y, swizzle_z, swizzle_w; + + uint32_t imm32; /* only set if reg_file == BRW_IMMEDIATE_VALUE */ +} src_operand; + +/** * This structure is just the list container for instructions accumulated by * the parser. */ |