|
1
|
+diff --git a/src/amd/common/ac_surface_modifier_test.c b/src/amd/common/ac_surface_modifier_test.c
|
|
2
|
+index 8c2f90fc8cc9567acd6c875a05f52a74e4fb5f0e..b017699979c5f662ab87271c9c6b8180e9fa857d 100644
|
|
3
|
+--- a/src/amd/common/ac_surface_modifier_test.c
|
|
4
|
++++ b/src/amd/common/ac_surface_modifier_test.c
|
|
5
|
+@@ -24,7 +24,7 @@
|
|
6
|
+ * not change the meaning of existing modifiers.
|
|
7
|
+ */
|
|
8
|
+
|
|
9
|
+-struct test_entry {
|
|
10
|
++struct ALIGN32 test_entry {
|
|
11
|
+ /* key part */
|
|
12
|
+ uint64_t modifier;
|
|
13
|
+ unsigned w;
|
|
14
|
+@@ -32,20 +32,14 @@ struct test_entry {
|
|
15
|
+ enum pipe_format format;
|
|
16
|
+
|
|
17
|
+ /* debug info */
|
|
18
|
+- const char *name;
|
|
19
|
+ uint8_t pipes;
|
|
20
|
+ uint8_t rb;
|
|
21
|
+ uint8_t banks_or_pkrs;
|
|
22
|
+ uint8_t se;
|
|
23
|
++ const char *name;
|
|
24
|
+
|
|
25
|
+ /* value to determine uniqueness */
|
|
26
|
+ unsigned char hash[20];
|
|
27
|
+-
|
|
28
|
+- /* u_vector requires power of two sizing */
|
|
29
|
+- char padding[8];
|
|
30
|
+-#ifdef PIPE_ARCH_X86
|
|
31
|
+- char padding2[8];
|
|
32
|
+-#endif
|
|
33
|
+ };
|
|
34
|
+
|
|
35
|
+ static uint64_t
|
|
36
|
+@@ -234,19 +228,19 @@ static void test_modifier(const struct radeon_info *info,
|
|
37
|
+ },
|
|
38
|
+ };
|
|
39
|
+
|
|
40
|
+- struct test_entry entry = {
|
|
41
|
+- .modifier = modifier,
|
|
42
|
+- .w = config.info.width,
|
|
43
|
+- .h = config.info.height,
|
|
44
|
+- .format = format,
|
|
45
|
+- .name = name,
|
|
46
|
+- .pipes = G_0098F8_NUM_PIPES(info->gb_addr_config),
|
|
47
|
+- .rb = G_0098F8_NUM_RB_PER_SE(info->gb_addr_config) +
|
|
48
|
+- G_0098F8_NUM_SHADER_ENGINES_GFX9(info->gb_addr_config),
|
|
49
|
+- .se = G_0098F8_NUM_SHADER_ENGINES_GFX9(info->gb_addr_config),
|
|
50
|
+- .banks_or_pkrs = info->chip_class >= GFX10 ?
|
|
51
|
+- (info->gb_addr_config) : G_0098F8_NUM_BANKS(info->gb_addr_config)
|
|
52
|
+- };
|
|
53
|
++ struct test_entry entry;
|
|
54
|
++ memset(&entry, 0, sizeof(entry));
|
|
55
|
++ entry.modifier = modifier;
|
|
56
|
++ entry.w = config.info.width;
|
|
57
|
++ entry.h = config.info.height;
|
|
58
|
++ entry.format = format;
|
|
59
|
++ entry.name = name;
|
|
60
|
++ entry.pipes = G_0098F8_NUM_PIPES(info->gb_addr_config);
|
|
61
|
++ entry.rb = G_0098F8_NUM_RB_PER_SE(info->gb_addr_config) +
|
|
62
|
++ G_0098F8_NUM_SHADER_ENGINES_GFX9(info->gb_addr_config);
|
|
63
|
++ entry.se = G_0098F8_NUM_SHADER_ENGINES_GFX9(info->gb_addr_config);
|
|
64
|
++ entry.banks_or_pkrs = info->chip_class >= GFX10 ?
|
|
65
|
++ (info->gb_addr_config) : G_0098F8_NUM_BANKS(info->gb_addr_config);
|
|
66
|
+
|
|
67
|
+ struct radeon_surf surf = (struct radeon_surf) {
|
|
68
|
+ .blk_w = 1,
|
|
69
|
+diff --git a/src/util/macros.h b/src/util/macros.h
|
|
70
|
+index 1fc9e23355b0b418ad7d2597dd2b76647e2d3087..7cd666c1395ddcae7b63bb2ce54142d86b435725 100644
|
|
71
|
+--- a/src/util/macros.h
|
|
72
|
++++ b/src/util/macros.h
|
|
73
|
+@@ -234,8 +234,10 @@ do { \
|
|
74
|
+
|
|
75
|
+ #ifdef _MSC_VER
|
|
76
|
+ #define ALIGN16 __declspec(align(16))
|
|
77
|
++#define ALIGN32 __declspec(align(32))
|
|
78
|
+ #else
|
|
79
|
+ #define ALIGN16 __attribute__((aligned(16)))
|
|
80
|
++#define ALIGN32 __attribute__((aligned(32)))
|
|
81
|
+ #endif
|
|
82
|
+
|
|
83
|
+ #ifdef __cplusplus
|