From 6a88ada7e8b1ea241c037137d7f88ab22a0e1812 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 28 Aug 2006 22:11:18 -0700 Subject: 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. --- assembler/gen4asm.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'assembler/gen4asm.h') diff --git a/assembler/gen4asm.h b/assembler/gen4asm.h index 3f3db30b..eb06e02f 100644 --- a/assembler/gen4asm.h +++ b/assembler/gen4asm.h @@ -26,6 +26,8 @@ * */ +#include + typedef unsigned char GLubyte; typedef short GLshort; typedef unsigned int GLuint; @@ -36,6 +38,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. -- cgit v1.2.3