sizeof(struct si_shader_key):
Before reverting the 2 commits: 120 bytes
After reverting the 2 commits: 128 bytes
With #pragma pack: 107 bytes
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
* -> = merged with the next stage
*/
+/* Use the byte alignment for all following structure members for optimal
+ * shader key memory footprint.
+ */
+#pragma pack(push, 1)
+
/* Common VS bits between the shader key and the prolog key. */
struct si_vs_prolog_bits {
unsigned instance_divisors[SI_MAX_ATTRIBS];
} opt;
};
+/* Restore the pack alignment to default. */
+#pragma pack(pop)
+
struct si_shader_config {
unsigned num_sgprs;
unsigned num_vgprs;