tgsi: Mark the tgsi_exec_channel and tgsi_double_channel ALIGN16.

We allocate them all align16, so mark the unions (and their container
structs) that way so the compiler can do aligned SSE load/stores.

glmark2 -b loop FPS +0.197265% +/- 0.117633% (n=1906)

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10604>
This commit is contained in:
Eric Anholt 2021-05-03 15:19:46 -07:00 committed by Marge Bot
parent 1d418e79b8
commit a2efa2e833
2 changed files with 5 additions and 5 deletions

View file

@ -80,9 +80,9 @@ union tgsi_double_channel {
unsigned u[TGSI_QUAD_SIZE][2];
uint64_t u64[TGSI_QUAD_SIZE];
int64_t i64[TGSI_QUAD_SIZE];
};
} ALIGN16;
struct tgsi_double_vector {
struct ALIGN16 tgsi_double_vector {
union tgsi_double_channel xy;
union tgsi_double_channel zw;
};

View file

@ -76,12 +76,12 @@ union tgsi_exec_channel
float f[TGSI_QUAD_SIZE];
int i[TGSI_QUAD_SIZE];
unsigned u[TGSI_QUAD_SIZE];
};
} ALIGN16;
/**
* A vector[RGBA] of channels[4 pixels]
*/
struct tgsi_exec_vector
struct ALIGN16 tgsi_exec_vector
{
union tgsi_exec_channel xyzw[TGSI_NUM_CHANNELS];
};
@ -286,7 +286,7 @@ typedef void (* apply_sample_offset_func)(
/**
* Run-time virtual machine state for executing TGSI shader.
*/
struct tgsi_exec_machine
struct ALIGN16 tgsi_exec_machine
{
/* Total = program temporaries + internal temporaries
*/