From 56e89c9e4fb00b5c2af4536d4c50294608d0c46c Mon Sep 17 00:00:00 2001 From: Radosław Kujawa Date: Sun, 2 Aug 2026 22:04:06 +0200 Subject: Performance improvements, support userspace simulators --- src/mesa/swrast/swrast.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/mesa/swrast/swrast.h') diff --git a/src/mesa/swrast/swrast.h b/src/mesa/swrast/swrast.h index 7fb0d2a..a3cd9e0 100644 --- a/src/mesa/swrast/swrast.h +++ b/src/mesa/swrast/swrast.h @@ -62,14 +62,19 @@ */ typedef struct { /** win[0], win[1] are the screen-coords of SWvertex. win[2] is the - * z-coord. what is win[3]? */ + * z-coord. what is win[3]? + * + * The texcoord array (most of the struct) trails so a + * fixed-function vertex's hot fields share fewer cache lines. All + * access is by field name, no code depends on member order. + */ GLfloat win[4]; - GLfloat texcoord[MAX_TEXTURE_COORD_UNITS][4]; GLchan color[4]; GLchan specular[4]; GLfloat fog; GLfloat index; GLfloat pointSize; + GLfloat texcoord[MAX_TEXTURE_COORD_UNITS][4]; } SWvertex; -- cgit