Mesa (master): tgsi: Mark the tgsi_exec_channel and tgsi_double_channel ALIGN16.
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue May 4 19:32:37 UTC 2021
Module: Mesa
Branch: master
Commit: a2efa2e833ded46da03666253de0d0e9f77beaf2
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=a2efa2e833ded46da03666253de0d0e9f77beaf2
Author: Eric Anholt <eric at anholt.net>
Date: Mon May 3 15:19:46 2021 -0700
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 at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10604>
---
src/gallium/auxiliary/tgsi/tgsi_exec.c | 4 ++--
src/gallium/auxiliary/tgsi/tgsi_exec.h | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/gallium/auxiliary/tgsi/tgsi_exec.c b/src/gallium/auxiliary/tgsi/tgsi_exec.c
index fd0471fd2f5..cf950e89fb3 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_exec.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_exec.c
@@ -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;
};
diff --git a/src/gallium/auxiliary/tgsi/tgsi_exec.h b/src/gallium/auxiliary/tgsi/tgsi_exec.h
index 982cad592e0..257769819eb 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_exec.h
+++ b/src/gallium/auxiliary/tgsi/tgsi_exec.h
@@ -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
*/
More information about the mesa-commit
mailing list