mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-07-23 18:06:18 +00:00
assembler: Make sure nobody adds a field back to struct brw_instruction
Adding something there will break the library, so we might as check for it. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
This commit is contained in:
parent
79c62f1134
commit
c74c80c9a5
@ -55,6 +55,15 @@ extern long int gen_level;
|
||||
|
||||
void yyerror (char *msg);
|
||||
|
||||
#define STRUCT_SIZE_ASSERT(TYPE, SIZE) \
|
||||
typedef struct { \
|
||||
char compile_time_assert_ ## TYPE ## _size[ \
|
||||
(sizeof (struct TYPE) == (SIZE)) ? 1 : -1]; \
|
||||
} _ ## TYPE ## SizeCheck
|
||||
|
||||
/* ensure nobody changes the size of struct brw_instruction */
|
||||
STRUCT_SIZE_ASSERT(brw_instruction, 16);
|
||||
|
||||
/**
|
||||
* This structure is the internal representation of directly-addressed
|
||||
* registers in the parser.
|
||||
|
Loading…
x
Reference in New Issue
Block a user