mirror of
https://github.com/brl/mutter.git
synced 2025-06-14 01:09:30 +00:00
Reorder some struct members to avoid padding due to alignment
This tweaks the ordering of some struct members in some of the more important structs so that the compiler won't insert wasted padding to avoid breaking the alignment. Some members that were previously unsigned long have been changed to unsigned int. These members need to be able to fit in 32-bits to run on 32-bit machines anyway so there's no point in having them extend to 64-bit on 64-bit machines. This doesn't affect the public API. Reviewed-by: Robert Bragg <robert@linux.intel.com> (cherry picked from commit b721af236680005464e39f7f4dd11381d95efb16)
This commit is contained in:

committed by
Robert Bragg

parent
7572fedeaa
commit
3a041ef41b
@ -179,10 +179,10 @@ typedef struct
|
||||
/* The texture matrix dscribes how to transform texture coordinates */
|
||||
CoglMatrix matrix;
|
||||
|
||||
CoglBool point_sprite_coords;
|
||||
|
||||
CoglPipelineSnippetList vertex_snippets;
|
||||
CoglPipelineSnippetList fragment_snippets;
|
||||
|
||||
CoglBool point_sprite_coords;
|
||||
} CoglPipelineLayerBigState;
|
||||
|
||||
struct _CoglPipelineLayer
|
||||
@ -218,7 +218,7 @@ struct _CoglPipelineLayer
|
||||
|
||||
/* A mask of which state groups are different in this layer
|
||||
* in comparison to its parent. */
|
||||
unsigned long differences;
|
||||
unsigned int differences;
|
||||
|
||||
/* Common differences
|
||||
*
|
||||
@ -231,14 +231,14 @@ struct _CoglPipelineLayer
|
||||
/* Each layer is directly associated with a single texture unit */
|
||||
int unit_index;
|
||||
|
||||
/* The texture for this layer, or NULL for an empty
|
||||
* layer */
|
||||
CoglTexture *texture;
|
||||
/* The type of the texture. This is always set even if the texture
|
||||
is NULL and it will be used to determine what type of texture
|
||||
lookups to use in any shaders generated by the pipeline
|
||||
backends. */
|
||||
CoglTextureType texture_type;
|
||||
/* The texture for this layer, or NULL for an empty
|
||||
* layer */
|
||||
CoglTexture *texture;
|
||||
|
||||
const CoglSamplerCacheEntry *sampler_cache_entry;
|
||||
|
||||
|
Reference in New Issue
Block a user